@solidrt/flux-types 0.0.73 → 0.0.75
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/gui/font.d.ts +7 -0
- package/gui/microphone.d.ts +27 -7
- package/gui/rendertree.d.ts +6 -0
- package/package.json +1 -1
package/gui/font.d.ts
CHANGED
|
@@ -62,6 +62,13 @@ declare module "flux:font" {
|
|
|
62
62
|
* stems to whole pixels as well, which a grid of cells drawn at whole
|
|
63
63
|
* pixels (a terminal) wants; false (default) keeps the outline as the
|
|
64
64
|
* font draws it. An msdf atlas is never hinted.
|
|
65
|
+
*
|
|
66
|
+
* "full" rounds every stem on its own, so it suits outline fonts, not
|
|
67
|
+
* pixel fonts: a font whose glyphs are pixel rectangles, drawn where a
|
|
68
|
+
* font pixel is a fraction of a device pixel (1.6 px, say), gets each
|
|
69
|
+
* row rounded to one pixel at the wider pitch and reads as dashes with
|
|
70
|
+
* blank rows between. Draw a pixel font unhinted at a whole-pixel
|
|
71
|
+
* scale instead.
|
|
65
72
|
*/
|
|
66
73
|
hint?: boolean | "light" | "full"
|
|
67
74
|
/** Debug label of the atlas texture. */
|
package/gui/microphone.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Microphone capture (gui-enabled runtime only). The imperative primitive;
|
|
2
2
|
// @solidrt/core's createMicrophone wraps it with SolidJS reactivity. `open`
|
|
3
|
-
//
|
|
3
|
+
// resolves to a bound session object: its methods are bound, and its `id` is
|
|
4
|
+
// what a runtime module takes a reader of its own by.
|
|
4
5
|
|
|
5
6
|
declare module "flux:microphone" {
|
|
6
7
|
/** A microphone device from {@link listMicrophones}. */
|
|
@@ -21,19 +22,38 @@ declare module "flux:microphone" {
|
|
|
21
22
|
|
|
22
23
|
/** An opened microphone session with controls bound to it. */
|
|
23
24
|
type MicrophoneSession = {
|
|
25
|
+
/**
|
|
26
|
+
* The session's id: what the app hands a runtime module that reads this
|
|
27
|
+
* microphone on a thread of its own (`microphone_tap` in the runtime).
|
|
28
|
+
*/
|
|
29
|
+
id: number
|
|
24
30
|
/** The actual capture sample rate in Hz. */
|
|
25
31
|
sampleRate: number
|
|
26
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Drain the mono float samples captured since the last read. The session
|
|
34
|
+
* keeps a 10 s window of audio, so there is no obligation to poll: a read
|
|
35
|
+
* later than that gets the last 10 s and the older samples are lost (the
|
|
36
|
+
* runtime logs it). A runtime module reading the session hears every
|
|
37
|
+
* sample too; reads do not take from each other.
|
|
38
|
+
*/
|
|
27
39
|
read(): Float32Array
|
|
28
|
-
/** Release the device. */
|
|
40
|
+
/** Release the device. Every reader of the session, a module's included, ends. */
|
|
29
41
|
close(): void
|
|
30
42
|
}
|
|
31
43
|
|
|
32
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* List the available microphone devices. Under a test that installed a
|
|
46
|
+
* clip as the microphone (`app.microphone` of `@solidrt/test`) the list is
|
|
47
|
+
* that one microphone, id 0.
|
|
48
|
+
*/
|
|
33
49
|
export function listMicrophones(): MicrophoneDevice[]
|
|
34
50
|
/**
|
|
35
|
-
* Open a microphone.
|
|
36
|
-
* prompt
|
|
51
|
+
* Open a microphone. Opening is the permission request: on Android the
|
|
52
|
+
* RECORD_AUDIO prompt comes up and the app keeps running behind it; the
|
|
53
|
+
* other platforms show none. Resolves once capture runs. Rejects when the
|
|
54
|
+
* user denies the permission ("microphone permission denied"), when the
|
|
55
|
+
* device cannot be opened, and under a test when the sample rate differs
|
|
56
|
+
* from the installed clip's.
|
|
37
57
|
*/
|
|
38
|
-
export function open(options?: MicrophoneOpenOptions): MicrophoneSession
|
|
58
|
+
export function open(options?: MicrophoneOpenOptions): Promise<MicrophoneSession>
|
|
39
59
|
}
|
package/gui/rendertree.d.ts
CHANGED
|
@@ -258,6 +258,12 @@ declare module "flux:rendertree" {
|
|
|
258
258
|
* size: a 1x screen read from a distance) or `false` (the outline as
|
|
259
259
|
* the font draws it). null restores the default: light below 2x,
|
|
260
260
|
* off above.
|
|
261
|
+
*
|
|
262
|
+
* "full" rounds every stem on its own, so it suits outline fonts, not
|
|
263
|
+
* pixel fonts: a font whose glyphs are pixel rectangles, drawn where a
|
|
264
|
+
* font pixel is a fraction of a device pixel, gets each row rounded to
|
|
265
|
+
* one pixel at the wider pitch and reads as dashes with blank rows
|
|
266
|
+
* between. Draw a pixel font unhinted at a whole-pixel scale instead.
|
|
261
267
|
*/
|
|
262
268
|
hint?: boolean | "light" | "full" | null
|
|
263
269
|
}
|