@sdeck/core 0.0.0-stage → 0.1.0

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/dist/deck.d.ts ADDED
@@ -0,0 +1,166 @@
1
+ import { type ElementOptions, type ElementRoot, type RawImage, type Size } from "./element.ts";
2
+ import { type Rect, type RGB } from "./framebuffer.ts";
3
+ import { type ImageOptions, type ImageSource } from "./image.ts";
4
+ import type { Renderable } from "./index.ts";
5
+ import { type DeckLayout, type ScreenLayout } from "./layout.ts";
6
+ import type { HidTransport } from "./transport.ts";
7
+ /** Static description of a Stream Deck model. */
8
+ export interface DeckModel {
9
+ /** Short identifier, e.g. `"neo"`. */
10
+ id: string;
11
+ /** Marketing name, e.g. `"Stream Deck Neo"`. */
12
+ name: string;
13
+ vendorId: number;
14
+ productId: number;
15
+ /** Pixel geometry of the LCD: keys, sensor strips, window. */
16
+ layout: DeckLayout;
17
+ /**
18
+ * The sizes live elements are designed for. A slot larger than its design size draws the same
19
+ * content larger; the extra room along one side is layout space. Without this, elements are
20
+ * laid out at the slot's own pixels.
21
+ */
22
+ design?: Readonly<{
23
+ key?: Size;
24
+ sensor?: Size;
25
+ window?: Size;
26
+ }>;
27
+ /** Rotation the device expects images in. */
28
+ rotation: 0 | 180;
29
+ }
30
+ export interface DeckEvents {
31
+ /** A key was pressed. */
32
+ keyDown: [index: number];
33
+ /** A key was released. */
34
+ keyUp: [index: number];
35
+ /** A capacitive sensor was touched. */
36
+ sensorDown: [index: number];
37
+ /** A capacitive sensor was released. */
38
+ sensorUp: [index: number];
39
+ /** Pixels reached the device: the region (upright screen coordinates) that was written. */
40
+ draw: [region: Rect];
41
+ error: [error: Error];
42
+ }
43
+ type Listener<K extends keyof DeckEvents> = (...args: DeckEvents[K]) => void;
44
+ /** Options for `mountKey`, `mountSensor`, `mountWindow` and `mountScreen`. */
45
+ export type MountOptions = ElementOptions & Pick<ImageOptions, "quality" | "background">;
46
+ export declare const toError: (error: unknown) => Error;
47
+ /**
48
+ * Base class of every supported Stream Deck. A model implements the device protocol (the
49
+ * `send*` primitives and input parsing); this class provides everything else: events,
50
+ * serialised writes, image conversion, sensor strips, full-screen layouts and live elements.
51
+ *
52
+ * The deck keeps a framebuffer of what is on the LCD. That makes sensor strips cheap (a strip
53
+ * redraw re-encodes the framebuffer instead of every slot), lets anything drawn survive a strip
54
+ * redraw, skips updates that would not change any pixel, and backs {@link snapshot}.
55
+ */
56
+ export declare abstract class StreamDeck {
57
+ #private;
58
+ readonly model: DeckModel;
59
+ protected readonly transport: HidTransport;
60
+ protected constructor(transport: HidTransport, model: DeckModel);
61
+ get keyCount(): number;
62
+ get sensorCount(): number;
63
+ get keySize(): Size;
64
+ get sensorSize(): Size;
65
+ get windowSize(): Size;
66
+ get screenSize(): Size;
67
+ get closed(): boolean;
68
+ /**
69
+ * How a live element on a slot is drawn: `size` is the room it lays out in, and `scale` how
70
+ * many times larger that appears (see {@link DeckModel.design}).
71
+ */
72
+ slotDrawing(kind: "key" | "sensor" | "window", index?: number): {
73
+ size: Size;
74
+ scale: number;
75
+ };
76
+ on<K extends keyof DeckEvents>(event: K, listener: Listener<K>): () => void;
77
+ off<K extends keyof DeckEvents>(event: K, listener: Listener<K>): void;
78
+ protected emit<K extends keyof DeckEvents>(event: K, ...args: DeckEvents[K]): void;
79
+ /** Parses an input report into pressed states: keys first, then sensors. */
80
+ protected abstract parseInput(data: Uint8Array): boolean[] | undefined;
81
+ protected abstract sendKeyJpeg(index: number, jpeg: Uint8Array): Promise<void>;
82
+ protected abstract sendScreenJpeg(jpeg: Uint8Array): Promise<void>;
83
+ protected sendWindowJpeg(_jpeg: Uint8Array): Promise<void>;
84
+ /** Sends a JPEG to part of the window; `region` is relative to the window. */
85
+ protected sendWindowRegionJpeg(_region: Rect, _jpeg: Uint8Array): Promise<void>;
86
+ /** Fills a key with a colour. Override if the model has a command for it. */
87
+ protected sendFillKey(index: number, color: RGB): Promise<void>;
88
+ /** Fills the screen with a colour. Override if the model has a command for it. */
89
+ protected sendFillScreen(color: RGB): Promise<void>;
90
+ /** Runs (queued, before the transport closes) when `close()` is called, e.g. to show a logo. */
91
+ protected onClosing(): Promise<void>;
92
+ /** @param percent 0 – 100 */
93
+ abstract setBrightness(percent: number): Promise<void>;
94
+ /** Forcibly shows the boot logo. */
95
+ abstract showLogo(): Promise<void>;
96
+ abstract getSerialNumber(): Promise<string>;
97
+ /** Round trip to the device; rejects if it does not answer. Used to detect a lost deck. */
98
+ ping(): Promise<void>;
99
+ /** Sets a key image (scaled to the key size). */
100
+ setKeyImage(index: number, image: ImageSource, options?: ImageOptions): Promise<void>;
101
+ /** Sets the window image (scaled to the window size). */
102
+ setWindowImage(image: ImageSource, options?: ImageOptions): Promise<void>;
103
+ /**
104
+ * Updates part of the window. `region` is relative to the window; the image is scaled to
105
+ * `region.width`×`region.height`. Not every model supports this.
106
+ */
107
+ setWindowRegionImage(region: Rect, image: ImageSource, options?: ImageOptions): Promise<void>;
108
+ /**
109
+ * Sets a sensor indicator strip. Elgato documents no command for the strips, so this sends a
110
+ * full-screen frame (about 26 fps at best) of everything on screen. Strip updates that arrive
111
+ * while a frame is being sent are merged into the next one.
112
+ */
113
+ setSensorImage(index: number, image: ImageSource, options?: ImageOptions): Promise<void>;
114
+ /** Sets the full LCD image (scaled to the screen size). */
115
+ setScreenImage(image: ImageSource, options?: ImageOptions): Promise<void>;
116
+ /**
117
+ * Draws keys, sensor strips and the window in a single full-screen update. Anything omitted
118
+ * becomes the background colour.
119
+ */
120
+ setScreenLayout(layout: ScreenLayout, options?: ImageOptions): Promise<void>;
121
+ /** Fills a key with a solid colour. */
122
+ fillKey(index: number, color: RGB): Promise<void>;
123
+ /** Fills the whole LCD with a solid colour. */
124
+ fillScreen(color: RGB): Promise<void>;
125
+ /** Sends a JPEG that is already key-sized (and rotated as the device needs) to a key. */
126
+ setKeyJpeg(index: number, jpeg: Uint8Array): Promise<void>;
127
+ /** Sends a screen-sized, device-rotated JPEG to the LCD as-is. */
128
+ setScreenJpeg(jpeg: Uint8Array): Promise<void>;
129
+ /** Sends a window-sized, device-rotated JPEG to the window as-is. */
130
+ setWindowJpeg(jpeg: Uint8Array): Promise<void>;
131
+ /** Sends a `region.width`×`region.height`, device-rotated JPEG to part of the window as-is. */
132
+ setWindowRegionJpeg(region: Rect, jpeg: Uint8Array): Promise<void>;
133
+ /** Upright RGB pixels of what the deck shows (or will, once queued writes finish). */
134
+ readScreen(region?: Rect): RawImage;
135
+ /** A PNG of what the deck shows (or will, once queued writes finish). */
136
+ snapshot(region?: Rect): Promise<Uint8Array>;
137
+ /**
138
+ * Mounts a live element tree on a key. Unlike `setKeyImage(index, <El />)`, which renders once,
139
+ * the key redraws whenever the tree's state changes, so hooks, effects, context and timers
140
+ * all work. Resolves after the first frame is drawn. Roots are unmounted by `close()`.
141
+ * Needs a renderer: import `@sdeck/react`.
142
+ */
143
+ mountKey(index: number, element: Renderable, options?: MountOptions): Promise<ElementRoot>;
144
+ /**
145
+ * Mounts a live element tree on a sensor indicator strip. See {@link setSensorImage} for how
146
+ * strip frames are sent and `mountKey` for live roots.
147
+ */
148
+ mountSensor(index: number, element: Renderable, options?: MountOptions): Promise<ElementRoot>;
149
+ /** Mounts a live element tree on the window. See `mountKey`. */
150
+ mountWindow(element: Renderable, options?: MountOptions): Promise<ElementRoot>;
151
+ /**
152
+ * Mounts a live element tree on the whole screen (keys, sensor strips and window in one
153
+ * layout). Full-screen updates are device-bound at about 26 fps, so prefer `mountKey` /
154
+ * `mountWindow` for things that change often. See `mountKey`.
155
+ */
156
+ mountScreen(element: Renderable, options?: MountOptions): Promise<ElementRoot>;
157
+ /** Unmounts live roots, lets the model tidy up (e.g. restore the boot logo) and closes the device. */
158
+ close(): Promise<void>;
159
+ protected assertKey(index: number): void;
160
+ protected assertSensor(index: number): void;
161
+ /** Runs `task` after every earlier write, so multi-packet uploads never interleave. */
162
+ protected enqueue<T>(task: () => Promise<T>): Promise<T>;
163
+ protected enqueueUnchecked<T>(task: () => Promise<T>): Promise<T>;
164
+ }
165
+ export {};
166
+ //# sourceMappingURL=deck.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deck.d.ts","sourceRoot":"","sources":["../src/deck.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,WAAW,EAEhB,KAAK,QAAQ,EACb,KAAK,IAAI,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAe,KAAK,IAAI,EAAE,KAAK,GAAG,EAAY,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAc,KAAK,YAAY,EAAE,KAAK,WAAW,EAAS,MAAM,YAAY,CAAC;AACpF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAoB,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,iDAAiD;AACjD,MAAM,WAAW,SAAS;IACxB,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,MAAM,EAAE,UAAU,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;QAAE,GAAG,CAAC,EAAE,IAAI,CAAC;QAAC,MAAM,CAAC,EAAE,IAAI,CAAC;QAAC,MAAM,CAAC,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;IAChE,6CAA6C;IAC7C,QAAQ,EAAE,CAAC,GAAG,GAAG,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,yBAAyB;IACzB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACzB,0BAA0B;IAC1B,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;I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S,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAM1C;IAED,uFAAuF;IACvF,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAGvD;IAED,SAAS,CAAC,gBAAgB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAIhE;CAmBF"}
@@ -0,0 +1,59 @@
1
+ import type { DeckModel, StreamDeck } from "./deck.ts";
2
+ import { type HidTransport, type NodeHidDevice } from "./transport.ts";
3
+ /** The fields of a `node-hid` device description used for detection. */
4
+ export interface HidDeviceInfo {
5
+ vendorId: number;
6
+ productId: number;
7
+ path?: string | undefined;
8
+ serialNumber?: string | undefined;
9
+ }
10
+ /** The part of `node-hid` used for detection. Injectable for testing. */
11
+ export interface HidBackend {
12
+ devices(): HidDeviceInfo[];
13
+ devicesAsync?(): Promise<HidDeviceInfo[]>;
14
+ HID: new (path: string) => NodeHidDevice;
15
+ }
16
+ /** Knows how to recognise one Stream Deck model on USB and drive it. */
17
+ export interface DeckDriver<D extends StreamDeck = StreamDeck> {
18
+ readonly model: Pick<DeckModel, "id" | "name" | "vendorId" | "productId">;
19
+ create(transport: HidTransport): D;
20
+ }
21
+ export interface DeckInfo<D extends StreamDeck = StreamDeck> {
22
+ /** OS-level device path; pass to {@link OpenOptions.path} to select this device. */
23
+ path: string;
24
+ serialNumber?: string | undefined;
25
+ driver: DeckDriver<D>;
26
+ }
27
+ export interface OpenOptions {
28
+ /** Only open the device with this path. */
29
+ path?: string;
30
+ /** Only open the device with this serial number (as reported by the OS). */
31
+ serialNumber?: string;
32
+ /**
33
+ * Keep looking until a matching deck is connected (default `true`). With `false`,
34
+ * rejects immediately if none is found.
35
+ */
36
+ wait?: boolean;
37
+ /** How often to rescan while waiting, in milliseconds (default 1000). */
38
+ pollIntervalMs?: number;
39
+ /** Give up waiting after this many milliseconds (default: wait forever). */
40
+ timeoutMs?: number;
41
+ /** Abort the wait; opening then rejects with the signal's reason. */
42
+ signal?: AbortSignal;
43
+ /** Use a different `node-hid` implementation (for testing). */
44
+ hid?: HidBackend;
45
+ }
46
+ /** Filters raw HID device descriptions down to supported decks, de-duplicated by path. */
47
+ export declare function findDecks<D extends StreamDeck>(devices: readonly HidDeviceInfo[], drivers: DeckDriver<D> | readonly DeckDriver<D>[]): DeckInfo<D>[];
48
+ /** Lists the supported decks connected right now. */
49
+ export declare function listDecks<D extends StreamDeck>(drivers: DeckDriver<D> | readonly DeckDriver<D>[], options?: Pick<OpenOptions, "hid">): Promise<DeckInfo<D>[]>;
50
+ /**
51
+ * Opens a connected Stream Deck of one of the given models, waiting for one to be plugged in
52
+ * if necessary.
53
+ *
54
+ * Opens the first deck found, or the one matching `path`/`serialNumber`. Failures to
55
+ * open a detected deck (for example it is busy because Elgato's app holds it) are
56
+ * retried like "not found" while waiting.
57
+ */
58
+ export declare function openDeck<D extends StreamDeck>(drivers: DeckDriver<D> | readonly DeckDriver<D>[], options?: OpenOptions): Promise<D>;
59
+ //# sourceMappingURL=detect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../src/detect.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAe,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpF,wEAAwE;AACxE,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC;AAED,yEAAyE;AACzE,MAAM,WAAW,UAAU;IACzB,OAAO,IAAI,aAA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SAAS,CAAC,CAAC,SAAS,UAAU,EAClD,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,UAAU,CAAC,CAAC,CAAC,EAAE,EACjD,OAAO,GAAE,IAAI,CAAC,WAAW,EAAE,KAAK,CAAM,GACrC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAGxB;AA8BD;;;;;;;GAOG;AACH,wBAAsB,QAAQ,CAAC,CAAC,SAAS,UAAU,EACjD,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,UAAU,CAAC,CAAC,CAAC,EAAE,EACjD,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,CAAC,CAAC,CA6BZ"}
@@ -0,0 +1,60 @@
1
+ import type { Renderable } from "./index.ts";
2
+ export interface Size {
3
+ width: number;
4
+ height: number;
5
+ }
6
+ /** Decoded pixels: 3 (RGB) or 4 (RGBA) interleaved 8-bit channels. */
7
+ export interface RawImage {
8
+ data: Uint8Array;
9
+ width: number;
10
+ height: number;
11
+ channels: 3 | 4;
12
+ }
13
+ export declare const isRawImage: (value: unknown) => value is RawImage;
14
+ /** A font for rendering text in elements (TTF, OTF or WOFF; not WOFF2). */
15
+ export interface DeckFont {
16
+ name: string;
17
+ data: Uint8Array | ArrayBuffer;
18
+ weight?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
19
+ style?: "normal" | "italic";
20
+ }
21
+ export interface ElementOptions {
22
+ /** Extra fonts for text (a renderer has a built-in fallback font). */
23
+ fonts?: readonly DeckFont[];
24
+ /** Called when rendering or sending a frame fails after the initial render (default: log). */
25
+ onError?: (error: unknown) => void;
26
+ /**
27
+ * Draws everything this many times larger: the element is laid out at the target size divided
28
+ * by `scale` (default 1).
29
+ */
30
+ scale?: number;
31
+ /** Set `false` to draw no text at all, whatever the element holds (default `true`). */
32
+ text?: boolean;
33
+ }
34
+ /**
35
+ * A live element tree that redraws its target whenever its state changes. Frames are coalesced:
36
+ * if state changes while one is being sent, only the latest is drawn next.
37
+ */
38
+ export interface ElementRoot {
39
+ /** Renders `element` (replacing the previous one, keeping state where types match). */
40
+ render(element: Renderable): void;
41
+ /** Resolves once every pending frame has been drawn. */
42
+ idle(): Promise<void>;
43
+ /** Unmounts the tree (running cleanups) and stops drawing. */
44
+ unmount(): Promise<void>;
45
+ }
46
+ /** What a renderer package (such as `@sdeck/react`) provides to the core. */
47
+ export interface ElementRuntime {
48
+ /** True if `value` is an element this runtime can draw. */
49
+ matches(value: unknown): boolean;
50
+ /** Renders `element` once to upright pixels of exactly `size`. */
51
+ render(element: Renderable, size: Size, options?: ElementOptions): Promise<RawImage>;
52
+ /** Mounts a live tree; every change is passed to `onFrame` as upright pixels of `size`. */
53
+ createRoot(size: Size, onFrame: (frame: RawImage) => void | Promise<void>, options?: ElementOptions): Promise<ElementRoot>;
54
+ }
55
+ /** Registers the renderer used for elements. `@sdeck/react` does this when imported. */
56
+ export declare function registerElementRuntime(next: ElementRuntime): void;
57
+ export declare function getElementRuntime(): ElementRuntime;
58
+ /** True for elements the registered renderer can draw (false if none is registered). */
59
+ export declare const isRenderable: (value: unknown) => value is Renderable;
60
+ //# sourceMappingURL=element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,sEAAsE;AACtE,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,UAAW,OAAO,KAAG,KAAK,IAAI,QAOhC,CAAC;AAEtB,2EAA2E;AA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AAC,WAAW,CAAC,CAAC;CACzB;AAID,wFAAwF;AACxF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAEjE;AAED,wBAAgB,iBAAiB,IAAI,cAAc,CAOlD;AAED,wFAAwF;AACxF,eAAO,MAAM,YAAY,UAAW,OAAO,KAAG,KAAK,IAAI,UACyC,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { RawImage, Size } from "./element.ts";
2
+ export type RGB = readonly [red: number, green: number, blue: number];
3
+ /** A rectangle in screen pixels. */
4
+ export interface Rect extends Size {
5
+ x: number;
6
+ y: number;
7
+ }
8
+ /**
9
+ * Upright RGB pixels of a whole screen. A deck keeps one as its record of what is on the LCD, so
10
+ * a full-screen frame (the only way to draw sensor strips) is a single encode, and unchanged
11
+ * updates can be skipped.
12
+ */
13
+ export declare class Framebuffer {
14
+ #private;
15
+ readonly width: number;
16
+ readonly height: number;
17
+ readonly data: Uint8Array;
18
+ constructor(size: Size);
19
+ /** True if `rect` already holds exactly `rgb` (rect-sized, RGB). */
20
+ equals(rect: Rect, rgb: Uint8Array): boolean;
21
+ /** Copies rect-sized RGB pixels into `rect`. */
22
+ blit(rect: Rect, rgb: Uint8Array): void;
23
+ /** Fills `rect` (default: everything) with one colour. */
24
+ fill(color: RGB, rect?: Rect): void;
25
+ /** A copy of the pixels in `rect` (default: everything). */
26
+ read(rect?: Rect): RawImage;
27
+ }
28
+ /** `size` of a single colour, as RGB. */
29
+ export declare function solidRgb(size: Size, [r, g, b]: RGB): Uint8Array;
30
+ /** Parses `#rgb` / `#rrggbb`; `undefined` for anything else (named colours, `rgb()`, ...). */
31
+ export declare function parseHexColor(color: string): RGB | undefined;
32
+ /** Composites RGBA onto a solid background, giving RGB (what sharp's `flatten` does). */
33
+ export declare function flattenRgba(rgba: Uint8Array, [br, bg, bb]: RGB): Uint8Array;
34
+ //# sourceMappingURL=framebuffer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"framebuffer.d.ts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,EAAE,EAAE,CAAC,EAAE,GAAG,GAAG,UAAU,CAgB3E"}
@@ -0,0 +1,45 @@
1
+ import { type Sharp } from "sharp";
2
+ import { type DeckFont, type RawImage, type Size } from "./element.ts";
3
+ import type { Renderable } from "./index.ts";
4
+ export type { RawImage, Size } from "./element.ts";
5
+ /**
6
+ * Encoded image bytes (PNG, JPEG or WebP), a path to an image file, decoded pixels, or an
7
+ * element (rendered at the target size; needs a renderer such as `@sdeck/react`).
8
+ */
9
+ export type ImageSource = Uint8Array | string | RawImage | Renderable;
10
+ export interface ImageOptions {
11
+ /**
12
+ * How the image is fitted to the target size (default `"cover"`):
13
+ * `cover` fills and crops, `contain` letterboxes, `fill` stretches.
14
+ */
15
+ fit?: "cover" | "contain" | "fill";
16
+ /** Colour used for letterboxing and for flattening transparency (default black). */
17
+ background?: string;
18
+ /** JPEG quality, 1–100 (default 90). */
19
+ quality?: number;
20
+ /** Fonts for elements. */
21
+ fonts?: readonly DeckFont[];
22
+ }
23
+ /**
24
+ * Validates a PNG, JPEG or WebP source and returns a pipeline that applies EXIF orientation,
25
+ * scales it to exactly `size` and flattens transparency. The result is upright (not rotated).
26
+ */
27
+ export declare function prepareImage(source: ImageSource, size: Size, options?: Pick<ImageOptions, "fit" | "background" | "fonts">): Promise<Sharp>;
28
+ export interface DeviceImageOptions extends ImageOptions {
29
+ /** Rotation the device expects (default 0). The Stream Deck Neo needs 180. */
30
+ rotation?: 0 | 180;
31
+ }
32
+ /**
33
+ * Converts an image into what a Stream Deck expects: a baseline JPEG of exactly `size`,
34
+ * rotated as the device requires.
35
+ */
36
+ export declare function toDeviceJpeg(source: ImageSource, size: Size, options?: DeviceImageOptions): Promise<Uint8Array>;
37
+ /**
38
+ * Converts an image to upright RGB pixels of exactly `size` (`width * height * 3` bytes).
39
+ * Exact-size raw pixels, such as rendered elements, skip sharp entirely; RGBA is flattened onto
40
+ * `background` in JS when it is a hex colour.
41
+ */
42
+ export declare function toRgb(source: ImageSource, size: Size, options?: Pick<ImageOptions, "fit" | "background" | "fonts">): Promise<Uint8Array>;
43
+ /** Encodes upright RGB pixels of `size` as a baseline JPEG, rotated as the device needs. */
44
+ export declare function encodeJpeg(rgb: Uint8Array, size: Size, options?: Pick<DeviceImageOptions, "quality" | "rotation">): Promise<Uint8Array>;
45
+ //# sourceMappingURL=image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../src/image.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,KAAK,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EACL,KAAK,QAAQ,EAIb,KAAK,QAAQ,EACb,KAAK,IAAI,EACV,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEnD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEtE,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACnC,oFAAoF;IACpF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;CAC7B;AAID;;;GAGG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,IAAI,EACV,OAAO,GAAE,IAAI,CAAC,YAAY,EAAE,KAAK,GAAG,YAAY,GAAG,OAAO,CAAM,GAC/D,OAAO,CAAC,KAAK,CAAC,CAyBhB;AAED,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,IAAI,EACV,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,UAAU,CAAC,CAErB;AAED;;;;GAIG;AACH,wBAAsB,KAAK,CACzB,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,IAAI,EACV,OAAO,GAAE,IAAI,CAAC,YAAY,EAAE,KAAK,GAAG,YAAY,GAAG,OAAO,CAAM,GAC/D,OAAO,CAAC,UAAU,CAAC,CAoBrB;AAED,4FAA4F;AAC5F,wBAAsB,UAAU,CAC9B,GAAG,EAAE,UAAU,EACf,IAAI,EAAE,IAAI,EACV,OAAO,GAAE,IAAI,CAAC,kBAAkB,EAAE,SAAS,GAAG,UAAU,CAAM,GAC7D,OAAO,CAAC,UAAU,CAAC,CAQrB"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Elements that can be drawn on a key, strip, window or screen. Empty on its own: renderer
3
+ * packages add to it, e.g. `@sdeck/react` adds `ReactNode`:
4
+ *
5
+ * ```ts
6
+ * declare module "@sdeck/core" {
7
+ * interface RenderableRegistry { react: ReactNode }
8
+ * }
9
+ * ```
10
+ */
11
+ export interface RenderableRegistry {
12
+ }
13
+ /** Anything a registered renderer (see {@link registerElementRuntime}) can draw. */
14
+ export type Renderable = RenderableRegistry[keyof RenderableRegistry];
15
+ export * from "./deck.ts";
16
+ export * from "./detect.ts";
17
+ export * from "./element.ts";
18
+ export * from "./framebuffer.ts";
19
+ export * from "./image.ts";
20
+ export * from "./layout.ts";
21
+ export * from "./manager.ts";
22
+ export * from "./memory.ts";
23
+ export * from "./transport.ts";
24
+ export * from "./virtual.ts";
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,kBAAkB;CAAG;AAEtC,oFAAoF;AACpF,MAAM,MAAM,UAAU,GAAG,kBAAkB,CAAC,MAAM,kBAAkB,CAAC,CAAC;AAEtE,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}