@swiftbrowser/react 0.18.3 → 0.21.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/README.md +67 -11
- package/dist/audioEngine.d.ts +359 -0
- package/dist/audioEngine.d.ts.map +1 -0
- package/dist/components/containers.d.ts +4 -1
- package/dist/components/containers.d.ts.map +1 -1
- package/dist/components/controls.d.ts +2 -0
- package/dist/components/controls.d.ts.map +1 -1
- package/dist/components/lists.d.ts +3 -0
- package/dist/components/lists.d.ts.map +1 -1
- package/dist/components/navigation.d.ts.map +1 -1
- package/dist/components/registered.d.ts +30 -0
- package/dist/components/registered.d.ts.map +1 -0
- package/dist/components/split.d.ts +1 -1
- package/dist/components/split.d.ts.map +1 -1
- package/dist/components/stacks.d.ts +6 -2
- package/dist/components/stacks.d.ts.map +1 -1
- package/dist/components/system.d.ts +14 -4
- package/dist/components/system.d.ts.map +1 -1
- package/dist/dragDrop.d.ts.map +1 -1
- package/dist/fileImporter.d.ts +6 -1
- package/dist/fileImporter.d.ts.map +1 -1
- package/dist/fileManager.d.ts +22 -4
- package/dist/fileManager.d.ts.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1045 -80
- package/dist/index.js.map +1 -1
- package/dist/languageModel.d.ts +136 -0
- package/dist/languageModel.d.ts.map +1 -0
- package/dist/modifiers.d.ts +19 -0
- package/dist/modifiers.d.ts.map +1 -1
- package/dist/mount.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -189,7 +189,9 @@ ordered list. A layered style is an array: `foregroundStyle={['white',
|
|
|
189
189
|
`symbolRenderingMode="palette"` symbol draws its disc in. The environment
|
|
190
190
|
modifiers (`buttonStyle`, `controlSize`, `pickerStyle`, `toggleStyle`, `labelsHidden`,
|
|
191
191
|
`symbolRenderingMode`) are React contexts the views below read, and
|
|
192
|
-
`navigationTitle`, `toolbar`, `toolbarRole`, `
|
|
192
|
+
`navigationTitle`, `toolbar`, `toolbarRole`, `toolbarVisibility` (the
|
|
193
|
+
navigation bar or the bottom bar hidden, as `.toolbar(.hidden, for:)`),
|
|
194
|
+
`statusBarHidden`, `searchable`, `sheet`, `alert`,
|
|
193
195
|
`presentationDetents` and `preferredColorScheme` attach to the enclosing
|
|
194
196
|
screen, sheet or page, as the SwiftUI preferences do. Effects (`blur`,
|
|
195
197
|
`grayscale`, `saturation`, `brightness`, `contrast`, `hueRotation`,
|
|
@@ -198,7 +200,11 @@ layout hints (`aspectRatio`, `scaledToFit`, `position`, `zIndex`,
|
|
|
198
200
|
`alignmentGuide`, `ignoresSafeArea`, `allowsHitTesting`, `lineLimit` ranges)
|
|
199
201
|
and the lifecycle (`onAppear`, `task` with an `AbortSignal` for
|
|
200
202
|
cancellation, `onChangeOf`) are modifiers too, as are `draggable` and
|
|
201
|
-
`dropDestination
|
|
203
|
+
`dropDestination` (what another `draggable` lifted, and from outside the
|
|
204
|
+
app what `accepts` takes: text, links, and files as `File`s, a dropped
|
|
205
|
+
folder as its files named by their paths in it, the folder's name first,
|
|
206
|
+
as `fileImporter` names a picked folder's; natively the files stay on disk
|
|
207
|
+
and are read when asked).
|
|
202
208
|
|
|
203
209
|
Values are plain data: colors by name (`"red"`, `"secondary"`,
|
|
204
210
|
`"secondarySystemBackground"`) or through `Color` (`Color.opacity('black',
|
|
@@ -344,7 +350,11 @@ a row from the leading edge, a `Spacer` pushing the rest to the trailing
|
|
|
344
350
|
edge; it is hidden while nothing in the screen is being edited. A `Label`
|
|
345
351
|
in a bar shows its icon alone, its title the icon's accessible name, as iOS
|
|
346
352
|
draws a bar's labels; `labelStyle="titleAndIcon"` on it shows both, and a
|
|
347
|
-
`Menu`'s items keep their labels' title and icon.
|
|
353
|
+
`Menu`'s items keep their labels' title and icon. Keep a bar's items the
|
|
354
|
+
same from the push's first frame: iOS sizes their glass as the push starts
|
|
355
|
+
and lays it out again only once the push ends, so an item that arrives with
|
|
356
|
+
fetched data (an Edit button once the rows are in) sits clipped in the
|
|
357
|
+
bar until then. Render it from the start and disable it instead.
|
|
348
358
|
|
|
349
359
|
```tsx
|
|
350
360
|
<List
|
|
@@ -598,6 +608,40 @@ page cuts with the Web Audio API and writes WAV, the native app exports AAC
|
|
|
598
608
|
with `AVAssetExportSession`. (A page that keeps no files answers `data:`
|
|
599
609
|
URLs instead.)
|
|
600
610
|
|
|
611
|
+
`AVAudioEngine` makes sound from the app, as an iOS app's does: attach
|
|
612
|
+
nodes, connect them toward `mainMixerNode`, `await engine.start()`, then
|
|
613
|
+
play. `AVAudioPlayerNode` plays files (`await AVAudioFile.open(url)`) and
|
|
614
|
+
buffers on a timeline (`scheduleFile`, `scheduleSegment`, `scheduleBuffer`
|
|
615
|
+
with `loops` and `interruptsAtLoop`, each at an `AVAudioTime` sample time or
|
|
616
|
+
after the last, resolving once played); a buffer is read from a file or
|
|
617
|
+
written from the app's own samples (`new AVAudioPCMBuffer(format,
|
|
618
|
+
frames).write([Float32Array])`). `AVAudioUnitSampler` plays notes
|
|
619
|
+
(`startNote`, `stopNote`, `sendController`, `sendPitchBend`) from
|
|
620
|
+
`loadAudioFiles(urls)`, each file placed on the keyboard by the note in its
|
|
621
|
+
name (`Piano C4.wav`, C4 = 60) or `rootNotes`, pitched across the keys up
|
|
622
|
+
to halfway to the next. `AVAudioUnitReverb`, `AVAudioUnitDelay`,
|
|
623
|
+
`AVAudioUnitDistortion`, `AVAudioUnitEQ` and `AVAudioUnitTimePitch` shape
|
|
624
|
+
what passes through them, `inputNode` is the microphone, and `meter()`
|
|
625
|
+
reads a node's level. `useAudioEngine(build)` gives a view an engine for
|
|
626
|
+
its life. The page plays through the Web Audio API, the native app through
|
|
627
|
+
`AVAudioEngine` itself; per-sample work never runs in JavaScript. A page
|
|
628
|
+
cannot load sound banks or shift pitch apart from speed (time-pitch passes
|
|
629
|
+
its input through there). For synthesis, @swiftbrowser/dsp adds `DSPNode`:
|
|
630
|
+
a program in a small JavaScript-like language, compiled at build time and
|
|
631
|
+
rendered on the audio thread, played with the sampler's note calls.
|
|
632
|
+
|
|
633
|
+
`LanguageModelSession` talks to Apple Intelligence's on-device model, as
|
|
634
|
+
FoundationModels does. Check `SystemLanguageModel.default.availability()`
|
|
635
|
+
(or `useSystemLanguageModel()`) and say why when it is unavailable
|
|
636
|
+
(`deviceNotEligible`, `appleIntelligenceNotEnabled`, `modelNotReady`); make a
|
|
637
|
+
session with `instructions`, then `await session.respond(prompt)` for the
|
|
638
|
+
whole answer or `for await (const { content } of
|
|
639
|
+
session.streamResponse(prompt))` for the answer so far as it grows
|
|
640
|
+
(`cancel()` stops it). The session keeps the conversation. Failures are
|
|
641
|
+
`GenerationError`s with a `kind` (`exceededContextWindowSize`,
|
|
642
|
+
`guardrailViolation`, …). Natively the model is FoundationModels' (iOS 26);
|
|
643
|
+
on a page it is Chrome's built-in model where the browser has one.
|
|
644
|
+
|
|
601
645
|
An image is inert, as a SwiftUI image is. `<AsyncImage url={…}
|
|
602
646
|
webInteractions />` gives a remote picture the browser's own image
|
|
603
647
|
interactions back: a long press's Save / Share / Copy on iOS, dragging it
|
|
@@ -624,7 +668,13 @@ autofill, without capitals.
|
|
|
624
668
|
`fileImporter` is the browser's file chooser, opened when `isPresented`
|
|
625
669
|
turns true; set it from a button's action, since a browser opens a chooser
|
|
626
670
|
only within a tap. `onCompletion` gets the chosen `File`s, and a dismissed
|
|
627
|
-
chooser calls `onCancellation
|
|
671
|
+
chooser calls `onCancellation`. With `'public.folder'` among the types it
|
|
672
|
+
is the folder chooser, and the files come named by their paths in the
|
|
673
|
+
folder, the folder's name first (`Photos/2025/a.jpg`). A `File` is what
|
|
674
|
+
the browser holds, not its bytes: a native app's picked files stay on disk
|
|
675
|
+
too, read through `arrayBuffer()` or a `slice` when asked, so a folder of
|
|
676
|
+
large files costs no memory until a file is read, and `fileManager.write`
|
|
677
|
+
copies one on disk rather than through memory:
|
|
628
678
|
|
|
629
679
|
```tsx
|
|
630
680
|
<Button title="Upload Logo" action={() => setImporting(true)}
|
|
@@ -774,8 +824,11 @@ has there: `/data/Documents`, `/data/Library/Application Support`,
|
|
|
774
824
|
`/data/Library/Caches`, and `/tmp` for the session); in a SwiftBrowser
|
|
775
825
|
Native app they are the app's sandbox. Paths are `file:` URLs, made with
|
|
776
826
|
`url(directory, path)`. The calls are Swift's, asynchronous on both sides
|
|
777
|
-
since the page's storage is: `contents
|
|
778
|
-
|
|
827
|
+
since the page's storage is: `contents` (the whole file, or a `range`
|
|
828
|
+
`{ start, end }` of it, read without the rest: a `Blob` slice on a page,
|
|
829
|
+
`FileHandle` natively), `text`, `write` (bytes, a Blob or text; the
|
|
830
|
+
directory must exist; a `Blob` or `File` is kept as it is, so a picked or
|
|
831
|
+
dropped file is stored without passing through memory), `contentsOfDirectory`, `createDirectory`
|
|
779
832
|
(with its parents), `fileExists`, `attributesOfItem` (size, the modification
|
|
780
833
|
and creation times, the MIME type the extension names), `moveItem`,
|
|
781
834
|
`copyItem`, `removeItem`. Failures say what went wrong first: `notFound:`,
|
|
@@ -971,11 +1024,13 @@ read with a hook). Props, callbacks and external stores need no bridging.
|
|
|
971
1024
|
`AudioPlayer` and `AVQueuePlayer`, `Gauge`, `ProgressView`, Swift Charts.
|
|
972
1025
|
- **Controls**: `Button` (styles, roles, sizes), `Toggle`, `Picker`,
|
|
973
1026
|
`Slider`, `Stepper`, `TextField` and `SecureField` (focus bindings, submit
|
|
974
|
-
labels), `TextEditor`, `DatePicker`, `ColorPicker`, `ShareLink
|
|
975
|
-
`
|
|
1027
|
+
labels), `TextEditor`, `DatePicker`, `ColorPicker`, `ShareLink` (a URL,
|
|
1028
|
+
text, or a file's bytes with its name), `Menu`, `EditButton`,
|
|
1029
|
+
`fileImporter`.
|
|
976
1030
|
- **Containers**: `List` (selection, edit mode, swipe actions, deletion,
|
|
977
|
-
reordering, pull to refresh), `Form`, `Section
|
|
978
|
-
`
|
|
1031
|
+
reordering, pull to refresh), `Form`, `Section` (`isExpanded` collapses it
|
|
1032
|
+
in a sidebar-style list, as on iOS), `Table`, `GroupBox`, `DisclosureGroup`
|
|
1033
|
+
(SwiftUI's own natively), `ControlGroup`, `ContentUnavailableView`.
|
|
979
1034
|
- **Navigation and presentation**: `NavigationStack` (value and destination
|
|
980
1035
|
links, a `path` binding, nested stacks flattened), `NavigationSplitView`,
|
|
981
1036
|
`TabView`/`Tab`, toolbars, search fields, sheets with detents, popovers
|
|
@@ -990,7 +1045,8 @@ read with a hook). Props, callbacks and external stores need no bridging.
|
|
|
990
1045
|
- **Animation and effects**: `withAnimation`, `animation`, transitions,
|
|
991
1046
|
`PhaseAnimator`, `KeyframeAnimator`, `matchedGeometryEffect`,
|
|
992
1047
|
`symbolEffect`, `contentTransition`, `visualEffect`, `scrollTransition`,
|
|
993
|
-
`redacted` placeholders, `textCase
|
|
1048
|
+
`redacted` placeholders, `textCase`, `textSelection` (text is not
|
|
1049
|
+
selectable otherwise, as on iOS).
|
|
994
1050
|
- **Mixing**: `Host` and `SwiftUIView`.
|
|
995
1051
|
|
|
996
1052
|
## Not yet
|
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `AVAudioEngine` for a JavaScript app: the engine, its nodes and their
|
|
3
|
+
* files and buffers, shaped as AVFoundation's, so an app builds a graph as
|
|
4
|
+
* an iOS app does. Attach a player, a sampler, a mixer or an effect,
|
|
5
|
+
* connect them toward `mainMixerNode`, `start()`, then schedule files and
|
|
6
|
+
* buffers on a player (`AVAudioPlayerNode`) or play notes on a sampler
|
|
7
|
+
* (`AVAudioUnitSampler`); reverb, delay, distortion, EQ and time-pitch
|
|
8
|
+
* effects shape what passes through them, and `inputNode` is the
|
|
9
|
+
* microphone. Each object is a number the app chooses and each call one
|
|
10
|
+
* command to the host, in order: natively `AVAudioEngine` itself answers
|
|
11
|
+
* (packages/native, AudioEngineBridge.swift), on a page the Web Audio API
|
|
12
|
+
* (Web/src/audioEngine.ts). Per-sample work never runs in JavaScript.
|
|
13
|
+
*
|
|
14
|
+
* What differs from Swift: `start()`, opening a file and loading a sampler
|
|
15
|
+
* are asynchronous (await them before playing); a scheduled file or
|
|
16
|
+
* buffer's completion is also the promise its `schedule…` call returns; a
|
|
17
|
+
* sampler's `loadAudioFiles` places each file on the keyboard by the note in
|
|
18
|
+
* its name (`Piano C4.wav`, `F#2`, `60`; C4 is middle C, MIDI 60) or the
|
|
19
|
+
* `rootNotes` given, each covering the keys up to halfway to the next; and
|
|
20
|
+
* `meter()` reads a node's output level, as a tap would. A page cannot load
|
|
21
|
+
* sound banks (`loadInstrument`) or change pitch apart from speed
|
|
22
|
+
* (`AVAudioUnitTimePitch` passes its input through there).
|
|
23
|
+
*/
|
|
24
|
+
import type { AudioEngineCommand, AudioEngineHost, AudioNodeKind, AudioTimeSpec, AudioValue, CustomAudioNodeKind, SamplerZone } from '@swiftbrowser/web/src/audioEngine';
|
|
25
|
+
export type { AudioEngineHost, SamplerZone };
|
|
26
|
+
/** A format as an app reads it: the sample rate and the channels. */
|
|
27
|
+
export interface AVAudioFormat {
|
|
28
|
+
sampleRate: number;
|
|
29
|
+
channelCount: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* When something starts. `new AVAudioTime(sampleTime, rate)` is a sample
|
|
33
|
+
* time on a player's own timeline (frames at `rate` from when it started
|
|
34
|
+
* playing): what a sequencer schedules on, sample-accurately.
|
|
35
|
+
* `AVAudioTime.secondsFromNow(s)` is a delay from when the call arrives.
|
|
36
|
+
*/
|
|
37
|
+
export declare class AVAudioTime {
|
|
38
|
+
readonly spec: AudioTimeSpec;
|
|
39
|
+
constructor(sampleTime: number, atRate: number);
|
|
40
|
+
static secondsFromNow(seconds: number): AVAudioTime;
|
|
41
|
+
get isSampleTimeValid(): boolean;
|
|
42
|
+
get sampleTime(): number;
|
|
43
|
+
get sampleRate(): number;
|
|
44
|
+
/** The time in seconds: a sample time's place on its timeline, or the delay. */
|
|
45
|
+
get seconds(): number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Audio for a player to play or a sampler to load: `AVAudioFile.open(url)`
|
|
49
|
+
* decodes it (natively it streams), and `read(into:)` fills a buffer from
|
|
50
|
+
* `framePosition`. The URL is the app's file (`file:`), a page's URL, or a
|
|
51
|
+
* `data:` URL.
|
|
52
|
+
*/
|
|
53
|
+
export declare class AVAudioFile {
|
|
54
|
+
readonly id: number;
|
|
55
|
+
readonly url: string;
|
|
56
|
+
readonly length: number;
|
|
57
|
+
readonly processingFormat: AVAudioFormat;
|
|
58
|
+
/** Where the next `read` starts, in frames. */
|
|
59
|
+
framePosition: number;
|
|
60
|
+
private constructor();
|
|
61
|
+
/** Opens a file for reading; rejects with `notFound: …` or `decode: …`. */
|
|
62
|
+
static open(url: string): Promise<AVAudioFile>;
|
|
63
|
+
/** Seconds. */
|
|
64
|
+
get duration(): number;
|
|
65
|
+
/** Reads frames from `framePosition` into `buffer` (up to its capacity, or `frameCount`) and moves past them. */
|
|
66
|
+
read(into: AVAudioPCMBuffer, frameCount?: number): Promise<void>;
|
|
67
|
+
/** Lets the host free the decoded audio (what a scheduled segment still plays keeps playing). */
|
|
68
|
+
close(): void;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* PCM audio a player schedules: read from a file (`AVAudioFile.read(into:)`)
|
|
72
|
+
* or written from the app's own samples (`write`, one `Float32Array` per
|
|
73
|
+
* channel, -1 … 1), which is how a JavaScript app hands over sound it
|
|
74
|
+
* computed.
|
|
75
|
+
*/
|
|
76
|
+
export declare class AVAudioPCMBuffer {
|
|
77
|
+
format: AVAudioFormat;
|
|
78
|
+
readonly frameCapacity: number;
|
|
79
|
+
readonly id: number;
|
|
80
|
+
frameLength: number;
|
|
81
|
+
constructor(format: AVAudioFormat, frameCapacity: number);
|
|
82
|
+
/** Seconds of audio it holds. */
|
|
83
|
+
get duration(): number;
|
|
84
|
+
/** Fills the buffer with the app's samples, one array per channel (up to its capacity). */
|
|
85
|
+
write(channels: readonly Float32Array[]): Promise<void>;
|
|
86
|
+
/** Lets the host free the audio. */
|
|
87
|
+
close(): void;
|
|
88
|
+
}
|
|
89
|
+
/** A node in an engine's graph. Its properties are kept until it is attached, then sent as they change. */
|
|
90
|
+
export declare abstract class AVAudioNode {
|
|
91
|
+
readonly id: number;
|
|
92
|
+
/** The engine it is attached to, or null. */
|
|
93
|
+
engine: AVAudioEngine | null;
|
|
94
|
+
protected readonly values: Record<string, AudioValue>;
|
|
95
|
+
/**
|
|
96
|
+
* The command kind it is attached as (null: one an engine makes itself). A
|
|
97
|
+
* package's node subclasses this with its own kind (@swiftbrowser/dsp's
|
|
98
|
+
* `DSPNode` is `program`), which the host makes from what the package
|
|
99
|
+
* registered.
|
|
100
|
+
*/
|
|
101
|
+
abstract readonly kind: AudioNodeKind | CustomAudioNodeKind | null;
|
|
102
|
+
protected get<T extends AudioValue>(key: string, fallback: T): T;
|
|
103
|
+
protected set(key: string, value: AudioValue): void;
|
|
104
|
+
/** The properties to attach it with. */
|
|
105
|
+
attachValues(): Record<string, AudioValue>;
|
|
106
|
+
/** How many EQ bands it has (only an EQ has any). */
|
|
107
|
+
get bandCount(): number | undefined;
|
|
108
|
+
/** What its engine must be for a call to reach it. */
|
|
109
|
+
protected attached(): AVAudioEngine;
|
|
110
|
+
/** Its output's level now (0 silent … 1 at 0 dB, from -50 dB), as a tap on it would measure; 0 when not attached. */
|
|
111
|
+
meter(): Promise<number>;
|
|
112
|
+
}
|
|
113
|
+
/** A node that mixes into what it connects to (`AVAudioMixing`): its volume (0 … 1) and pan (-1 left … 1 right). */
|
|
114
|
+
declare abstract class MixingNode extends AVAudioNode {
|
|
115
|
+
get volume(): number;
|
|
116
|
+
set volume(value: number);
|
|
117
|
+
get pan(): number;
|
|
118
|
+
set pan(value: number);
|
|
119
|
+
}
|
|
120
|
+
/** `AVAudioMixerNode`: sums what connects to it; `outputVolume` scales the sum. An engine's `mainMixerNode` is one. */
|
|
121
|
+
export declare class AVAudioMixerNode extends MixingNode {
|
|
122
|
+
readonly kind: AudioNodeKind | null;
|
|
123
|
+
get outputVolume(): number;
|
|
124
|
+
set outputVolume(value: number);
|
|
125
|
+
}
|
|
126
|
+
/** The engine's output to the speakers. */
|
|
127
|
+
export declare class AVAudioOutputNode extends AVAudioNode {
|
|
128
|
+
readonly kind: null;
|
|
129
|
+
}
|
|
130
|
+
/** The microphone: connect it (to a mixer, an effect) and start the engine, which asks for the microphone then. */
|
|
131
|
+
export declare class AVAudioInputNode extends MixingNode {
|
|
132
|
+
readonly kind: null;
|
|
133
|
+
}
|
|
134
|
+
/** What a scheduled buffer does (`AVAudioPlayerNodeBufferOptions`). */
|
|
135
|
+
export interface AVAudioPlayerNodeBufferOptions {
|
|
136
|
+
/** Plays it over and over, until the player stops or another buffer interrupts it. */
|
|
137
|
+
loops?: boolean;
|
|
138
|
+
/** Stops what the player is playing and plays this now. */
|
|
139
|
+
interrupts?: boolean;
|
|
140
|
+
/** As `interrupts`, once a looping buffer that is playing finishes its pass (a pattern swapped on the bar line). */
|
|
141
|
+
interruptsAtLoop?: boolean;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* `AVAudioPlayerNode`: a timeline of scheduled files, segments and
|
|
145
|
+
* buffers. Each plays after the last, or at its own `AVAudioTime`; `play()`
|
|
146
|
+
* starts the timeline once the engine runs. Each `schedule…` resolves
|
|
147
|
+
* (and calls its completion handler) when its audio has played, or the
|
|
148
|
+
* player stopped.
|
|
149
|
+
*/
|
|
150
|
+
export declare class AVAudioPlayerNode extends MixingNode {
|
|
151
|
+
readonly kind: "player";
|
|
152
|
+
private playing;
|
|
153
|
+
get isPlaying(): boolean;
|
|
154
|
+
scheduleFile(file: AVAudioFile, at?: AVAudioTime | null, completionHandler?: () => void): Promise<void>;
|
|
155
|
+
scheduleSegment(file: AVAudioFile, startingFrame: number, frameCount: number, at?: AVAudioTime | null, completionHandler?: () => void): Promise<void>;
|
|
156
|
+
scheduleBuffer(buffer: AVAudioPCMBuffer, at?: AVAudioTime | null, options?: AVAudioPlayerNodeBufferOptions, completionHandler?: () => void): Promise<void>;
|
|
157
|
+
private schedule;
|
|
158
|
+
/** Starts (or resumes) the timeline, now or at `at`; the engine must be running. */
|
|
159
|
+
play(at?: AVAudioTime | null): void;
|
|
160
|
+
/** Holds the timeline where it is; `play()` goes on from there. */
|
|
161
|
+
pause(): void;
|
|
162
|
+
/** Drops everything scheduled (each completion called) and returns the timeline to 0. */
|
|
163
|
+
stop(): void;
|
|
164
|
+
/** Where the timeline is now (`playerTime(forNodeTime: lastRenderTime)`), or null before it plays. */
|
|
165
|
+
playerTime(): Promise<AVAudioTime | null>;
|
|
166
|
+
/** Called by the engine when it stops: the player stops with it. */
|
|
167
|
+
engineStopped(): void;
|
|
168
|
+
}
|
|
169
|
+
/** Options for `loadAudioFiles`: where each file sits on the keyboard, and the notes' envelope. */
|
|
170
|
+
export interface SamplerLoadOptions {
|
|
171
|
+
/** Each file's root note (MIDI), in the order of the URLs; absent, read from each file's name. */
|
|
172
|
+
rootNotes?: readonly number[];
|
|
173
|
+
/** Seconds from silence to full level (0.002). */
|
|
174
|
+
attack?: number;
|
|
175
|
+
/** Seconds to fade once a note is let go (0.15). */
|
|
176
|
+
release?: number;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* The MIDI note a sample's file name names: `C4` (middle C, 60), `F#2`,
|
|
180
|
+
* `Bb3`, `A-1`, or a bare number `60`; the last one in the name wins. Null
|
|
181
|
+
* when it names none.
|
|
182
|
+
*/
|
|
183
|
+
export declare function noteInName(url: string): number | null;
|
|
184
|
+
/**
|
|
185
|
+
* Zones for samples at their root notes: sorted by root, each covering the
|
|
186
|
+
* keys from halfway after the one below to halfway to the one above (the
|
|
187
|
+
* lowest down to 0, the highest up to 127). A second sample on a root
|
|
188
|
+
* already taken is left out.
|
|
189
|
+
*/
|
|
190
|
+
export declare function samplerZones(samples: readonly {
|
|
191
|
+
file: number;
|
|
192
|
+
root: number;
|
|
193
|
+
}[]): SamplerZone[];
|
|
194
|
+
/**
|
|
195
|
+
* `AVAudioUnitSampler`: notes played from samples. `loadAudioFiles(urls)`
|
|
196
|
+
* places each file on the keyboard (see the file comment) and pitches it
|
|
197
|
+
* across its zone; `startNote` and `stopNote` play, with velocity, the
|
|
198
|
+
* sustain pedal and other controllers (`sendController`) and the pitch
|
|
199
|
+
* wheel (`sendPitchBend`). Natively `loadInstrument` and
|
|
200
|
+
* `loadSoundBankInstrument` load an `.aupreset`, a DLS or a SoundFont too.
|
|
201
|
+
*/
|
|
202
|
+
export declare class AVAudioUnitSampler extends MixingNode {
|
|
203
|
+
readonly kind: "sampler";
|
|
204
|
+
private files;
|
|
205
|
+
/** Decibels, -90 … 12. */
|
|
206
|
+
get overallGain(): number;
|
|
207
|
+
set overallGain(value: number);
|
|
208
|
+
/** Cents, -2400 … 2400. */
|
|
209
|
+
get globalTuning(): number;
|
|
210
|
+
set globalTuning(value: number);
|
|
211
|
+
/** -100 left … 100 right. */
|
|
212
|
+
get stereoPan(): number;
|
|
213
|
+
set stereoPan(value: number);
|
|
214
|
+
loadAudioFiles(urls: readonly string[], options?: SamplerLoadOptions): Promise<void>;
|
|
215
|
+
/** Loads an `.aupreset`, a DLS or a SoundFont's first instrument (natively; a page rejects with `unsupported: …`). */
|
|
216
|
+
loadInstrument(url: string): Promise<void>;
|
|
217
|
+
/** Loads one instrument of a SoundFont or DLS bank by program and bank (natively; a page rejects with `unsupported: …`). */
|
|
218
|
+
loadSoundBankInstrument(url: string, program: number, bankMSB?: number, bankLSB?: number): Promise<void>;
|
|
219
|
+
startNote(note: number, withVelocity: number, onChannel?: number): void;
|
|
220
|
+
stopNote(note: number, onChannel?: number): void;
|
|
221
|
+
/** A MIDI controller: 64 the sustain pedal, 7 volume, 11 expression, 10 pan, 123 all notes off. */
|
|
222
|
+
sendController(controller: number, withValue: number, onChannel?: number): void;
|
|
223
|
+
/** The pitch wheel: 0 … 16383, 8192 centered (±2 semitones). */
|
|
224
|
+
sendPitchBend(pitchbend: number, onChannel?: number): void;
|
|
225
|
+
}
|
|
226
|
+
/** An effect node: `bypass` passes its input through untouched. */
|
|
227
|
+
export declare abstract class AVAudioUnitEffect extends AVAudioNode {
|
|
228
|
+
get bypass(): boolean;
|
|
229
|
+
set bypass(value: boolean);
|
|
230
|
+
}
|
|
231
|
+
export type AVAudioUnitReverbPreset = 'smallRoom' | 'mediumRoom' | 'largeRoom' | 'mediumHall' | 'largeHall' | 'plate' | 'mediumChamber' | 'largeChamber' | 'cathedral' | 'largeRoom2' | 'mediumHall2' | 'mediumHall3' | 'largeHall2';
|
|
232
|
+
/** `AVAudioUnitReverb`: a room, a hall or a plate (`loadFactoryPreset`), mixed in by `wetDryMix` (percent). */
|
|
233
|
+
export declare class AVAudioUnitReverb extends AVAudioUnitEffect {
|
|
234
|
+
readonly kind: "reverb";
|
|
235
|
+
constructor();
|
|
236
|
+
get wetDryMix(): number;
|
|
237
|
+
set wetDryMix(value: number);
|
|
238
|
+
loadFactoryPreset(preset: AVAudioUnitReverbPreset): void;
|
|
239
|
+
}
|
|
240
|
+
/** `AVAudioUnitDelay`: an echo `delayTime` seconds later (0 … 2), fed back by `feedback` percent, darkened above `lowPassCutoff` Hz. */
|
|
241
|
+
export declare class AVAudioUnitDelay extends AVAudioUnitEffect {
|
|
242
|
+
readonly kind: "delay";
|
|
243
|
+
constructor();
|
|
244
|
+
get delayTime(): number;
|
|
245
|
+
set delayTime(value: number);
|
|
246
|
+
get feedback(): number;
|
|
247
|
+
set feedback(value: number);
|
|
248
|
+
get lowPassCutoff(): number;
|
|
249
|
+
set lowPassCutoff(value: number);
|
|
250
|
+
get wetDryMix(): number;
|
|
251
|
+
set wetDryMix(value: number);
|
|
252
|
+
}
|
|
253
|
+
export type AVAudioUnitDistortionPreset = 'drumsBitBrush' | 'drumsBufferBeats' | 'drumsLoFi' | 'multiBrokenSpeaker' | 'multiCellphoneConcert' | 'multiDecimated1' | 'multiDecimated2' | 'multiDecimated3' | 'multiDecimated4' | 'multiDistortedFunk' | 'multiDistortedCubed' | 'multiDistortedSquared' | 'multiEcho1' | 'multiEcho2' | 'multiEchoTight1' | 'multiEchoTight2' | 'multiEverythingIsBroken' | 'speechAlienChatter' | 'speechCosmicInterference' | 'speechGoldenPi' | 'speechRadioTower' | 'speechWaves';
|
|
254
|
+
/** `AVAudioUnitDistortion`: driven by `preGain` (dB), mixed in by `wetDryMix`, its character from a factory preset. */
|
|
255
|
+
export declare class AVAudioUnitDistortion extends AVAudioUnitEffect {
|
|
256
|
+
readonly kind: "distortion";
|
|
257
|
+
constructor();
|
|
258
|
+
get preGain(): number;
|
|
259
|
+
set preGain(value: number);
|
|
260
|
+
get wetDryMix(): number;
|
|
261
|
+
set wetDryMix(value: number);
|
|
262
|
+
loadFactoryPreset(preset: AVAudioUnitDistortionPreset): void;
|
|
263
|
+
}
|
|
264
|
+
export type AVAudioUnitEQFilterType = 'parametric' | 'lowPass' | 'highPass' | 'resonantLowPass' | 'resonantHighPass' | 'bandPass' | 'bandStop' | 'lowShelf' | 'highShelf' | 'resonantLowShelf' | 'resonantHighShelf';
|
|
265
|
+
/** One band of an `AVAudioUnitEQ`. A band is bypassed until the app sets `bypass = false`, as Apple's are. */
|
|
266
|
+
export declare class AVAudioUnitEQFilterParameters {
|
|
267
|
+
private readonly eq;
|
|
268
|
+
private readonly index;
|
|
269
|
+
constructor(eq: AVAudioUnitEQ, index: number);
|
|
270
|
+
private key;
|
|
271
|
+
get filterType(): AVAudioUnitEQFilterType;
|
|
272
|
+
set filterType(value: AVAudioUnitEQFilterType);
|
|
273
|
+
/** Hz. */
|
|
274
|
+
get frequency(): number;
|
|
275
|
+
set frequency(value: number);
|
|
276
|
+
/** Octaves (0.05 … 5). */
|
|
277
|
+
get bandwidth(): number;
|
|
278
|
+
set bandwidth(value: number);
|
|
279
|
+
/** Decibels (-96 … 24). */
|
|
280
|
+
get gain(): number;
|
|
281
|
+
set gain(value: number);
|
|
282
|
+
get bypass(): boolean;
|
|
283
|
+
set bypass(value: boolean);
|
|
284
|
+
}
|
|
285
|
+
/** `AVAudioUnitEQ(numberOfBands:)`: a filter per band and a `globalGain` (dB). */
|
|
286
|
+
export declare class AVAudioUnitEQ extends AVAudioUnitEffect {
|
|
287
|
+
readonly kind: "eq";
|
|
288
|
+
readonly bands: readonly AVAudioUnitEQFilterParameters[];
|
|
289
|
+
constructor(numberOfBands?: number);
|
|
290
|
+
get bandCount(): number;
|
|
291
|
+
get globalGain(): number;
|
|
292
|
+
set globalGain(value: number);
|
|
293
|
+
/** A band's field (for `AVAudioUnitEQFilterParameters`). */
|
|
294
|
+
band(key: string, fallback: AudioValue): AudioValue;
|
|
295
|
+
setBand(key: string, value: AudioValue): void;
|
|
296
|
+
}
|
|
297
|
+
/** `AVAudioUnitTimePitch`: `pitch` in cents (-2400 … 2400) and `rate` (1/32 … 32) apart (natively; a page passes the sound through). */
|
|
298
|
+
export declare class AVAudioUnitTimePitch extends AVAudioUnitEffect {
|
|
299
|
+
readonly kind: "timePitch";
|
|
300
|
+
get pitch(): number;
|
|
301
|
+
set pitch(value: number);
|
|
302
|
+
get rate(): number;
|
|
303
|
+
set rate(value: number);
|
|
304
|
+
get overlap(): number;
|
|
305
|
+
set overlap(value: number);
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* `AVAudioEngine`: a graph of nodes from players, samplers and the input
|
|
309
|
+
* through effects and mixers to `mainMixerNode` and `outputNode` (the
|
|
310
|
+
* speakers). `start()` resolves once it runs; a failure of a call that
|
|
311
|
+
* answers nothing (a property, a note) goes to `onError`.
|
|
312
|
+
*/
|
|
313
|
+
export declare class AVAudioEngine {
|
|
314
|
+
readonly id: number;
|
|
315
|
+
readonly mainMixerNode: AVAudioMixerNode;
|
|
316
|
+
readonly outputNode: AVAudioOutputNode;
|
|
317
|
+
readonly inputNode: AVAudioInputNode;
|
|
318
|
+
readonly attachedNodes: Set<AVAudioNode>;
|
|
319
|
+
/** Where failures of calls that answer nothing go (a console warning by default). */
|
|
320
|
+
onError: (error: Error) => void;
|
|
321
|
+
private running;
|
|
322
|
+
private disposed;
|
|
323
|
+
/** Whether this page or app has an audio engine. */
|
|
324
|
+
static get isAvailable(): boolean;
|
|
325
|
+
constructor();
|
|
326
|
+
get isRunning(): boolean;
|
|
327
|
+
/** Sends a command and answers its result. */
|
|
328
|
+
send<T = unknown>(command: AudioEngineCommand): Promise<T>;
|
|
329
|
+
/** Sends a command that answers nothing; a failure goes to `onError`. */
|
|
330
|
+
fire(command: AudioEngineCommand): void;
|
|
331
|
+
attach(node: AVAudioNode): void;
|
|
332
|
+
detach(node: AVAudioNode): void;
|
|
333
|
+
/**
|
|
334
|
+
* Connects `from`'s output to `to` (an array: to each of them), replacing
|
|
335
|
+
* where it went before; a node that is not a mixer takes one input, so
|
|
336
|
+
* what was connected into it is let go. `format` is accepted for Swift's
|
|
337
|
+
* shape: the host picks one that fits both ends.
|
|
338
|
+
*/
|
|
339
|
+
connect(from: AVAudioNode, to: AVAudioNode | readonly AVAudioNode[], format?: AVAudioFormat | null): void;
|
|
340
|
+
disconnectNodeOutput(node: AVAudioNode): void;
|
|
341
|
+
disconnectNodeInput(node: AVAudioNode): void;
|
|
342
|
+
prepare(): void;
|
|
343
|
+
/** Starts rendering; with the input connected, asks for the microphone (rejecting `permission: …` when refused). */
|
|
344
|
+
start(): Promise<void>;
|
|
345
|
+
/** Pauses rendering; players hold their place and play on at `start()`. */
|
|
346
|
+
pause(): void;
|
|
347
|
+
/** Stops rendering; players stop and drop what they had scheduled. */
|
|
348
|
+
stop(): void;
|
|
349
|
+
/** Silences every node (players stop, notes end) without stopping the engine. */
|
|
350
|
+
reset(): void;
|
|
351
|
+
/** Stops the engine and frees it on the host; it cannot be used after. */
|
|
352
|
+
dispose(): void;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* An engine for a view: made once (`build` attaches and connects its
|
|
356
|
+
* nodes), disposed when the view goes. Null where there is no audio engine.
|
|
357
|
+
*/
|
|
358
|
+
export declare function useAudioEngine(build?: (engine: AVAudioEngine) => void): AVAudioEngine | null;
|
|
359
|
+
//# sourceMappingURL=audioEngine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audioEngine.d.ts","sourceRoot":"","sources":["../src/audioEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAEV,kBAAkB,EAClB,eAAe,EAEf,aAAa,EACb,aAAa,EACb,UAAU,EACV,mBAAmB,EACnB,WAAW,EACZ,MAAM,mCAAmC,CAAC;AAI3C,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC;AAkB7C,qEAAqE;AACrE,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,qBAAa,WAAW;IACtB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;gBAEjB,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAI9C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW;IAMnD,IAAI,iBAAiB,IAAI,OAAO,CAE/B;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,gFAAgF;IAChF,IAAI,OAAO,IAAI,MAAM,CAEpB;CACF;AAMD;;;;;GAKG;AACH,qBAAa,WAAW;IAKpB,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,GAAG,EAAE,MAAM;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,gBAAgB,EAAE,aAAa;IAP1C,+CAA+C;IAC/C,aAAa,SAAK;IAElB,OAAO;IASP,2EAA2E;WAC9D,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAMpD,eAAe;IACf,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,iHAAiH;IAC3G,IAAI,CAA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AKG;IACH,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,GAAG,SAAS,WAAW,EAAE,EAAE,MAAM,GAAE,aAAa,GAAG,IAAW,GAAG,IAAI;IAS/G,oBAAoB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;IAI7C,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;IAI5C,OAAO,IAAI,IAAI;IAIf,oHAAoH;IAC9G,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAK5B,2EAA2E;IAC3E,KAAK,IAAI,IAAI;IAKb,sEAAsE;IACtE,IAAI,IAAI,IAAI;IAMZ,iFAAiF;IACjF,KAAK,IAAI,IAAI;IAKb,0EAA0E;IAC1E,OAAO,IAAI,IAAI;CAShB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,GAAG,aAAa,GAAG,IAAI,CAS5F"}
|
|
@@ -77,7 +77,10 @@ export interface DisclosureGroupProps extends ViewModifiers {
|
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* `DisclosureGroup`: a row with the label and a chevron that turns down as
|
|
80
|
-
* the content opens below it
|
|
80
|
+
* the content opens below it. The `disclosuregroup` element carries
|
|
81
|
+
* `expanded`, its label (first, in a `zstack`) and its content, which the
|
|
82
|
+
* renderers show when expanded (the web renderer lays out the label alone
|
|
83
|
+
* otherwise; the native renderer draws SwiftUI's own); a `tap` toggles.
|
|
81
84
|
*/
|
|
82
85
|
export declare function DisclosureGroup(props: DisclosureGroupProps): ReactNode;
|
|
83
86
|
//# sourceMappingURL=containers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containers.d.ts","sourceRoot":"","sources":["../../src/components/containers.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gCAA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,KAAK,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG,aAAa,GAAG,SAAS,CAG1G;AAED,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACzD,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,SAAS,CAatE"}
|
|
@@ -47,7 +47,9 @@ export interface SliderProps extends ViewModifiers {
|
|
|
47
47
|
/** `in: 0...1` */
|
|
48
48
|
range?: readonly [number, number];
|
|
49
49
|
step?: number;
|
|
50
|
+
/** What the slider is for: VoiceOver reads it; iOS (and so the page) does not draw it. */
|
|
50
51
|
label?: ReactNode;
|
|
52
|
+
/** Drawn at the track's leading end (an icon, a value). */
|
|
51
53
|
minimumValueLabel?: ReactNode;
|
|
52
54
|
maximumValueLabel?: ReactNode;
|
|
53
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../src/components/controls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqD,cAAc,EAAe,MAAM,gCAAgC,CAAC;AACrI,OAAO,EAAY,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG5D,OAAO,EAAsE,KAAK,wBAAwB,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AACrJ,OAAO,EAAE,cAAc,EAAkC,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AASvG,MAAM,WAAW,WAAY,SAAQ,aAAa;IAChD,KAAK,CAA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AAC,KAAK,EAAE,eAAe,GAAG,SAAS,CAgB5D;AAED,UAAU,mBAAoB,SAAQ,aAAa;IACjD;;;;;OAKG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC;IACxC,kGAAkG;IAClG,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,qFAAqF;AACrF,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,IAAI,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC;IACnC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;CAC3C;AAED,iFAAiF;AACjF,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,IAAI,CAAC,oBAAoB,GAAG,yBAAyB,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAEpI;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,oBAAoB,GAAG,eAAe,GAAG,SAAS,CAAC;AACrF,wBAAgB,UAAU,CAAC,CAAC,SAAS,UAAU,EAAE,KAAK,EAAE,oBAAoB,GAAG,gBAAgB,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;AAC/G,wBAAgB,UAAU,CAAC,KAAK,EAAE,yBAAyB,GAAG,eAAe,GAAG,SAAS,CAAC;AAC1F,wBAAgB,UAAU,CAAC,CAAC,SAAS,UAAU,EAAE,KAAK,EAAE,yBAAyB,GAAG,gBAAgB,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC"}
|
|
@@ -20,6 +20,9 @@ export interface SectionProps extends ViewModifiers {
|
|
|
20
20
|
/** A string or a `<Text>` becomes the section's header text; any other view is a view header. */
|
|
21
21
|
header?: ReactNode;
|
|
22
22
|
footer?: ReactNode;
|
|
23
|
+
/** `Section(isExpanded:)`: the section collapses, in a sidebar-style list (as on iOS); its header's chevron toggles it. */
|
|
24
|
+
isExpanded?: BindingValue<boolean>;
|
|
25
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
23
26
|
children?: ReactNode;
|
|
24
27
|
}
|
|
25
28
|
export declare function Section(props: SectionProps): ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../src/components/lists.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAA2D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEhG,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE5D,OAAO,EAA4C,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAW5F,gEAAgE;AAChE,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AAE7C,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,aAAa;IAC3D,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,gCAAgC;IAChC,OAAO,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IAChC,sHAAsH;IACtH,SAAS,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;IACtE,iBAAiB,CAAC,EAAE,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACpE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,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AAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,2HAA2H;IAC3H,UAAU,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CAyBtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/components/navigation.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/components/navigation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG5D,OAAO,EAA4C,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAM5F,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACzD,mDAAmD;IACnD,IAAI,CAAC,EAAE,YAAY,CAAC,SAAS,OAAO,EAAE,CAAC,CAAC;IACxC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,KAAK,IAAI,CAAC;IAClD,8DAA8D;IAC9D,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC;IAC1C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAUD,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,SAAS,CAMtE;AA0DD,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0BAA0B;IAC1B,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,SAAS,CA4BpE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `RegisteredView`: a view a package draws itself, named as the package
|
|
3
|
+
* registered it with `ViewRegistry`: in a native app a SwiftUI view
|
|
4
|
+
* (SwiftBrowserNative's `ViewRegistry.register(name) { context in … }`), on
|
|
5
|
+
* a page the package's own DOM (`ViewRegistry.register(name, (context) =>
|
|
6
|
+
* …)`, from @swiftbrowser/web). One element on both, for what a package
|
|
7
|
+
* draws from data that never crosses the bridge: an audio node's frames
|
|
8
|
+
* (`ScopeView` in @swiftbrowser/dsp), a map's tiles, a camera's preview.
|
|
9
|
+
* It takes the size it is given (`frame`, a stack's proposal), as
|
|
10
|
+
* `GeometryReader` does.
|
|
11
|
+
*
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <RegisteredView name="Meter" props={{ level }} onEvent={(value) => …} frame={{ height: 40 }} />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
import type { ReactNode } from 'react';
|
|
17
|
+
import { type ViewModifiers } from '../modifiers';
|
|
18
|
+
export { ViewRegistry, type RegisteredViewBuilder, type RegisteredViewContext, type RegisteredViewInstance } from '@swiftbrowser/web/src/viewRegistry';
|
|
19
|
+
export interface RegisteredViewProps extends ViewModifiers {
|
|
20
|
+
/** The name the view is registered under, on each platform. */
|
|
21
|
+
name: string;
|
|
22
|
+
/** JSON-serializable props for the view. */
|
|
23
|
+
props?: Record<string, unknown>;
|
|
24
|
+
/** A value the view sent (`context.send(value)`). */
|
|
25
|
+
onEvent?: (value: unknown) => void;
|
|
26
|
+
/** Views for the native view to place (`context.content`); a page's view has none. */
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export declare function RegisteredView(all: RegisteredViewProps): ReactNode;
|
|
30
|
+
//# sourceMappingURL=registered.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registered.d.ts","sourceRoot":"","sources":["../../src/components/registered.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAA8B,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAE9E,OAAO,EAAE,YAAY,EAAE,KAAK,qBAAqB,EAAE,KAAK,qBAAqB,EAAE,KAAK,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAEvJ,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,qDAAqD;IACrD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,sFAAsF;IACtF,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,mBAAmB,GAAG,SAAS,CAIlE"}
|