@opentui/core 0.5.9 → 0.5.11
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 +2 -0
- package/audio.d.ts +6 -1
- package/{chunk-bun-b0662dgp.js → chunk-bun-37s3zwb6.js} +1216 -1038
- package/{chunk-bun-b0662dgp.js.map → chunk-bun-37s3zwb6.js.map} +7 -7
- package/{chunk-bun-jxfx3h5k.js → chunk-bun-bwjmgnxw.js} +773 -621
- package/chunk-bun-bwjmgnxw.js.map +32 -0
- package/{chunk-node-dcyj0dm5.js → chunk-node-54dhb2fr.js} +773 -621
- package/chunk-node-54dhb2fr.js.map +32 -0
- package/{chunk-node-zcz10bhr.js → chunk-node-70eg2nhg.js} +1223 -1042
- package/chunk-node-70eg2nhg.js.map +63 -0
- package/image.d.ts +25 -1
- package/index.bun.js +1642 -1374
- package/index.bun.js.map +8 -8
- package/index.node.js +1642 -1374
- package/index.node.js.map +8 -8
- package/lib/detect-links.d.ts +5 -0
- package/lib/tree-sitter/update-assets.js +4 -4
- package/lib/tree-sitter/update-assets.js.map +2 -2
- package/lib/tree-sitter-styled-text.d.ts +4 -0
- package/package.json +13 -9
- package/parser.worker.js +7 -10
- package/parser.worker.js.map +2 -2
- package/renderables/Code.d.ts +6 -0
- package/renderables/Diff.d.ts +1 -2
- package/renderables/Markdown.d.ts +6 -0
- package/renderables/TextBufferRenderable.d.ts +2 -0
- package/renderer.d.ts +23 -2
- package/testing.bun.js +23 -23
- package/testing.bun.js.map +2 -2
- package/testing.js +23 -23
- package/testing.js.map +2 -2
- package/text-buffer-view.d.ts +1 -0
- package/types.d.ts +1 -0
- package/yoga.bun.js +187 -187
- package/yoga.bun.js.map +1 -1
- package/yoga.js +187 -187
- package/yoga.js.map +1 -1
- package/zig-structs.d.ts +8 -1
- package/zig.d.ts +15 -1
- package/chunk-bun-jxfx3h5k.js.map +0 -32
- package/chunk-node-dcyj0dm5.js.map +0 -32
- package/chunk-node-zcz10bhr.js.map +0 -63
package/image.d.ts
CHANGED
|
@@ -62,10 +62,16 @@ export interface RawImage {
|
|
|
62
62
|
colorSpace: "srgb";
|
|
63
63
|
alpha: "straight";
|
|
64
64
|
}
|
|
65
|
+
export interface PixelImportOptions {
|
|
66
|
+
stride?: number;
|
|
67
|
+
format?: PixelFormat;
|
|
68
|
+
alpha?: "straight" | "opaque";
|
|
69
|
+
colorSpace?: "srgb";
|
|
70
|
+
}
|
|
65
71
|
export interface OwnedRawImage extends RawImage {
|
|
66
72
|
dispose(): void;
|
|
67
73
|
}
|
|
68
|
-
export type ImageErrorCode = "invalid-handle" | "unsupported-format" | "unsupported-color-space" | "malformed-data" | "dimension-limit" | "memory-limit" | "invalid-argument" | "out-of-memory" | "output-too-small" | "internal-error" | "unsupported-feature";
|
|
74
|
+
export type ImageErrorCode = "invalid-handle" | "unsupported-format" | "unsupported-color-space" | "malformed-data" | "dimension-limit" | "memory-limit" | "invalid-argument" | "out-of-memory" | "output-too-small" | "internal-error" | "unsupported-feature" | "busy";
|
|
69
75
|
export declare class ImageError extends Error {
|
|
70
76
|
readonly code: ImageErrorCode;
|
|
71
77
|
readonly status: number;
|
|
@@ -80,6 +86,7 @@ export declare class NativeImage {
|
|
|
80
86
|
static decode(data: Uint8Array | ArrayBuffer): NativeImage;
|
|
81
87
|
static load(source: ImageSource, options?: ImageLoadOptions): Promise<NativeImage>;
|
|
82
88
|
static fromRgba(pixels: Uint8Array, width: number, height: number, stride?: number): NativeImage;
|
|
89
|
+
static fromPixels(pixels: Uint8Array, width: number, height: number, options?: PixelImportOptions): NativeImage;
|
|
83
90
|
private static fromHandle;
|
|
84
91
|
private guard;
|
|
85
92
|
get ptr(): ImageHandle;
|
|
@@ -105,3 +112,20 @@ export declare class NativeImage {
|
|
|
105
112
|
}): void;
|
|
106
113
|
dispose(): void;
|
|
107
114
|
}
|
|
115
|
+
export interface NativeImagePoolOptions {
|
|
116
|
+
width: number;
|
|
117
|
+
height: number;
|
|
118
|
+
capacity?: number;
|
|
119
|
+
}
|
|
120
|
+
export declare class NativeImagePool {
|
|
121
|
+
private readonly lib;
|
|
122
|
+
private readonly images;
|
|
123
|
+
private disposed;
|
|
124
|
+
readonly width: number;
|
|
125
|
+
readonly height: number;
|
|
126
|
+
readonly capacity: number;
|
|
127
|
+
constructor(options: NativeImagePoolOptions);
|
|
128
|
+
publishRgba(pixels: Uint8Array, stride?: number): NativeImage | null;
|
|
129
|
+
publishPixels(pixels: Uint8Array, options?: PixelImportOptions): NativeImage | null;
|
|
130
|
+
dispose(): void;
|
|
131
|
+
}
|