textmode.export.js 1.5.1 → 1.6.0-beta.1

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 (81) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +12 -6
  3. package/dist/textmode.export.esm.js +3160 -2960
  4. package/dist/textmode.export.umd.js +6 -6
  5. package/dist/types/augmentations/index.d.ts +5 -0
  6. package/dist/types/augmentations/index.d.ts.map +1 -0
  7. package/dist/types/augmentations/textmode.d.ts +9 -0
  8. package/dist/types/augmentations/textmode.d.ts.map +1 -0
  9. package/dist/types/augmentations/textmode.test.d.ts +2 -0
  10. package/dist/types/augmentations/textmode.test.d.ts.map +1 -0
  11. package/dist/types/exporters/base/LayerTarget.d.ts +4 -0
  12. package/dist/types/exporters/base/LayerTarget.d.ts.map +1 -1
  13. package/dist/types/exporters/gif/types.d.ts +24 -0
  14. package/dist/types/exporters/gif/types.d.ts.map +1 -1
  15. package/dist/types/exporters/image/types.d.ts +8 -0
  16. package/dist/types/exporters/image/types.d.ts.map +1 -1
  17. package/dist/types/exporters/json/types.d.ts +36 -0
  18. package/dist/types/exporters/json/types.d.ts.map +1 -1
  19. package/dist/types/exporters/svg/types.d.ts +2 -0
  20. package/dist/types/exporters/svg/types.d.ts.map +1 -1
  21. package/dist/types/exporters/txt/types.d.ts +2 -0
  22. package/dist/types/exporters/txt/types.d.ts.map +1 -1
  23. package/dist/types/exporters/video/types.d.ts +60 -0
  24. package/dist/types/exporters/video/types.d.ts.map +1 -1
  25. package/dist/types/index.d.ts +5 -24
  26. package/dist/types/index.d.ts.map +1 -1
  27. package/dist/types/overlay/blades/Blade.d.ts +9 -2
  28. package/dist/types/overlay/blades/Blade.d.ts.map +1 -1
  29. package/dist/types/overlay/blades/GIFBlade.d.ts +1 -0
  30. package/dist/types/overlay/blades/GIFBlade.d.ts.map +1 -1
  31. package/dist/types/overlay/blades/ImageBlade.d.ts +1 -0
  32. package/dist/types/overlay/blades/ImageBlade.d.ts.map +1 -1
  33. package/dist/types/overlay/blades/JSONBlade.d.ts +1 -0
  34. package/dist/types/overlay/blades/JSONBlade.d.ts.map +1 -1
  35. package/dist/types/overlay/blades/RecordingBlade.d.ts +8 -0
  36. package/dist/types/overlay/blades/RecordingBlade.d.ts.map +1 -0
  37. package/dist/types/overlay/blades/SVGBlade.d.ts +1 -0
  38. package/dist/types/overlay/blades/SVGBlade.d.ts.map +1 -1
  39. package/dist/types/overlay/blades/TextBlade.d.ts +1 -0
  40. package/dist/types/overlay/blades/TextBlade.d.ts.map +1 -1
  41. package/dist/types/overlay/blades/VideoBlade.d.ts +1 -0
  42. package/dist/types/overlay/blades/VideoBlade.d.ts.map +1 -1
  43. package/dist/types/overlay/blades/index.d.ts +3 -0
  44. package/dist/types/overlay/blades/index.d.ts.map +1 -1
  45. package/dist/types/overlay/components/display/Header.d.ts +3 -0
  46. package/dist/types/overlay/components/display/Header.d.ts.map +1 -1
  47. package/dist/types/overlay/config/DefaultsStore.d.ts +12 -0
  48. package/dist/types/overlay/config/DefaultsStore.d.ts.map +1 -0
  49. package/dist/types/overlay/config/DefaultsStore.test.d.ts +2 -0
  50. package/dist/types/overlay/config/DefaultsStore.test.d.ts.map +1 -0
  51. package/dist/types/overlay/config/ExportDefaults.d.ts +4 -0
  52. package/dist/types/overlay/config/ExportDefaults.d.ts.map +1 -0
  53. package/dist/types/overlay/config/ExportDefaults.test.d.ts +2 -0
  54. package/dist/types/overlay/config/ExportDefaults.test.d.ts.map +1 -0
  55. package/dist/types/overlay/core/OverlayController.d.ts +29 -5
  56. package/dist/types/overlay/core/OverlayController.d.ts.map +1 -1
  57. package/dist/types/overlay/core/OverlayController.test.d.ts +2 -0
  58. package/dist/types/overlay/core/OverlayController.test.d.ts.map +1 -0
  59. package/dist/types/overlay/core/StateManager.d.ts.map +1 -1
  60. package/dist/types/overlay/formatRegistry.d.ts +3 -1
  61. package/dist/types/overlay/formatRegistry.d.ts.map +1 -1
  62. package/dist/types/overlay/index.d.ts +0 -1
  63. package/dist/types/overlay/index.d.ts.map +1 -1
  64. package/dist/types/overlay/models/OverlayState.d.ts +1 -1
  65. package/dist/types/overlay/services/ClipboardService.d.ts +1 -4
  66. package/dist/types/overlay/services/ClipboardService.d.ts.map +1 -1
  67. package/dist/types/overlay/services/ExportService.d.ts +0 -1
  68. package/dist/types/overlay/services/ExportService.d.ts.map +1 -1
  69. package/dist/types/overlay/services/OverlayPositionStorage.d.ts +13 -0
  70. package/dist/types/overlay/services/OverlayPositionStorage.d.ts.map +1 -0
  71. package/dist/types/overlay/services/PositionService.d.ts +33 -2
  72. package/dist/types/overlay/services/PositionService.d.ts.map +1 -1
  73. package/dist/types/overlay/services/PositionService.test.d.ts +2 -0
  74. package/dist/types/overlay/services/PositionService.test.d.ts.map +1 -0
  75. package/dist/types/overlay/types.d.ts +36 -1
  76. package/dist/types/overlay/types.d.ts.map +1 -1
  77. package/dist/types/overlay/utils/classes.d.ts +3 -0
  78. package/dist/types/overlay/utils/classes.d.ts.map +1 -1
  79. package/dist/types/types.d.ts +211 -18
  80. package/dist/types/types.d.ts.map +1 -1
  81. package/package.json +24 -8
