ssml-builder-js 1.0.0 → 2.1.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 CHANGED
@@ -124,6 +124,8 @@ const parsed = parseSsml(ssml);
124
124
 
125
125
  `SsmlEditor` は `SsmlDocument` を受け取り、ツールバーと本文の表示エリアだけを表示するシンプルなコンポーネントです。ツールバーから選択範囲の速度、音量、ピッチなどの設定、元に戻す・やり直す操作ができます。音声の選択と表示はアプリ側で行います。本文の編集には Monaco Editor を使用し、変更時に SSML の構文を検証します。構文エラーはエディター上のマーカーとエラーメッセージで表示されます。XML のタグ名やパラメータへホバーすると SSML の説明を確認できます。テキストを選択すると、選択文字数と試聴を行うフローティングアクションが表示されます。`showDecorations` が有効な場合、`break` と `prosody` のタグに間やピッチ変化を示すインラインバッジが表示され、Monaco のインライン装飾も有効になります。生成された SSML は `onSsmlChange` で受け取り、アプリ側で自由に表示できます。`SsmlEditorRef` を `ref` に渡すと、全体、選択範囲、または現在行の SSML を取得できます。画面表示は日本語(デフォルト)と英語に対応しています。
126
126
 
127
+ `<mstts:express-as>` の `style` 属性補完と標準の感情メニューは、カーソルまたは選択範囲を囲む最内の `<voice name="...">` が対応するスタイルだけを表示します。登録済みでスタイル非対応の音声では候補がないことを表示し、音声が未指定または未登録の場合は従来の全候補へフォールバックします。`emotionStyles` を指定した場合、感情メニューではその値と登録済み音声の対応スタイルの共通部分を使用します。
128
+
127
129
  ```tsx
128
130
  import { useState } from "react";
129
131
  import { SsmlEditor } from "ssml-builder-js/react";
@@ -376,6 +378,8 @@ Typed representations are available for elements such as `voice`, `prosody`, `br
376
378
 
377
379
  `SsmlEditor` accepts an `SsmlDocument` and renders only a toolbar and text display area. The toolbar applies rate, volume, and pitch settings to the selection and provides undo and redo actions. The application is responsible for selecting and displaying the voice. Monaco Editor is used for text editing, and SSML syntax is validated whenever the text changes. Syntax errors are shown with editor markers and an error message. Hovering over XML tag names or parameters shows SSML descriptions. Selecting text displays a floating action bar with the character count and preview action. When `showDecorations` is enabled, inline badges for pause and pitch changes are rendered next to `break` and `prosody` tags, and Monaco inline decorations are enabled. Generated SSML is provided through `onSsmlChange` so the application can display it wherever it needs. Pass an `SsmlEditorRef` through `ref` to retrieve full, selected, or current-line SSML, and use `onSelectionChange` to observe selection text and state. The UI supports Japanese (the default) and English.
378
380
 
381
+ Completion for the `<mstts:express-as>` `style` attribute and the built-in Emotion menu only show styles supported by the innermost `<voice name="...">` around the cursor or selection. A registered voice with no styles displays an empty-state message, while a missing or unregistered voice falls back to all legacy candidates. When `emotionStyles` is supplied, the Emotion menu uses its intersection with the registered voice's supported styles.
382
+
379
383
  ```tsx
380
384
  import { useState } from "react";
381
385
  import { SsmlEditor } from "ssml-builder-js/react";
package/dist/react.d.mts CHANGED
@@ -148,6 +148,7 @@ interface EditorCopy {
148
148
  selectionCountSuffix: string;
149
149
  previewSelection: string;
150
150
  previewSelectionTitle: string;
151
+ noAvailableOptions: string;
151
152
  }
152
153
  interface InlineBadgeCopy {
153
154
  pause: string;
package/dist/react.d.ts CHANGED
@@ -148,6 +148,7 @@ interface EditorCopy {
148
148
  selectionCountSuffix: string;
149
149
  previewSelection: string;
150
150
  previewSelectionTitle: string;
151
+ noAvailableOptions: string;
151
152
  }
152
153
  interface InlineBadgeCopy {
153
154
  pause: string;