@visulima/ansi 4.0.0-alpha.12 → 4.0.0-alpha.14

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 (61) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/LICENSE.md +0 -3
  3. package/README.md +3 -0
  4. package/dist/alternative-screen.d.ts +71 -70
  5. package/dist/alternative-screen.js +1 -8
  6. package/dist/clear.d.ts +74 -73
  7. package/dist/clear.js +1 -10
  8. package/dist/cursor.d.ts +421 -406
  9. package/dist/cursor.js +1 -3
  10. package/dist/erase.d.ts +193 -192
  11. package/dist/erase.js +1 -47
  12. package/dist/hyperlink.d.ts +25 -25
  13. package/dist/hyperlink.js +1 -5
  14. package/dist/image.d.ts +71 -70
  15. package/dist/image.js +1 -40
  16. package/dist/index.d.ts +65 -35
  17. package/dist/index.js +1 -26
  18. package/dist/iterm2.d.ts +285 -58
  19. package/dist/iterm2.js +1 -12
  20. package/dist/mode.d.ts +585 -584
  21. package/dist/mode.js +1 -245
  22. package/dist/mouse.d.ts +227 -226
  23. package/dist/mouse.js +1 -106
  24. package/dist/packem_shared/IT2_AUTO-OiB8EaxU.js +1 -0
  25. package/dist/packem_shared/ITerm2File-XoC8RMzs.js +1 -0
  26. package/dist/packem_shared/constants-D12jy2Zh.js +1 -0
  27. package/dist/packem_shared/cursor-BAcJR4p_.js +1 -0
  28. package/dist/packem_shared/resetProgressBar-H_gzPKNE.js +1 -0
  29. package/dist/packem_shared/restoreCursor-CHy0jZuu.js +2 -0
  30. package/dist/passthrough.d.ts +74 -73
  31. package/dist/passthrough.js +1 -29
  32. package/dist/reset.d.ts +25 -24
  33. package/dist/reset.js +1 -4
  34. package/dist/screen.d.ts +226 -225
  35. package/dist/screen.js +1 -27
  36. package/dist/scroll.d.ts +64 -63
  37. package/dist/scroll.js +1 -18
  38. package/dist/status.d.ts +521 -520
  39. package/dist/status.js +1 -95
  40. package/dist/strip.d.ts +1 -1
  41. package/dist/strip.js +1 -13
  42. package/dist/termcap.d.ts +36 -35
  43. package/dist/termcap.js +1 -25
  44. package/dist/title.d.ts +176 -175
  45. package/dist/title.js +1 -19
  46. package/dist/window-ops.d.ts +399 -398
  47. package/dist/window-ops.js +1 -61
  48. package/dist/xterm.d.ts +85 -84
  49. package/dist/xterm.js +1 -33
  50. package/package.json +2 -5
  51. package/dist/constants.d.ts +0 -20
  52. package/dist/helpers.d.ts +0 -14
  53. package/dist/iterm2/iterm2-properties.d.ts +0 -135
  54. package/dist/iterm2/iterm2-sequences.d.ts +0 -96
  55. package/dist/packem_shared/IT2_AUTO-DyYWsxno.js +0 -6
  56. package/dist/packem_shared/ITerm2File-CUZDBk99.js +0 -137
  57. package/dist/packem_shared/constants-CE7WkXh_.js +0 -9
  58. package/dist/packem_shared/cursor-ChpV7cgs.js +0 -72
  59. package/dist/packem_shared/resetProgressBar-D9r2s7eV.js +0 -18
  60. package/dist/packem_shared/restoreCursor-GfYEeJqN.js +0 -323
  61. package/dist/progress.d.ts +0 -41
