@seams/voice-capture 0.67.1 → 0.68.1

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 CHANGED
@@ -108,13 +108,36 @@ try {
108
108
 
109
109
  - `record()` resolves with `recorded` (the samples) or `cancelled`. A too quiet recording
110
110
  stays on the card with "Try again".
111
+ - `autoStart: true` starts the first recording with no press on Record. Use it when the person
112
+ just asked for the card with a click or a key. The card then shows no Record button and has
113
+ no row for it, so it is shorter and its rows sit in the middle. If the browser starts audio
114
+ only after a press, the card shows its Record button; "Try again" and a result's button
115
+ bring the row back too.
111
116
  - `show()` resolves with `action` when the person selects the button of a result, `closed`
112
117
  when the person closes the card, or `replaced` when a new view or recording takes its place.
113
118
  - The card uses the CSS variables `--seams-colors-*`, `--seams-shape-*` and
114
119
  `--seams-font-family` when the page sets them, and has its own values when it does not.
120
+ Record and the other main buttons use `--seams-colors-buttonBackground` and
121
+ `--seams-colors-textButton`. Without them, the main button has the text colour
122
+ (`textPrimary`) with the card's background colour as its text.
123
+ The voice line and the Beam glow under it take these values, and keep today's look
124
+ without them:
125
+
126
+ | CSS variable | Theme key (Seams Wallet) | What it sets | Default |
127
+ | --- | --- | --- | --- |
128
+ | `--seams-colors-voiceLine` | `colors.voiceLine` | The voice line, its ring and its seal | The text colour |
129
+ | `--seams-colors-voiceEcho` | `colors.voiceEcho` | Echo lines 1 and 3 behind the line | `voiceLine` |
130
+ | `--seams-colors-voiceEchoDeep` | `colors.voiceEchoDeep` | Echo line 2 | `voiceEcho` |
131
+ | `--seams-colors-voiceBeam` | `colors.voiceBeam` | The Beam palette: `colorful`, `mono`, `ocean`, `sunset`, `forest`, `candy`, `ice` or `gold`. `mono` is grey, band included | `ocean` |
132
+ | `--seams-shape-voiceLineWidth` | `shape.voiceLineWidth` | The width of the voice line | `1px` |
133
+ | `--seams-shape-voiceEchoWidth` | `shape.voiceEchoWidth` | The width of the echo lines | `0.65px` |
115
134
  `data-theme="light"` or `"dark"` on the page selects the glow colours.
116
- - `frame` adds what a host needs: the parent element, more class names, a Back control, and a
117
- callback when the card is in the document.
135
+ - `frame` adds what a host needs: the parent element, more class names, the corner controls,
136
+ and a callback when the card is in the document.
137
+ - `frame.controls` sets the corner controls: `'close'` (default), `'back'` (Back in place of
138
+ Close) or `'back_and_close'`. Back is in the leading corner, Close in the trailing corner.
139
+ Each one ends the card. `frame.pressed(control)` tells you which one the person
140
+ pressed, before the card ends. Escape also ends the card, with no `pressed` call.
118
141
  - `VoicePrompt`, `PhraseCard`, `VoiceRibbon` and `VoiceVisual` are exported for a host that
119
142
  makes its own surfaces.
120
143