@ssml-builder-js/ssml-editor-react 2.8.1 → 2.10.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/CHANGELOG.md +22 -0
- package/dist/index.d.mts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +414 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +412 -58
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/SsmlEditor.tsx +153 -57
- package/src/components/VisualSsmlEditor.tsx +240 -0
- package/src/constants/ssmlPresets.ts +5 -0
- package/src/index.tsx +3 -0
- package/src/ssmlCompletion.ts +16 -0
- package/src/ssmlHover.ts +57 -0
- package/src/styles/editorStyles.ts +8 -0
- package/test/ui-components.test.tsx +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @ssml-builder-js/ssml-editor-react
|
|
2
2
|
|
|
3
|
+
## 2.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Release v2.10.0 with expanded Azure SSML extension attributes, stricter background audio and multi-talker validation, and updated package entrypoint documentation.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @ssml-builder-js/ssml-core@2.10.0
|
|
13
|
+
|
|
14
|
+
## 2.9.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- Release v2.9.0 with Azure SSML validation and migration utilities, voice catalog support, and visual/editor improvements.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
- @ssml-builder-js/ssml-core@2.9.0
|
|
24
|
+
|
|
3
25
|
## 2.8.1
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
import { ReactNode, CSSProperties, ReactElement } from 'react';
|
|
3
3
|
import { SsmlDocument } from '@ssml-builder-js/ssml-core';
|
|
4
4
|
import { OnMount, Monaco } from '@monaco-editor/react';
|
|
5
5
|
|
|
@@ -213,6 +213,8 @@ interface SsmlEditorProps {
|
|
|
213
213
|
minHeight?: string | number;
|
|
214
214
|
/** Whether the Monaco editor is read-only. */
|
|
215
215
|
readOnly?: boolean;
|
|
216
|
+
/** Selects the XML source editor or the structured visual editor. */
|
|
217
|
+
editMode?: SsmlEditorEditMode;
|
|
216
218
|
/** Monaco theme mode. */
|
|
217
219
|
theme?: SsmlEditorTheme;
|
|
218
220
|
/** Monaco editor font size. */
|
|
@@ -252,6 +254,7 @@ interface SsmlEditorProps {
|
|
|
252
254
|
/** Inline styles applied to the editor display area. */
|
|
253
255
|
displayStyle?: CSSProperties;
|
|
254
256
|
}
|
|
257
|
+
type SsmlEditorEditMode = "code" | "visual";
|
|
255
258
|
interface SelectionInfo {
|
|
256
259
|
selectedText: string;
|
|
257
260
|
characterCount: number;
|
|
@@ -264,6 +267,14 @@ interface SsmlEditorRef {
|
|
|
264
267
|
}
|
|
265
268
|
declare const SsmlEditor: react.ForwardRefExoticComponent<SsmlEditorProps & react.RefAttributes<SsmlEditorRef>>;
|
|
266
269
|
|
|
270
|
+
interface VisualSsmlEditorProps {
|
|
271
|
+
document: SsmlDocument;
|
|
272
|
+
readOnly?: boolean;
|
|
273
|
+
onChange?: (document: SsmlDocument) => void;
|
|
274
|
+
onPreviewSelection?: (ssml: string) => void;
|
|
275
|
+
}
|
|
276
|
+
declare function VisualSsmlEditor({ document, readOnly, onChange, onPreviewSelection, }: VisualSsmlEditorProps): ReactElement;
|
|
277
|
+
|
|
267
278
|
type MonacoEditor = Parameters<OnMount>[0];
|
|
268
279
|
|
|
269
280
|
interface SsmlTagRange {
|
|
@@ -285,4 +296,4 @@ type SsmlCodeLensAction = {
|
|
|
285
296
|
type SsmlCodeLensCallback = (action: SsmlCodeLensAction) => void;
|
|
286
297
|
declare function registerSsmlCodeLens(monaco: Monaco, editor: MonacoEditor, onOpenPopover: SsmlCodeLensCallback): ReturnType<Monaco["languages"]["registerCodeLensProvider"]>;
|
|
287
298
|
|
|
288
|
-
export { EDITOR_COPY, type EditorCopy, INLINE_BADGE_COPY, type InlineBadgeCopy, SSML_HOVER_COPY, SSML_INSERTIONS, type SelectionInfo, type SsmlCodeLensAction, type SsmlCodeLensCallback, SsmlEditor, type SsmlEditorButton, type SsmlEditorButtonVisibility, type SsmlEditorCustomInsertion, type SsmlEditorCustomInsertionCollection, type SsmlEditorCustomInsertionDefinition, type SsmlEditorInsertionButton, type SsmlEditorInsertionDefinition, type SsmlEditorInsertionGroup, type SsmlEditorInsertionMode, type SsmlEditorInsertionOption, type SsmlEditorInsertionTemplate, type SsmlEditorLanguage, type SsmlEditorLineNumbers, type SsmlEditorLocale, type SsmlEditorLocalizedText, type SsmlEditorOptions, type SsmlEditorProps, type SsmlEditorRef, type SsmlEditorTheme, type SsmlEditorToolbarGroup, type SsmlEditorWordWrap, type SsmlHoverLocale, type SsmlHoverParameterCopy, type SsmlHoverTagCopy, type SsmlInsertionDefinition, type SsmlInsertionOption, type SsmlInsertionTemplate, type SsmlTagRange, createSsmlEditorInsertionDefinition, registerSsmlCodeLens, updateTagAttribute };
|
|
299
|
+
export { EDITOR_COPY, type EditorCopy, INLINE_BADGE_COPY, type InlineBadgeCopy, SSML_HOVER_COPY, SSML_INSERTIONS, type SelectionInfo, type SsmlCodeLensAction, type SsmlCodeLensCallback, SsmlEditor, type SsmlEditorButton, type SsmlEditorButtonVisibility, type SsmlEditorCustomInsertion, type SsmlEditorCustomInsertionCollection, type SsmlEditorCustomInsertionDefinition, type SsmlEditorEditMode, type SsmlEditorInsertionButton, type SsmlEditorInsertionDefinition, type SsmlEditorInsertionGroup, type SsmlEditorInsertionMode, type SsmlEditorInsertionOption, type SsmlEditorInsertionTemplate, type SsmlEditorLanguage, type SsmlEditorLineNumbers, type SsmlEditorLocale, type SsmlEditorLocalizedText, type SsmlEditorOptions, type SsmlEditorProps, type SsmlEditorRef, type SsmlEditorTheme, type SsmlEditorToolbarGroup, type SsmlEditorWordWrap, type SsmlHoverLocale, type SsmlHoverParameterCopy, type SsmlHoverTagCopy, type SsmlInsertionDefinition, type SsmlInsertionOption, type SsmlInsertionTemplate, type SsmlTagRange, VisualSsmlEditor, type VisualSsmlEditorProps, createSsmlEditorInsertionDefinition, registerSsmlCodeLens, updateTagAttribute };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
import { ReactNode, CSSProperties, ReactElement } from 'react';
|
|
3
3
|
import { SsmlDocument } from '@ssml-builder-js/ssml-core';
|
|
4
4
|
import { OnMount, Monaco } from '@monaco-editor/react';
|
|
5
5
|
|
|
@@ -213,6 +213,8 @@ interface SsmlEditorProps {
|
|
|
213
213
|
minHeight?: string | number;
|
|
214
214
|
/** Whether the Monaco editor is read-only. */
|
|
215
215
|
readOnly?: boolean;
|
|
216
|
+
/** Selects the XML source editor or the structured visual editor. */
|
|
217
|
+
editMode?: SsmlEditorEditMode;
|
|
216
218
|
/** Monaco theme mode. */
|
|
217
219
|
theme?: SsmlEditorTheme;
|
|
218
220
|
/** Monaco editor font size. */
|
|
@@ -252,6 +254,7 @@ interface SsmlEditorProps {
|
|
|
252
254
|
/** Inline styles applied to the editor display area. */
|
|
253
255
|
displayStyle?: CSSProperties;
|
|
254
256
|
}
|
|
257
|
+
type SsmlEditorEditMode = "code" | "visual";
|
|
255
258
|
interface SelectionInfo {
|
|
256
259
|
selectedText: string;
|
|
257
260
|
characterCount: number;
|
|
@@ -264,6 +267,14 @@ interface SsmlEditorRef {
|
|
|
264
267
|
}
|
|
265
268
|
declare const SsmlEditor: react.ForwardRefExoticComponent<SsmlEditorProps & react.RefAttributes<SsmlEditorRef>>;
|
|
266
269
|
|
|
270
|
+
interface VisualSsmlEditorProps {
|
|
271
|
+
document: SsmlDocument;
|
|
272
|
+
readOnly?: boolean;
|
|
273
|
+
onChange?: (document: SsmlDocument) => void;
|
|
274
|
+
onPreviewSelection?: (ssml: string) => void;
|
|
275
|
+
}
|
|
276
|
+
declare function VisualSsmlEditor({ document, readOnly, onChange, onPreviewSelection, }: VisualSsmlEditorProps): ReactElement;
|
|
277
|
+
|
|
267
278
|
type MonacoEditor = Parameters<OnMount>[0];
|
|
268
279
|
|
|
269
280
|
interface SsmlTagRange {
|
|
@@ -285,4 +296,4 @@ type SsmlCodeLensAction = {
|
|
|
285
296
|
type SsmlCodeLensCallback = (action: SsmlCodeLensAction) => void;
|
|
286
297
|
declare function registerSsmlCodeLens(monaco: Monaco, editor: MonacoEditor, onOpenPopover: SsmlCodeLensCallback): ReturnType<Monaco["languages"]["registerCodeLensProvider"]>;
|
|
287
298
|
|
|
288
|
-
export { EDITOR_COPY, type EditorCopy, INLINE_BADGE_COPY, type InlineBadgeCopy, SSML_HOVER_COPY, SSML_INSERTIONS, type SelectionInfo, type SsmlCodeLensAction, type SsmlCodeLensCallback, SsmlEditor, type SsmlEditorButton, type SsmlEditorButtonVisibility, type SsmlEditorCustomInsertion, type SsmlEditorCustomInsertionCollection, type SsmlEditorCustomInsertionDefinition, type SsmlEditorInsertionButton, type SsmlEditorInsertionDefinition, type SsmlEditorInsertionGroup, type SsmlEditorInsertionMode, type SsmlEditorInsertionOption, type SsmlEditorInsertionTemplate, type SsmlEditorLanguage, type SsmlEditorLineNumbers, type SsmlEditorLocale, type SsmlEditorLocalizedText, type SsmlEditorOptions, type SsmlEditorProps, type SsmlEditorRef, type SsmlEditorTheme, type SsmlEditorToolbarGroup, type SsmlEditorWordWrap, type SsmlHoverLocale, type SsmlHoverParameterCopy, type SsmlHoverTagCopy, type SsmlInsertionDefinition, type SsmlInsertionOption, type SsmlInsertionTemplate, type SsmlTagRange, createSsmlEditorInsertionDefinition, registerSsmlCodeLens, updateTagAttribute };
|
|
299
|
+
export { EDITOR_COPY, type EditorCopy, INLINE_BADGE_COPY, type InlineBadgeCopy, SSML_HOVER_COPY, SSML_INSERTIONS, type SelectionInfo, type SsmlCodeLensAction, type SsmlCodeLensCallback, SsmlEditor, type SsmlEditorButton, type SsmlEditorButtonVisibility, type SsmlEditorCustomInsertion, type SsmlEditorCustomInsertionCollection, type SsmlEditorCustomInsertionDefinition, type SsmlEditorEditMode, type SsmlEditorInsertionButton, type SsmlEditorInsertionDefinition, type SsmlEditorInsertionGroup, type SsmlEditorInsertionMode, type SsmlEditorInsertionOption, type SsmlEditorInsertionTemplate, type SsmlEditorLanguage, type SsmlEditorLineNumbers, type SsmlEditorLocale, type SsmlEditorLocalizedText, type SsmlEditorOptions, type SsmlEditorProps, type SsmlEditorRef, type SsmlEditorTheme, type SsmlEditorToolbarGroup, type SsmlEditorWordWrap, type SsmlHoverLocale, type SsmlHoverParameterCopy, type SsmlHoverTagCopy, type SsmlInsertionDefinition, type SsmlInsertionOption, type SsmlInsertionTemplate, type SsmlTagRange, VisualSsmlEditor, type VisualSsmlEditorProps, createSsmlEditorInsertionDefinition, registerSsmlCodeLens, updateTagAttribute };
|