package/dist/iterm2.d.ts CHANGED
@@ -1,58 +1,285 @@
1
- import type { IITerm2Payload } from './iterm2/iterm2-properties.d.ts';
2
- export type { IITerm2Payload, ITerm2FileProperties } from './iterm2/iterm2-properties.d.ts';
3
- export { IT2_AUTO, it2Cells, it2Percent, it2Pixels } from './iterm2/iterm2-properties.d.ts';
4
- export { ITerm2File, ITerm2FileEnd, ITerm2FilePart, ITerm2MultipartFileStart } from './iterm2/iterm2-sequences.d.ts';
5
- /**
6
- * Generates a complete iTerm2 proprietary escape sequence (OSC 1337).
7
- *
8
- * This function serves as a general-purpose constructor for iTerm2 escape codes.
9
- * It takes a payload object that conforms to the {@link IITerm2Payload} interface.
10
- * The `toString()` method of this payload object is responsible for generating the
11
- * specific command and arguments part of the sequence (e.g., `File=...`, `ShellIntegrationVersion=...`).
12
- *
13
- * The overall structure of the generated sequence is: `OSC 1337 ; <PAYLOAD_STRING> BEL`
14
- * (`OSC` is `\x1b]`, `BEL` is `\x07`).
15
- * @param payload An object that implements the {@link IITerm2Payload} interface.
16
- * This object must have a `toString()` method that returns the string representation
17
- * of the iTerm2 command-specific payload.
18
- * Examples include instances of `ITerm2File`, `ITerm2MultipartFileStart`, etc.
19
- * @returns The fully formed ANSI escape sequence for the iTerm2 command.
20
- * Returns an empty string if the provided `payload` is invalid (e.g., null, undefined,
21
- * lacks a proper `toString` method, or its `toString` method is the generic `Object.prototype.toString`).
22
- * @see {@link https://iterm2.com/documentation-escape-codes.html iTerm2 Escape Codes Documentation}
23
- * for a comprehensive list of supported commands and their payloads.
24
- * @see {@link IITerm2Payload} for the interface requirement.
25
- * @see Classes like {@link ITerm2File}, {@link ITerm2MultipartFileStart}, {@link ITerm2FilePart}, {@link ITerm2FileEnd}
26
- * for concrete examples of payload objects.
27
- * @example
28
- * ```typescript
29
- * import { iTerm2, ITerm2File, ITerm2FileProps } from '@visulima/ansi/iterm2'; // ITerm2FileProps can be used for options
30
- * import { Buffer } from 'node:buffer';
31
- *
32
- * // Example 1: Sending a file inline (like an image)
33
- * const imageName = "my_image.png";
34
- * const imageData = Buffer.from("dummyimagecontent"); // Replace with actual Uint8Array image data
35
- * const imageFileProps: ITerm2FileProps = { // Use ITerm2FileProps for broader options
36
- * name: Buffer.from(imageName).toString("base64"), // Name should be base64 encoded
37
- * inline: true,
38
- * width: "50%",
39
- * height: "auto",
40
- * ignoreAspectRatio: false, // Equivalent to preserveAspectRatio: true
41
- * };
42
- * const filePayload = new ITerm2File(imageFileProps, imageData);
43
- * const imageSequence = iTerm2(filePayload);
44
- * console.log(imageSequence);
45
- * // Expected output (simplified, actual base64 will be longer):
46
- * // OSC1337;File=name=bXlfaW1hZ2UucG5n;inline=1;width=50%;height=auto:ZHVtbXlpbWFnZWNvbnRlbnQ=BEL
47
- * // Note: if ignoreAspectRatio was true, preserveAspectRatio=0 would be in the sequence.
48
- *
49
- * // Example 2: A hypothetical simple command (e.g., shell integration handshake)
50
- * const shellIntegrationPayload: IITerm2Payload = {
51
- * toString: () => "ShellIntegrationVersion=15;Shell=zsh"
52
- * };
53
- * const shellSequence = iTerm2(shellIntegrationPayload);
54
- * console.log(shellSequence);
55
- * // Output: OSC1337;ShellIntegrationVersion=15;Shell=zshBEL
56
- * ```
57
- */
58
- export declare const iTerm2: (payload: IITerm2Payload) => string;
1
+ import { LiteralUnion } from 'type-fest';
2
+ /**
3
+ * Represents the special string value `'auto'` used for iTerm2 image or file dimensions.
4
+ * When `'auto'` is used for width or height, the terminal (iTerm2) determines the appropriate dimension
5
+ * based on the image's inherent size or other context.
6
+ * @example `width: IT2_AUTO`
7
+ */
8
+ declare const IT2_AUTO: string;
9
+ /**
10
+ * Formats a number as a string representing a dimension in character cells for iTerm2.
11
+ * iTerm2 interprets plain numbers for width/height as character cell counts.
12
+ * @param n The number of character cells.
13
+ * @returns A string representation of the number (e.g., `10` becomes `"10"`).
14
+ * @example
15
+ * ```typescript
16
+ * const widthInCells = it2Cells(20); // "20"
17
+ * const sequence = `File=width=${widthInCells}`;
18
+ * ```
19
+ */
20
+ declare const it2Cells: (n: number) => string;
21
+ /**
22
+ * Formats a number as a string representing a dimension in pixels for iTerm2.
23
+ * Appends `px` to the number.
24
+ * @param n The number of pixels.
25
+ * @returns A string representing the dimension in pixels (e.g., `100` becomes `"100px"`).
26
+ * @example
27
+ * ```typescript
28
+ * const heightInPixels = it2Pixels(150);
29
+ * const sequence = `File=height=${heightInPixels}`;
30
+ * ```
31
+ */
32
+ declare const it2Pixels: (n: number) => string;
33
+ /**
34
+ * Formats a number as a string representing a dimension as a percentage for iTerm2.
35
+ * Appends `%` to the number.
36
+ * @param n The percentage value (e.g., `50` for 50%).
37
+ * @returns A string representing the dimension as a percentage (e.g., `50` becomes `"50%"`).
38
+ * @example
39
+ * ```typescript
40
+ * const widthAsPercentage = it2Percent(75);
41
+ * const sequence = `File=width=${widthAsPercentage}`;
42
+ * ```
43
+ */
44
+ declare const it2Percent: (n: number) => string;
45
+ /**
46
+ * Defines the interface for any iTerm2 OSC 1337 payload object.
47
+ *
48
+ * An OSC 1337 sequence has the general form: `OSC 1337 ; <payload_string> BEL`.
49
+ * Objects implementing this interface are responsible for generating that `<payload_string>`
50
+ * via their `toString()` method. This allows for a structured way to build various iTerm2 commands.
51
+ * @see `iTerm2` function in `iterm2.ts` which consumes objects of this type.
52
+ */
53
+ interface IITerm2Payload {
54
+ /**
55
+ * Converts the payload object into its specific string representation required for an iTerm2 OSC 1337 command.
56
+ * For example, for a file transfer, this might return `"File=name=...;size=...:content..."`.
57
+ * @returns The string payload part of the OSC 1337 sequence.
58
+ */
59
+ toString: () => string;
60
+ }
61
+ /**
62
+ * Defines the properties for an iTerm2 file transfer or inline image display command (`File=...`).
63
+ * These correspond to the key-value pairs used within the `File=` argument of the OSC 1337 sequence.
64
+ * @see {@link https://iterm2.com/documentation-escape-codes.html} iTerm2 Escape Codes (search for `File=`)
65
+ * @see {@link https://iterm2.com/documentation-images.html} iTerm2 Inline Images Protocol
66
+ */
67
+ interface ITerm2FileProperties {
68
+ /**
69
+ * The Base64 encoded content of the file or image.
70
+ * This is typically used when `inline=1` is set for images, or for transferring small files directly
71
+ * within the escape sequence. For larger files, multipart transfer is recommended.
72
+ * @remarks The `ITerm2File` class can handle the Base64 encoding of `Uint8Array` data automatically.
73
+ */
74
+ content?: string;
75
+ /**
76
+ * If `true`, instructs the terminal not to move the cursor after displaying an inline image.
77
+ * Corresponds to `doNotMoveCursor=1` in the sequence.
78
+ * This is a WezTerm extension, also supported by iTerm2 beta/nightly builds as of some versions.
79
+ * @default false (cursor behavior is default terminal behavior)
80
+ */
81
+ doNotMoveCursor?: boolean;
82
+ /**
83
+ * The display height of the image or file placeholder.
84
+ * Can be:
85
+ * - A number (interpreted as character cells, e.g., `10`).
86
+ * - A string with units: `"Npx"` (N pixels), `"N%"` (N percent of session height).
87
+ * - The string {@link IT2_AUTO} (`"auto"`) for automatic sizing.
88
+ * Use helper functions like {@link it2Cells}, {@link it2Pixels}, {@link it2Percent} for formatting if needed.
89
+ * @example `10`, `"100px"`, `"50%"`, `IT2_AUTO`
90
+ */
91
+ height?: LiteralUnion<typeof IT2_AUTO, number | string>;
92
+ /**
93
+ * Controls aspect ratio preservation for inline images.
94
+ * - If `true` (or omitted), the aspect ratio *is* preserved (`preserveAspectRatio=1`, which is the default iTerm2 behavior if the param is absent).
95
+ * - If `false`, the aspect ratio is *not* preserved, and the image may stretch (`preserveAspectRatio=0`).
96
+ * @remarks Note the slight inversion: this property `ignoreAspectRatio: true` means `preserveAspectRatio=0` in the sequence.
97
+ * The default iTerm2 behavior *is* to preserve aspect ratio if the `preserveAspectRatio` parameter is not given.
98
+ * So, to *not* preserve, you set this to true to *add* `preserveAspectRatio=0`.
99
+ * If you want to preserve (default), you can omit this or set it to `false`.
100
+ * @default false (meaning aspect ratio is preserved by iTerm2 default unless overridden)
101
+ */
102
+ ignoreAspectRatio?: boolean;
103
+ /**
104
+ * If `true`, the file (typically an image) should be displayed inline in the terminal.
105
+ * Corresponds to `inline=1` in the sequence.
106
+ * If `false` or omitted, iTerm2 might prompt for download or handle based on file type.
107
+ * @default false
108
+ */
109
+ inline?: boolean;
110
+ /**
111
+ * The name of the file. This is displayed in UI elements (like a download prompt or image info)
112
+ * and used as the default filename if downloaded.
113
+ * The name **must be Base64 encoded** if it contains special characters (like `;`, `=`, or non-ASCII characters)
114
+ * to ensure correct parsing of the escape sequence by iTerm2.
115
+ * The `ITerm2File` and `ITerm2MultipartFileStart` classes generally expect the name to be pre-encoded if necessary.
116
+ * @example `"bXlmaWxlLnR4dA=="` (Base64 for "myfile.txt")
117
+ */
118
+ name?: string;
119
+ /**
120
+ * The size of the file in bytes. This is used by iTerm2 for progress indication during downloads
121
+ * or to inform inline display mechanisms.
122
+ * JavaScript `number` type is generally sufficient for typical file sizes (up to `Number.MAX_SAFE_INTEGER`).
123
+ */
124
+ size?: number;
125
+ /**
126
+ * The display width of the image or file placeholder.
127
+ * Can be:
128
+ * - A number (interpreted as character cells, e.g., `20`).
129
+ * - A string with units: `"Npx"` (N pixels), `"N%"` (N percent of session width).
130
+ * - The string {@link IT2_AUTO} (`"auto"`) for automatic sizing.
131
+ * Use helper functions like {@link it2Cells}, {@link it2Pixels}, {@link it2Percent} for formatting if needed.
132
+ * @example `20`, `"200px"`, `"75%"`, `IT2_AUTO`
133
+ */
134
+ width?: LiteralUnion<typeof IT2_AUTO, number | string>;
135
+ }
136
+ /**
137
+ * Represents the payload for a complete iTerm2 file transfer or an inline image display command.
138
+ * This class is used to construct the part of the OSC 1337 sequence that follows `File=`.
139
+ * The generated payload can be either:
140
+ * - `File=[PROPERTIES]:[BASE64_CONTENT]` (for inline content)
141
+ * - `File=[PROPERTIES]` (if content is not provided directly, e.g., for a download announcement)
142
+ *
143
+ * Implements {@link IITerm2Payload} for use with the generic `iTerm2` function.
144
+ * @see {@link ITerm2FileProperties} for property details.
145
+ * @see `iTerm2` for the function that wraps this payload into a full escape sequence.
146
+ */
147
+ declare class ITerm2File implements IITerm2Payload {
148
+ private readonly fileProps;
149
+ /**
150
+ * Constructs an `ITerm2File` payload object.
151
+ * @param properties An object containing properties for the file/image, as defined by {@link ITerm2FileProperties}.
152
+ * The `name` property within `props` should be pre-Base64 encoded by the caller if it might
153
+ * contain special characters (like `;`, `=`, or non-ASCII characters).
154
+ * If `fileData` is provided, `props.content` will be overridden, and `props.size` will be
155
+ * set from `fileData.byteLength` if not already present in `props`.
156
+ * @param fileData (Optional) A `Uint8Array` containing the raw file data. If provided, this data will be
157
+ * Base64 encoded and used as the `content` of the file transfer. The `size` property
158
+ * will also be automatically set from `fileData.byteLength` if not specified in `props`.
159
+ */
160
+ constructor(properties: ITerm2FileProperties, fileData?: Uint8Array);
161
+ /**
162
+ * Converts the file properties and its content (if any) into the string payload
163
+ * suitable for the iTerm2 `File=` command.
164
+ * @returns The string payload (e.g., `"File=name=...;size=...:BASE64_CONTENT"` or `"File=name=...;size=..."`).
165
+ */
166
+ toString(): string;
167
+ }
168
+ /**
169
+ * Represents the payload for ending an iTerm2 multipart file transfer.
170
+ * This class is used to construct the part of the OSC 1337 sequence that is simply `FileEnd`.
171
+ *
172
+ * Implements {@link IITerm2Payload} for use with the generic `iTerm2` function.
173
+ * @see {@link ITerm2MultipartFileStart} to initiate the transfer.
174
+ * @see {@link ITerm2FilePart} for sending file chunks.
175
+ */
176
+ declare class ITerm2FileEnd implements IITerm2Payload {
177
+ /**
178
+ * Generates the string payload for the iTerm2 `FileEnd` command.
179
+ * @returns The string `"FileEnd"`.
180
+ */
181
+ toString(): string;
182
+ }
183
+ /**
184
+ * Represents the payload for a part (chunk) of an iTerm2 multipart file transfer.
185
+ * This class is used to construct the part of the OSC 1337 sequence that follows `FilePart=`.
186
+ * The provided chunk must already be Base64 encoded.
187
+ *
188
+ * Implements {@link IITerm2Payload} for use with the generic `iTerm2` function.
189
+ * @see {@link ITerm2MultipartFileStart} to initiate the transfer.
190
+ * @see {@link ITerm2FileEnd} to finalize the transfer.
191
+ */
192
+ declare class ITerm2FilePart implements IITerm2Payload {
193
+ private readonly base64Chunk;
194
+ /**
195
+ * Constructs an `ITerm2FilePart` payload object.
196
+ * @param base64Chunk A string containing a Base64 encoded chunk of the file data.
197
+ * The caller is responsible for chunking the file and Base64 encoding each chunk.
198
+ */
199
+ constructor(base64Chunk: string);
200
+ /**
201
+ * Converts the Base64 encoded chunk into the string payload suitable for the iTerm2 `FilePart=` command.
202
+ * @returns The string payload (e.g., `"FilePart=U09NRURBVEE="`).
203
+ */
204
+ toString(): string;
205
+ }
206
+ /**
207
+ * Represents the payload for starting an iTerm2 multipart file transfer.
208
+ * This class is used to construct the part of the OSC 1337 sequence that follows `MultipartFile=`.
209
+ * This command initiates a transfer; the actual file data is sent in subsequent `FilePart` commands.
210
+ *
211
+ * Implements {@link IITerm2Payload} for use with the generic `iTerm2` function.
212
+ * @see {@link ITerm2FileProperties} for property details (omitting `content`).
213
+ * @see {@link ITerm2FilePart} for sending file chunks.
214
+ * @see {@link ITerm2FileEnd} for finalizing the transfer.
215
+ */
216
+ declare class ITerm2MultipartFileStart implements IITerm2Payload {
217
+ private readonly properties;
218
+ /**
219
+ * Constructs an `ITerm2MultipartFileStart` payload object.
220
+ * @param properties Properties for the multipart file (e.g., `name`, `size`). Content is not part of this command.
221
+ * The `name` property within `props` should be pre-Base64 encoded by the caller if it might
222
+ * contain special characters.
223
+ */
224
+ constructor(properties: Omit<ITerm2FileProperties, "content">);
225
+ /**
226
+ * Converts the file properties into the string payload suitable for the iTerm2 `MultipartFile=` command.
227
+ * @returns The string payload (e.g., `"MultipartFile=name=...;size=..."`).
228
+ */
229
+ toString(): string;
230
+ }
231
+ /**
232
+ * Generates a complete iTerm2 proprietary escape sequence (OSC 1337).
233
+ *
234
+ * This function serves as a general-purpose constructor for iTerm2 escape codes.
235
+ * It takes a payload object that conforms to the {@link IITerm2Payload} interface.
236
+ * The `toString()` method of this payload object is responsible for generating the
237
+ * specific command and arguments part of the sequence (e.g., `File=...`, `ShellIntegrationVersion=...`).
238
+ *
239
+ * The overall structure of the generated sequence is: `OSC 1337 ; &lt;PAYLOAD_STRING> BEL`
240
+ * (`OSC` is `\x1b]`, `BEL` is `\x07`).
241
+ * @param payload An object that implements the {@link IITerm2Payload} interface.
242
+ * This object must have a `toString()` method that returns the string representation
243
+ * of the iTerm2 command-specific payload.
244
+ * Examples include instances of `ITerm2File`, `ITerm2MultipartFileStart`, etc.
245
+ * @returns The fully formed ANSI escape sequence for the iTerm2 command.
246
+ * Returns an empty string if the provided `payload` is invalid (e.g., null, undefined,
247
+ * lacks a proper `toString` method, or its `toString` method is the generic `Object.prototype.toString`).
248
+ * @see {@link https://iterm2.com/documentation-escape-codes.html iTerm2 Escape Codes Documentation}
249
+ * for a comprehensive list of supported commands and their payloads.
250
+ * @see {@link IITerm2Payload} for the interface requirement.
251
+ * @see Classes like {@link ITerm2File}, {@link ITerm2MultipartFileStart}, {@link ITerm2FilePart}, {@link ITerm2FileEnd}
252
+ * for concrete examples of payload objects.
253
+ * @example
254
+ * ```typescript
255
+ * import { iTerm2, ITerm2File, ITerm2FileProps } from '@visulima/ansi/iterm2'; // ITerm2FileProps can be used for options
256
+ * import { Buffer } from 'node:buffer';
257
+ *
258
+ * // Example 1: Sending a file inline (like an image)
259
+ * const imageName = "my_image.png";
260
+ * const imageData = Buffer.from("dummyimagecontent"); // Replace with actual Uint8Array image data
261
+ * const imageFileProps: ITerm2FileProps = { // Use ITerm2FileProps for broader options
262
+ * name: Buffer.from(imageName).toString("base64"), // Name should be base64 encoded
263
+ * inline: true,
264
+ * width: "50%",
265
+ * height: "auto",
266
+ * ignoreAspectRatio: false, // Equivalent to preserveAspectRatio: true
267
+ * };
268
+ * const filePayload = new ITerm2File(imageFileProps, imageData);
269
+ * const imageSequence = iTerm2(filePayload);
270
+ * console.log(imageSequence);
271
+ * // Expected output (simplified, actual base64 will be longer):
272
+ * // OSC1337;File=name=bXlfaW1hZ2UucG5n;inline=1;width=50%;height=auto:ZHVtbXlpbWFnZWNvbnRlbnQ=BEL
273
+ * // Note: if ignoreAspectRatio was true, preserveAspectRatio=0 would be in the sequence.
274
+ *
275
+ * // Example 2: A hypothetical simple command (e.g., shell integration handshake)
276
+ * const shellIntegrationPayload: IITerm2Payload = {
277
+ * toString: () => "ShellIntegrationVersion=15;Shell=zsh"
278
+ * };
279
+ * const shellSequence = iTerm2(shellIntegrationPayload);
280
+ * console.log(shellSequence);
281
+ * // Output: OSC1337;ShellIntegrationVersion=15;Shell=zshBEL
282
+ * ```
283
+ */
284
+ declare const iTerm2: (payload: IITerm2Payload) => string;
285
+ export { type IITerm2Payload, IT2_AUTO, ITerm2File, ITerm2FileEnd, ITerm2FilePart, type ITerm2FileProperties, ITerm2MultipartFileStart, iTerm2, it2Cells, it2Percent, it2Pixels };
package/dist/iterm2.js CHANGED
@@ -1,12 +1 @@
1
- import { O as OSC, B as BEL } from './packem_shared/constants-CE7WkXh_.js';
2
- export { IT2_AUTO, it2Cells, it2Percent, it2Pixels } from './packem_shared/IT2_AUTO-DyYWsxno.js';
3
- export { ITerm2File, ITerm2FileEnd, ITerm2FilePart, ITerm2MultipartFileStart } from './packem_shared/ITerm2File-CUZDBk99.js';
4
-
5
- const iTerm2 = (payload) => {
6
- if (payload.toString === Object.prototype.toString) {
7
- throw new Error("Invalid payload: must implement IITerm2Payload with a custom toString method");
8
- }
9
- return `${OSC}1337;${payload.toString()}${BEL}`;
10
- };
11
-
12
- export { iTerm2 };
1
+ var i=Object.defineProperty;var r=(t,e)=>i(t,"name",{value:e,configurable:!0});import{O as o,B as m}from"./packem_shared/constants-D12jy2Zh.js";import{IT2_AUTO as u,it2Cells as c,it2Percent as d,it2Pixels as f}from"./packem_shared/IT2_AUTO-OiB8EaxU.js";import{ITerm2File as g,ITerm2FileEnd as O,ITerm2FilePart as P,ITerm2MultipartFileStart as v}from"./packem_shared/ITerm2File-XoC8RMzs.js";var a=Object.defineProperty,l=r((t,e)=>a(t,"name",{value:e,configurable:!0}),"e");const T=l(t=>{if(t.toString===Object.prototype.toString)throw new Error("Invalid payload: must implement IITerm2Payload with a custom toString method");return`${o}1337;${t.toString()}${m}`},"iTerm2");export{u as IT2_AUTO,g as ITerm2File,O as ITerm2FileEnd,P as ITerm2FilePart,v as ITerm2MultipartFileStart,T as iTerm2,c as it2Cells,d as it2Percent,f as it2Pixels};