@@ -6,7 +6,10 @@ export declare const overlayClasses: {
6
6
  readonly section: "textmode-export-overlay__section";
7
7
  readonly header: "textmode-export-overlay__header";
8
8
  readonly headerTitleRow: "textmode-export-overlay__header-title-row";
9
+ readonly headerIdentity: "textmode-export-overlay__header-identity";
9
10
  readonly headerLinks: "textmode-export-overlay__header-links";
11
+ readonly grabHandle: "textmode-export-overlay__grab-handle";
12
+ readonly rootDragging: "textmode-export-overlay--dragging";
10
13
  readonly row: "textmode-export-overlay__row";
11
14
  readonly label: "textmode-export-overlay__label";
12
15
  readonly field: "textmode-export-overlay__field";
@@ -1 +1 @@
1
- {"version":3,"file":"classes.d.ts","sourceRoot":"","sources":["../../../../src/overlay/utils/classes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCjB,CAAC"}
1
+ {"version":3,"file":"classes.d.ts","sourceRoot":"","sources":["../../../../src/overlay/utils/classes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCjB,CAAC"}
@@ -2,10 +2,87 @@ import type { ImageExportOptions } from './exporters/image';
2
2
  import type { TXTExportOptions } from './exporters/txt';
3
3
  import type { SVGExportOptions } from './exporters/svg';
4
4
  import type { GIFExportOptions } from './exporters/gif';
5
- import type { VideoExportOptions } from './exporters/video';
5
+ import type { VideoBitratePreset, VideoExportOptions } from './exporters/video';
6
6
  import type { JSONExportOptions, TextmodeDocumentJSON } from './exporters/json';
7
+ export type TXTOverlayDefaults = Pick<TXTExportOptions, 'preserveTrailingSpaces' | 'emptyCharacter'>;
8
+ export type JSONOverlayDefaults = Pick<JSONExportOptions, 'target' | 'pretty' | 'includeMetadata' | 'colorMode'>;
9
+ export type ImageOverlayDefaults = Pick<ImageExportOptions, 'format' | 'scale'>;
10
+ export type SVGOverlayDefaults = Pick<SVGExportOptions, 'includeBackgroundRectangles' | 'drawMode' | 'strokeWidth'>;
11
+ export type GIFOverlayDefaults = Pick<GIFExportOptions, 'frameCount' | 'frameRate' | 'scale' | 'repeat'>;
12
+ export type VideoOverlayDefaults = Pick<VideoExportOptions, 'format' | 'frameCount' | 'frameRate' | 'bitrateMode' | 'latencyMode' | 'hardwareAcceleration' | 'keyFrameInterval' | 'transparent'> & {
13
+ bitrate?: VideoBitratePreset;
14
+ };
15
+ /**
16
+ * Per-format default options used to seed the overlay UI inputs at mount time
17
+ * and after a {@link ExportOverlayController.resetDefaults} call.
18
+ *
19
+ * Each sub-object contains the library-chosen defaults for the fields that
20
+ * the overlay exposes. Top-level `format` controls which export format is
21
+ * selected in the overlay. You can read and override them at runtime via
22
+ * {@link ExportOverlayController.getDefaults} and
23
+ * {@link ExportOverlayController.setDefaults}.
24
+ *
25
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/ExportDefaults | ExportDefaults API reference}
26
+ */
27
+ export type ExportDefaults = {
28
+ /**
29
+ * Export format selected by default in the overlay.
30
+ *
31
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/ExportDefaults | ExportDefaults API reference}
32
+ */
33
+ format: 'txt' | 'json' | 'image' | 'gif' | 'video' | 'svg';
34
+ txt: TXTOverlayDefaults;
35
+ json: JSONOverlayDefaults;
36
+ image: ImageOverlayDefaults;
37
+ svg: SVGOverlayDefaults;
38
+ gif: GIFOverlayDefaults;
39
+ video: VideoOverlayDefaults;
40
+ };
41
+ /**
42
+ * Partial patch accepted by {@link ExportOverlayController.setDefaults}.
43
+ *
44
+ * Every supplied per-format sub-object is deep-merged into the corresponding
45
+ * format's curated defaults. Top-level `format` changes the overlay's selected
46
+ * format. Omitted keys keep their current value.
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * t.exportOverlay.setDefaults({ format: 'image', image: { scale: 2 }, gif: { frameRate: 30 } });
51
+ * ```
52
+ *
53
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/ExportDefaultsPatch | ExportDefaultsPatch API reference}
54
+ */
55
+ export type ExportDefaultsPatch = {
56
+ format?: ExportDefaults['format'];
57
+ } & {
58
+ [K in Exclude<keyof ExportDefaults, 'format'>]?: Partial<ExportDefaults[K]>;
59
+ };
60
+ /**
61
+ * Current canvas-relative placement state for the export overlay UI.
62
+ *
63
+ * `auto` means the overlay is using the library default offset from the
64
+ * textmode canvas. `custom` means the user or runtime API has moved it.
65
+ *
66
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/ExportOverlayPosition | ExportOverlayPosition API reference}
67
+ */
68
+ export interface ExportOverlayPosition {
69
+ mode: 'auto' | 'custom';
70
+ offsetX: number;
71
+ offsetY: number;
72
+ }
73
+ /**
74
+ * Canvas-relative placement coordinates for the export overlay UI.
75
+ *
76
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/ExportOverlayPositionInput | ExportOverlayPositionInput API reference}
77
+ */
78
+ export interface ExportOverlayPositionInput {
79
+ offsetX: number;
80
+ offsetY: number;
81
+ }
7
82
  /**
8
83
  * Controller for managing the export overlay UI visibility at runtime.
84
+ *
85
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/ExportOverlayController | ExportOverlayController API reference}
9
86
  */
10
87
  export interface ExportOverlayController {
11
88
  /**
@@ -15,6 +92,8 @@ export interface ExportOverlayController {
15
92
  * ```ts
16
93
  * t.exportOverlay.show();
17
94
  * ```
95
+ *
96
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/ExportOverlayController/methods/show | ExportOverlayController.show API reference}
18
97
  */
19
98
  show(): void;
20
99
  /**
@@ -24,6 +103,8 @@ export interface ExportOverlayController {
24
103
  * ```ts
25
104
  * t.exportOverlay.hide();
26
105
  * ```
106
+ *
107
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/ExportOverlayController/methods/hide | ExportOverlayController.hide API reference}
27
108
  */
28
109
  hide(): void;
29
110
  /**
@@ -33,6 +114,8 @@ export interface ExportOverlayController {
33
114
  * ```ts
34
115
  * t.exportOverlay.toggle();
35
116
  * ```
117
+ *
118
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/ExportOverlayController/methods/toggle | ExportOverlayController.toggle API reference}
36
119
  */
37
120
  toggle(): void;
38
121
  /**
@@ -42,18 +125,122 @@ export interface ExportOverlayController {
42
125
  * ```ts
43
126
  * const visible = t.exportOverlay.isVisible();
44
127
  * ```
128
+ *
129
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/ExportOverlayController/methods/isVisible | ExportOverlayController.isVisible API reference}
45
130
  */
46
131
  isVisible(): boolean;
132
+ /**
133
+ * Restores the export overlay to its default canvas-relative placement and
134
+ * clears any remembered placement.
135
+ *
136
+ * @example
137
+ * ```ts
138
+ * t.exportOverlay.resetPosition();
139
+ * ```
140
+ *
141
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/ExportOverlayController/methods/resetPosition | ExportOverlayController.resetPosition API reference}
142
+ */
143
+ resetPosition(): void;
144
+ /**
145
+ * Reads the current export overlay placement.
146
+ *
147
+ * @returns The current canvas-relative overlay placement state.
148
+ *
149
+ * @example
150
+ * ```ts
151
+ * const position = t.exportOverlay.getPosition();
152
+ * console.log(position.mode, position.offsetX, position.offsetY);
153
+ * ```
154
+ *
155
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/ExportOverlayController/methods/getPosition | ExportOverlayController.getPosition API reference}
156
+ */
157
+ getPosition(): Readonly<ExportOverlayPosition>;
158
+ /**
159
+ * Moves the export overlay to a custom canvas-relative placement and
160
+ * remembers that placement for future sessions on the same origin.
161
+ *
162
+ * @param position Canvas-relative overlay offsets in CSS pixels.
163
+ *
164
+ * @example
165
+ * ```ts
166
+ * t.exportOverlay.setPosition({ offsetX: 24, offsetY: 24 });
167
+ * ```
168
+ *
169
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/ExportOverlayController/methods/setPosition | ExportOverlayController.setPosition API reference}
170
+ */
171
+ setPosition(position: ExportOverlayPositionInput): void;
172
+ /**
173
+ * Override the curated overlay defaults at runtime.
174
+ *
175
+ * Merges the supplied patch into the internal defaults store. Per-format
176
+ * option patches are pushed into mounted blades; top-level `format` updates
177
+ * the overlay's selected export format immediately.
178
+ *
179
+ * @param patch Partial defaults to merge per format.
180
+ *
181
+ * @example
182
+ * ```ts
183
+ * // Select image export by default, set image scale to 2×, and GIF to 30 fps
184
+ * t.exportOverlay.setDefaults({ format: 'image', image: { scale: 2 }, gif: { frameRate: 30 } });
185
+ * ```
186
+ *
187
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/ExportOverlayController/methods/setDefaults | ExportOverlayController.setDefaults API reference}
188
+ */
189
+ setDefaults(patch: ExportDefaultsPatch): void;
190
+ /**
191
+ * Read the current effective defaults for every format.
192
+ *
193
+ * The returned object reflects the library's curated defaults merged
194
+ * with any runtime overrides applied via {@link setDefaults}.
195
+ *
196
+ * @returns The current per-format defaults.
197
+ *
198
+ * @example
199
+ * ```ts
200
+ * const defaults = t.exportOverlay.getDefaults();
201
+ * console.log(defaults.image.scale); // 1 (or whatever was set)
202
+ * ```
203
+ *
204
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/ExportOverlayController/methods/getDefaults | ExportOverlayController.getDefaults API reference}
205
+ */
206
+ getDefaults(): Readonly<ExportDefaults>;
207
+ /**
208
+ * Restore one or all formats to the library's curated defaults.
209
+ *
210
+ * If a format is specified, only that format is reset; otherwise all
211
+ * formats are restored.
212
+ *
213
+ * @param format Optional format to reset. Omit to reset all.
214
+ *
215
+ * @example
216
+ * ```ts
217
+ * // Reset image defaults
218
+ * t.exportOverlay.resetDefaults('image');
219
+ *
220
+ * // Reset the overlay's selected default export format
221
+ * t.exportOverlay.resetDefaults('format');
222
+ *
223
+ * // Reset all formats
224
+ * t.exportOverlay.resetDefaults();
225
+ * ```
226
+ *
227
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/ExportOverlayController/methods/resetDefaults | ExportOverlayController.resetDefaults API reference}
228
+ */
229
+ resetDefaults(format?: keyof ExportDefaults): void;
47
230
  }
48
231
  /**
49
- * Runtime export helpers that `createExportPlugin` attaches to the `Textmodifier` instance.
232
+ * Runtime export helpers that `ExportPlugin` attaches to the `Textmodifier` instance.
50
233
  *
51
234
  * @example
52
235
  * {@includeCode ../examples/ExportPlugin/layerTargets/sketch.js}
236
+ *
237
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeExportAPI | TextmodeExportAPI API reference}
53
238
  */
54
239
  export interface TextmodeExportAPI {
55
240
  /**
56
241
  * Controller for managing the export overlay UI visibility at runtime.
242
+ *
243
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeExportAPI#exportoverlay | TextmodeExportAPI.exportOverlay API reference}
57
244
  */
58
245
  exportOverlay: ExportOverlayController;
59
246
  /**
@@ -65,6 +252,8 @@ export interface TextmodeExportAPI {
65
252
  * ```ts
66
253
  * await t.saveCanvas({ format: 'png', filename: 'frame-001' });
67
254
  * ```
255
+ *
256
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeExportAPI/methods/saveCanvas | TextmodeExportAPI.saveCanvas API reference}
68
257
  */
69
258
  saveCanvas(options?: ImageExportOptions): Promise<void>;
70
259
  /**
@@ -76,6 +265,8 @@ export interface TextmodeExportAPI {
76
265
  * ```ts
77
266
  * await t.copyCanvas({ format: 'png' });
78
267
  * ```
268
+ *
269
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeExportAPI/methods/copyCanvas | TextmodeExportAPI.copyCanvas API reference}
79
270
  */
80
271
  copyCanvas(options?: ImageExportOptions): Promise<void>;
81
272
  /**
@@ -87,6 +278,8 @@ export interface TextmodeExportAPI {
87
278
  * ```ts
88
279
  * t.saveSVG({ filename: 'poster', layer: t.layers.base, includeBackgroundRectangles: true });
89
280
  * ```
281
+ *
282
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeExportAPI/methods/saveSVG | TextmodeExportAPI.saveSVG API reference}
90
283
  */
91
284
  saveSVG(options?: SVGExportOptions): void;
92
285
  /**
@@ -98,6 +291,8 @@ export interface TextmodeExportAPI {
98
291
  * ```ts
99
292
  * t.saveStrings({ filename: 'frame', layer: t.layers.base, preserveTrailingSpaces: true });
100
293
  * ```
294
+ *
295
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeExportAPI/methods/saveStrings | TextmodeExportAPI.saveStrings API reference}
101
296
  */
102
297
  saveStrings(options?: TXTExportOptions): void;
103
298
  /**
@@ -110,6 +305,8 @@ export interface TextmodeExportAPI {
110
305
  * ```ts
111
306
  * const svg = t.toSVG({ layer: t.layers.base, drawMode: 'stroke', strokeWidth: 1.5 });
112
307
  * ```
308
+ *
309
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeExportAPI/methods/toSVG | TextmodeExportAPI.toSVG API reference}
113
310
  */
114
311
  toSVG(options?: SVGExportOptions): string;
115
312
  /**
@@ -122,6 +319,8 @@ export interface TextmodeExportAPI {
122
319
  * ```ts
123
320
  * const text = t.toString({ layer: t.layers.base, preserveTrailingSpaces: false });
124
321
  * ```
322
+ *
323
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeExportAPI/methods/toString | TextmodeExportAPI.toString API reference}
125
324
  */
126
325
  toString(options?: TXTExportOptions): string;
127
326
  /**
@@ -135,6 +334,8 @@ export interface TextmodeExportAPI {
135
334
  * const layer = t.toJSON({ layer: t.layers.base, colorMode: 'hex', includeMetadata: true });
136
335
  * const stack = t.toJSON({ target: 'all' });
137
336
  * ```
337
+ *
338
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeExportAPI/methods/toJSON | TextmodeExportAPI.toJSON API reference}
138
339
  */
139
340
  toJSON(options?: JSONExportOptions): TextmodeDocumentJSON;
140
341
  /**
@@ -148,6 +349,8 @@ export interface TextmodeExportAPI {
148
349
  * const json = t.toJSONString({ layer: t.layers.base, pretty: false, colorMode: 'hex' });
149
350
  * const stackJson = t.toJSONString({ target: 'all' });
150
351
  * ```
352
+ *
353
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeExportAPI/methods/toJSONString | TextmodeExportAPI.toJSONString API reference}
151
354
  */
152
355
  toJSONString(options?: JSONExportOptions): string;
153
356
  /**
@@ -160,6 +363,8 @@ export interface TextmodeExportAPI {
160
363
  * t.saveJSON({ filename: 'frame', layer: t.layers.base, pretty: true });
161
364
  * t.saveJSON({ filename: 'stack', target: 'all' });
162
365
  * ```
366
+ *
367
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeExportAPI/methods/saveJSON | TextmodeExportAPI.saveJSON API reference}
163
368
  */
164
369
  saveJSON(options?: JSONExportOptions): void;
165
370
  /**
@@ -171,6 +376,8 @@ export interface TextmodeExportAPI {
171
376
  * ```ts
172
377
  * await t.saveGIF({ frameCount: 120, frameRate: 30, filename: 'loop' });
173
378
  * ```
379
+ *
380
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeExportAPI/methods/saveGIF | TextmodeExportAPI.saveGIF API reference}
174
381
  */
175
382
  saveGIF(options?: GIFExportOptions): Promise<void>;
176
383
  /**
@@ -191,23 +398,9 @@ export interface TextmodeExportAPI {
191
398
  * filename: 'capture',
192
399
  * });
193
400
  * ```
194
- */
195
- saveVideo(options?: VideoExportOptions): Promise<void>;
196
- }
197
- /**
198
- * Options for configuring the export plugin.
199
- *
200
- * @deprecated This interface is only used by the deprecated `createTextmodeExportPlugin` function.
201
- * Use {@link ExportPlugin} directly instead, and control overlay visibility at runtime via
202
- * {@link ExportOverlayController}.
203
- */
204
- export interface TextmodeExportPluginOptions {
205
- /**
206
- * Controls whether the export overlay UI should be created.
207
- * Defaults to `true`.
208
401
  *
209
- * @deprecated Use runtime overlay controls instead: `textmodifier.exportOverlay.show()` / `.hide()`
402
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeExportAPI/methods/saveVideo | TextmodeExportAPI.saveVideo API reference}
210
403
  */
211
- overlay?: boolean;
404
+ saveVideo(options?: VideoExportOptions): Promise<void>;
212
405
  }
213
406
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,kB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;IACH,MAAM,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,oBAAoB,CAAC;IAE1D;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAAC;IAElD;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAE5C;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,SAAS,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "textmode.export.js",
3
- "version": "1.5.1",
3
+ "version": "1.6.0-beta.1",
4
4
  "description": "Export plugin for textmode.js - Save your creations as images, GIFs, videos, SVG, JSON, and plain text.",
5
5
  "type": "module",
6
6
  "main": "./dist/textmode.export.umd.js",
@@ -25,8 +25,10 @@
25
25
  "build:bundle": "vite build",
26
26
  "build:types": "tsc",
27
27
  "build": "npm run build:bundle && npm run build:types",
28
- "check": "npm run check:format && npm run lint && npm run lint:md && npm run check:types && npm run check:api-docs && npm run test && npm run build",
29
- "check:api-docs": "node ./scripts/check-public-api-docs.mjs",
28
+ "check": "npm run check:format && npm run check:deps && npm run lint && npm run lint:md && npm run check:types && npm run check:api-docs && npm run test && npm run build",
29
+ "docs:links:add": "textmode-add-api-links",
30
+ "check:api-docs": "textmode-check-api-docs",
31
+ "check:examples": "textmode-check-examples",
30
32
  "dev:docs": "typedoc --watch",
31
33
  "build:docs": "typedoc",
32
34
  "preview": "vite preview",
@@ -39,11 +41,12 @@
39
41
  "check:types": "tsc --noEmit",
40
42
  "lint:md": "markdownlint-cli2",
41
43
  "lint:md:fix": "markdownlint-cli2 --fix",
42
- "lint": "eslint src --config eslint.config.js",
43
- "prepare": "husky"
44
+ "lint": "eslint src",
45
+ "prepare": "husky && install-husky",
46
+ "check:deps": "check-deps"
44
47
  },
45
48
  "peerDependencies": {
46
- "textmode.js": ">=0.13.0"
49
+ "textmode.js": ">=0.16.0"
47
50
  },
48
51
  "dependencies": {
49
52
  "gifenc": "^1.0.1",
@@ -66,7 +69,7 @@
66
69
  "eslint-plugin-jsdoc": "^62.9.0",
67
70
  "globals": "^17.5.0",
68
71
  "husky": "^9.1.7",
69
- "jsdom": "^26.1.0",
72
+ "jsdom": "^27.4.0",
70
73
  "lint-staged": "^16.4.0",
71
74
  "markdownlint-cli2": "^0.22.1",
72
75
  "markdownlint-cli2-formatter-default": "^0.0.6",
@@ -82,7 +85,14 @@
82
85
  "typescript-eslint": "^8.59.0",
83
86
  "vite": "^6.3.4",
84
87
  "vite-plugin-css-injected-by-js": "^3.5.2",
85
- "vitest": "^3.1.2"
88
+ "vitest": "^3.1.2",
89
+ "@textmode/commitlint-config": "^0.1.0",
90
+ "@textmode/eslint-config": "^0.1.0",
91
+ "@textmode/markdownlint-config": "^0.1.0",
92
+ "@textmode/prettier-config": "^0.1.0",
93
+ "@textmode/release-config": "^0.1.0",
94
+ "@textmode/tooling-scripts": "^0.1.0",
95
+ "@textmode/tsconfig": "^0.1.0"
86
96
  },
87
97
  "keywords": [
88
98
  "textmode",
@@ -109,6 +119,12 @@
109
119
  "lint-staged": {
110
120
  "*": "prettier --ignore-unknown --write"
111
121
  },
122
+ "prettier": "@textmode/prettier-config",
123
+ "commitlint": {
124
+ "extends": [
125
+ "@textmode/commitlint-config"
126
+ ]
127
+ },
112
128
  "repository": {
113
129
  "type": "git",
114
130
  "url": "git+https://github.com/humanbydefinition/textmode.export.js.git"