@pie-players/pie-tool-tts-inline 0.3.51 → 0.3.53
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 -0
- package/dist/tool-tts-inline.js +922 -897
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -165,6 +165,7 @@ When used with the section player, this tool benefits from extracted catalogs
|
|
|
165
165
|
when a host/import pipeline runs `SSMLExtractor` before render:
|
|
166
166
|
|
|
167
167
|
**Author embeds SSML in content:**
|
|
168
|
+
|
|
168
169
|
```html
|
|
169
170
|
<div>
|
|
170
171
|
<speak>Solve <prosody rate="slow">x squared plus two</prosody>.</speak>
|
|
@@ -173,11 +174,13 @@ when a host/import pipeline runs `SSMLExtractor` before render:
|
|
|
173
174
|
```
|
|
174
175
|
|
|
175
176
|
**Preprocessing extracts SSML:**
|
|
177
|
+
|
|
176
178
|
- Generates catalog with ID like `auto-prompt-q1-0`
|
|
177
179
|
- Adds `data-catalog-idref="auto-prompt-q1-0"` to visual content
|
|
178
180
|
- Provides `config.extractedCatalogs` for runtime catalog registration
|
|
179
181
|
|
|
180
182
|
**Tool uses extracted catalog:**
|
|
183
|
+
|
|
181
184
|
- User clicks TTS button in header
|
|
182
185
|
- Tool calls `ttsService.speak(text, { catalogId: 'auto-prompt-q1-0' })`
|
|
183
186
|
- TTSService finds SSML in extracted catalogs
|
|
@@ -194,6 +197,28 @@ The component uses scoped styles and doesn't require external CSS. Styling uses
|
|
|
194
197
|
- **Speed state**: Active speed button receives distinct token-driven styling
|
|
195
198
|
- **Disabled**: Reduced opacity, no pointer
|
|
196
199
|
|
|
200
|
+
Hosts that need to theme the trigger's active/open state should prefer these
|
|
201
|
+
component-scoped variables instead of overriding broad semantic tokens such as
|
|
202
|
+
`--pie-primary`:
|
|
203
|
+
|
|
204
|
+
```css
|
|
205
|
+
--pie-tool-trigger-active-background: Active/open trigger background
|
|
206
|
+
--pie-tool-trigger-active-color: Active/open trigger foreground
|
|
207
|
+
--pie-tool-trigger-active-border-color: Active/open trigger border
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
If unset, the trigger keeps the existing defaults: active background and border
|
|
211
|
+
derive from `--pie-primary`, while foreground continues through
|
|
212
|
+
`--pie-button-color` / `--pie-text`. Hosts remain responsible for maintaining
|
|
213
|
+
WCAG AA foreground/background contrast when overriding active trigger colors.
|
|
214
|
+
|
|
215
|
+
Ordinary trigger and control button styling also preserves these legacy aliases:
|
|
216
|
+
`--pie-button-background-color`, `--pie-button-border-color`, and
|
|
217
|
+
`--pie-button-hover-background-color`. They remain supported for host
|
|
218
|
+
compatibility, but fall back through the canonical `--pie-button-bg`,
|
|
219
|
+
`--pie-button-border`, and `--pie-button-hover-bg` tokens before broad surface
|
|
220
|
+
tokens.
|
|
221
|
+
|
|
197
222
|
## Architecture
|
|
198
223
|
|
|
199
224
|
This tool follows the PIE Assessment Toolkit tool pattern:
|