@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 +25 -2
- package/dist/browser/card.js +49 -32
- package/dist/browser/chunks/{microphone-CU5gQG6w.js → microphone-BQVF_tVV.js} +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/esm/card/index.js +1 -1
- package/dist/esm/card/phraseCard.js +5 -8
- package/dist/esm/card/prompt.js +64 -35
- package/dist/esm/card/ribbon.js +14 -3
- package/dist/esm/card/rowMotion.js +8 -0
- package/dist/esm/card/surface.js +47 -11
- package/dist/esm/card/visual.js +2 -2
- package/dist/esm/chunks/{visual-Di3ojTED.js → visual-CeEQ8QkM.js} +31 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/microphone.js +18 -2
- package/dist/example/example.js +8 -2
- package/dist/example/index.html +1 -0
- package/dist/types/card/index.d.ts +1 -1
- package/dist/types/card/prompt.d.ts +4 -3
- package/dist/types/card/ribbon.d.ts +2 -0
- package/dist/types/card/rowMotion.d.ts +5 -0
- package/dist/types/card/surface.d.ts +18 -2
- package/dist/types/card/visual.d.ts +3 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/microphone.d.ts +7 -0
- package/package.json +1 -1
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,
|
|
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
|
|