mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Changed global file for iTXt
This commit is contained in:
parent
25a0c34cb9
commit
04d0b00b95
1 changed files with 20 additions and 2 deletions
22
packages/excalidraw/global.d.ts
vendored
22
packages/excalidraw/global.d.ts
vendored
|
@ -33,6 +33,7 @@ interface Clipboard extends EventTarget {
|
|||
// PNG encoding/decoding
|
||||
// -----------------------------------------------------------------------------
|
||||
type TEXtChunk = { name: "tEXt"; data: Uint8Array };
|
||||
type ITXtChunk = { name: "iTXt"; data: Uint8Array };
|
||||
|
||||
declare module "png-chunk-text" {
|
||||
function encode(
|
||||
|
@ -41,12 +42,29 @@ declare module "png-chunk-text" {
|
|||
): { name: "tEXt"; data: Uint8Array };
|
||||
function decode(data: Uint8Array): { keyword: string; text: string };
|
||||
}
|
||||
|
||||
declare module "png-chunk-itxt" {
|
||||
function encode(
|
||||
keyword: string,
|
||||
text: string,
|
||||
options?: { compressed?: boolean; language?: string; translated?: string },
|
||||
): { name: "iTXt"; data: Uint8Array };
|
||||
function decode(data: Uint8Array): {
|
||||
keyword: string;
|
||||
text: string;
|
||||
language?: string;
|
||||
translated?: string;
|
||||
};
|
||||
export { encode, decode };
|
||||
}
|
||||
|
||||
declare module "png-chunks-encode" {
|
||||
function encode(chunks: TEXtChunk[]): Uint8Array;
|
||||
function encode(chunks: (TEXtChunk | ITXtChunk)[]): Uint8Array;
|
||||
export = encode;
|
||||
}
|
||||
|
||||
declare module "png-chunks-extract" {
|
||||
function extract(buffer: Uint8Array): TEXtChunk[];
|
||||
function extract(buffer: Uint8Array): (TEXtChunk | ITXtChunk)[];
|
||||
export = extract;
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue