@bendyline/squisq-editor-react 2.11.17 → 2.11.18
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/dist/{chunk-HTO5MTTJ.js → chunk-45NQUR62.js} +1104 -129
- package/dist/{chunk-XZVMKR5Q.js → chunk-CGENKHWY.js} +14 -93
- package/dist/chunk-DNEVUOBZ.js +14 -0
- package/dist/chunk-DNJ6HOES.js +93 -0
- package/dist/{chunk-US5DALTZ.js → chunk-GIXXD2O3.js} +2117 -1941
- package/dist/{chunk-QZWFSSDE.js → chunk-H7YTL6SL.js} +1 -1
- package/dist/chunk-LRZJD5YD.js +107 -0
- package/dist/{chunk-C6QVA6TO.js → chunk-U6NVT3BY.js} +17 -112
- package/dist/{chunk-EJKGXWNK.js → chunk-WKZLBGPX.js} +1 -1
- package/dist/dictationSession-PN3OT5LJ.js +521 -0
- package/dist/index.d.ts +27 -4
- package/dist/index.js +50 -18
- package/dist/recorder/index.js +17 -13
- package/dist/review/index.js +2 -1
- package/dist/shell/index.d.ts +2 -1
- package/dist/shell/index.js +8 -5
- package/dist/{shell-X0EoQbbN.d.ts → shell-Cb0P_ln8.d.ts} +170 -5
- package/dist/speech/index.d.ts +126 -0
- package/dist/speech/index.js +10 -0
- package/dist/styles/index.css +125 -0
- package/dist/teleprompter/index.d.ts +11 -3
- package/dist/teleprompter/index.js +3 -2
- package/package.json +10 -6
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// src/recorder/deviceSettings.ts
|
|
2
|
+
var DEFAULT_RECORDER_DEVICE_SETTINGS = {
|
|
3
|
+
constraintMode: "ideal",
|
|
4
|
+
audio: { deviceId: "" },
|
|
5
|
+
camera: { deviceId: "" },
|
|
6
|
+
screen: {},
|
|
7
|
+
screenAudio: {},
|
|
8
|
+
encoding: {
|
|
9
|
+
audioMimeType: "",
|
|
10
|
+
videoMimeType: ""
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
function preferredNumber(value, mode) {
|
|
14
|
+
if (value === void 0 || !Number.isFinite(value) || value <= 0) return void 0;
|
|
15
|
+
return { [mode]: value };
|
|
16
|
+
}
|
|
17
|
+
function preferredInteger(value, mode) {
|
|
18
|
+
if (value === void 0 || !Number.isFinite(value) || value <= 0) return void 0;
|
|
19
|
+
return { [mode]: Math.round(value) };
|
|
20
|
+
}
|
|
21
|
+
function preferredString(value, mode) {
|
|
22
|
+
const trimmed = value?.trim();
|
|
23
|
+
return trimmed ? { [mode]: trimmed } : void 0;
|
|
24
|
+
}
|
|
25
|
+
function buildRecorderAudioConstraints(settings) {
|
|
26
|
+
const { audio, constraintMode } = settings;
|
|
27
|
+
const result = {};
|
|
28
|
+
if (audio.deviceId) result.deviceId = { exact: audio.deviceId };
|
|
29
|
+
const groupId = preferredString(audio.groupId, constraintMode);
|
|
30
|
+
if (groupId) result.groupId = groupId;
|
|
31
|
+
if (audio.autoGainControl !== void 0) result.autoGainControl = audio.autoGainControl;
|
|
32
|
+
if (audio.echoCancellation !== void 0) result.echoCancellation = audio.echoCancellation;
|
|
33
|
+
if (audio.noiseSuppression !== void 0) result.noiseSuppression = audio.noiseSuppression;
|
|
34
|
+
const channelCount = preferredInteger(audio.channelCount, constraintMode);
|
|
35
|
+
const latency = preferredNumber(audio.latency, constraintMode);
|
|
36
|
+
const sampleRate = preferredInteger(audio.sampleRate, constraintMode);
|
|
37
|
+
const sampleSize = preferredInteger(audio.sampleSize, constraintMode);
|
|
38
|
+
if (channelCount) result.channelCount = channelCount;
|
|
39
|
+
if (latency) result.latency = latency;
|
|
40
|
+
if (sampleRate) result.sampleRate = sampleRate;
|
|
41
|
+
if (sampleSize) result.sampleSize = sampleSize;
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
function buildRecorderCameraConstraints(settings) {
|
|
45
|
+
const { camera, constraintMode } = settings;
|
|
46
|
+
const result = {};
|
|
47
|
+
if (camera.deviceId) result.deviceId = { exact: camera.deviceId };
|
|
48
|
+
const groupId = preferredString(camera.groupId, constraintMode);
|
|
49
|
+
if (groupId) result.groupId = groupId;
|
|
50
|
+
if (camera.backgroundBlur !== void 0) result.backgroundBlur = camera.backgroundBlur;
|
|
51
|
+
const aspectRatio = preferredNumber(camera.aspectRatio, constraintMode);
|
|
52
|
+
const facingMode = preferredString(camera.facingMode, constraintMode);
|
|
53
|
+
const frameRate = preferredNumber(camera.frameRate, constraintMode);
|
|
54
|
+
const height = preferredInteger(camera.height, constraintMode);
|
|
55
|
+
const resizeMode = preferredString(camera.resizeMode, constraintMode);
|
|
56
|
+
const width = preferredInteger(camera.width, constraintMode);
|
|
57
|
+
if (aspectRatio) result.aspectRatio = aspectRatio;
|
|
58
|
+
if (facingMode) result.facingMode = facingMode;
|
|
59
|
+
if (frameRate) result.frameRate = frameRate;
|
|
60
|
+
if (height) result.height = height;
|
|
61
|
+
if (resizeMode) result.resizeMode = resizeMode;
|
|
62
|
+
if (width) result.width = width;
|
|
63
|
+
return result;
|
|
64
|
+
}
|
|
65
|
+
function buildRecorderScreenConstraints(settings) {
|
|
66
|
+
const { screen } = settings;
|
|
67
|
+
const result = {};
|
|
68
|
+
const aspectRatio = preferredNumber(screen.aspectRatio, "ideal");
|
|
69
|
+
const cursor = preferredString(screen.cursor, "ideal");
|
|
70
|
+
const displaySurface = preferredString(screen.displaySurface, "ideal");
|
|
71
|
+
const frameRate = preferredNumber(screen.frameRate, "ideal");
|
|
72
|
+
const height = preferredInteger(screen.height, "ideal");
|
|
73
|
+
const resizeMode = preferredString(screen.resizeMode, "ideal");
|
|
74
|
+
const width = preferredInteger(screen.width, "ideal");
|
|
75
|
+
if (screen.logicalSurface !== void 0) result.logicalSurface = screen.logicalSurface;
|
|
76
|
+
if (aspectRatio) result.aspectRatio = aspectRatio;
|
|
77
|
+
if (cursor) result.cursor = cursor;
|
|
78
|
+
if (displaySurface) result.displaySurface = displaySurface;
|
|
79
|
+
if (frameRate) result.frameRate = frameRate;
|
|
80
|
+
if (height) result.height = height;
|
|
81
|
+
if (resizeMode) result.resizeMode = resizeMode;
|
|
82
|
+
if (width) result.width = width;
|
|
83
|
+
return result;
|
|
84
|
+
}
|
|
85
|
+
function buildRecorderScreenAudioConstraints(settings) {
|
|
86
|
+
const result = {};
|
|
87
|
+
if (settings.screenAudio.restrictOwnAudio !== void 0) {
|
|
88
|
+
result.restrictOwnAudio = settings.screenAudio.restrictOwnAudio;
|
|
89
|
+
}
|
|
90
|
+
if (settings.screenAudio.suppressLocalAudioPlayback !== void 0) {
|
|
91
|
+
result.suppressLocalAudioPlayback = settings.screenAudio.suppressLocalAudioPlayback;
|
|
92
|
+
}
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
function recorderBitsPerSecond(value) {
|
|
96
|
+
if (value === void 0 || !Number.isFinite(value) || value <= 0) return void 0;
|
|
97
|
+
return Math.round(value * 1e3);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export {
|
|
101
|
+
DEFAULT_RECORDER_DEVICE_SETTINGS,
|
|
102
|
+
buildRecorderAudioConstraints,
|
|
103
|
+
buildRecorderCameraConstraints,
|
|
104
|
+
buildRecorderScreenConstraints,
|
|
105
|
+
buildRecorderScreenAudioConstraints,
|
|
106
|
+
recorderBitsPerSecond
|
|
107
|
+
};
|
|
@@ -1,25 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_RECORDER_DEVICE_SETTINGS,
|
|
3
|
+
buildRecorderAudioConstraints,
|
|
4
|
+
buildRecorderCameraConstraints,
|
|
5
|
+
buildRecorderScreenAudioConstraints,
|
|
6
|
+
buildRecorderScreenConstraints,
|
|
7
|
+
recorderBitsPerSecond
|
|
8
|
+
} from "./chunk-LRZJD5YD.js";
|
|
1
9
|
import {
|
|
2
10
|
Icon
|
|
3
11
|
} from "./chunk-GS7QWYFT.js";
|
|
4
12
|
import {
|
|
5
13
|
NarrationStage,
|
|
6
|
-
buildFilename,
|
|
7
14
|
buildTimingJson,
|
|
8
15
|
encodeNarrationTimingJson,
|
|
9
16
|
encodeTimingJson,
|
|
10
17
|
formatRecordingBytes,
|
|
11
18
|
requestCameraStream,
|
|
19
|
+
resolveMaxRecordingBytes,
|
|
20
|
+
timingPathFor,
|
|
21
|
+
useNarrationStage,
|
|
22
|
+
useStreamPreview
|
|
23
|
+
} from "./chunk-CGENKHWY.js";
|
|
24
|
+
import {
|
|
25
|
+
buildFilename,
|
|
12
26
|
requestMicStream,
|
|
13
27
|
resolveFormat,
|
|
14
|
-
resolveMaxRecordingBytes,
|
|
15
28
|
supportsDisplayMedia,
|
|
16
29
|
supportsMediaRecorder,
|
|
17
30
|
supportsSystemAudioCapture,
|
|
18
|
-
supportsUserMedia
|
|
19
|
-
|
|
20
|
-
useNarrationStage,
|
|
21
|
-
useStreamPreview
|
|
22
|
-
} from "./chunk-XZVMKR5Q.js";
|
|
31
|
+
supportsUserMedia
|
|
32
|
+
} from "./chunk-DNJ6HOES.js";
|
|
23
33
|
|
|
24
34
|
// src/recorder/sources/screenRegion.ts
|
|
25
35
|
function validateScreenCaptureRegion(region, width, height) {
|
|
@@ -1707,105 +1717,6 @@ function RecorderDeviceQuickPicks({
|
|
|
1707
1717
|
] });
|
|
1708
1718
|
}
|
|
1709
1719
|
|
|
1710
|
-
// src/recorder/deviceSettings.ts
|
|
1711
|
-
var DEFAULT_RECORDER_DEVICE_SETTINGS = {
|
|
1712
|
-
constraintMode: "ideal",
|
|
1713
|
-
audio: { deviceId: "" },
|
|
1714
|
-
camera: { deviceId: "" },
|
|
1715
|
-
screen: {},
|
|
1716
|
-
screenAudio: {},
|
|
1717
|
-
encoding: {
|
|
1718
|
-
audioMimeType: "",
|
|
1719
|
-
videoMimeType: ""
|
|
1720
|
-
}
|
|
1721
|
-
};
|
|
1722
|
-
function preferredNumber(value, mode) {
|
|
1723
|
-
if (value === void 0 || !Number.isFinite(value) || value <= 0) return void 0;
|
|
1724
|
-
return { [mode]: value };
|
|
1725
|
-
}
|
|
1726
|
-
function preferredInteger(value, mode) {
|
|
1727
|
-
if (value === void 0 || !Number.isFinite(value) || value <= 0) return void 0;
|
|
1728
|
-
return { [mode]: Math.round(value) };
|
|
1729
|
-
}
|
|
1730
|
-
function preferredString(value, mode) {
|
|
1731
|
-
const trimmed = value?.trim();
|
|
1732
|
-
return trimmed ? { [mode]: trimmed } : void 0;
|
|
1733
|
-
}
|
|
1734
|
-
function buildRecorderAudioConstraints(settings) {
|
|
1735
|
-
const { audio, constraintMode } = settings;
|
|
1736
|
-
const result = {};
|
|
1737
|
-
if (audio.deviceId) result.deviceId = { exact: audio.deviceId };
|
|
1738
|
-
const groupId = preferredString(audio.groupId, constraintMode);
|
|
1739
|
-
if (groupId) result.groupId = groupId;
|
|
1740
|
-
if (audio.autoGainControl !== void 0) result.autoGainControl = audio.autoGainControl;
|
|
1741
|
-
if (audio.echoCancellation !== void 0) result.echoCancellation = audio.echoCancellation;
|
|
1742
|
-
if (audio.noiseSuppression !== void 0) result.noiseSuppression = audio.noiseSuppression;
|
|
1743
|
-
const channelCount = preferredInteger(audio.channelCount, constraintMode);
|
|
1744
|
-
const latency = preferredNumber(audio.latency, constraintMode);
|
|
1745
|
-
const sampleRate = preferredInteger(audio.sampleRate, constraintMode);
|
|
1746
|
-
const sampleSize = preferredInteger(audio.sampleSize, constraintMode);
|
|
1747
|
-
if (channelCount) result.channelCount = channelCount;
|
|
1748
|
-
if (latency) result.latency = latency;
|
|
1749
|
-
if (sampleRate) result.sampleRate = sampleRate;
|
|
1750
|
-
if (sampleSize) result.sampleSize = sampleSize;
|
|
1751
|
-
return result;
|
|
1752
|
-
}
|
|
1753
|
-
function buildRecorderCameraConstraints(settings) {
|
|
1754
|
-
const { camera, constraintMode } = settings;
|
|
1755
|
-
const result = {};
|
|
1756
|
-
if (camera.deviceId) result.deviceId = { exact: camera.deviceId };
|
|
1757
|
-
const groupId = preferredString(camera.groupId, constraintMode);
|
|
1758
|
-
if (groupId) result.groupId = groupId;
|
|
1759
|
-
if (camera.backgroundBlur !== void 0) result.backgroundBlur = camera.backgroundBlur;
|
|
1760
|
-
const aspectRatio = preferredNumber(camera.aspectRatio, constraintMode);
|
|
1761
|
-
const facingMode = preferredString(camera.facingMode, constraintMode);
|
|
1762
|
-
const frameRate = preferredNumber(camera.frameRate, constraintMode);
|
|
1763
|
-
const height = preferredInteger(camera.height, constraintMode);
|
|
1764
|
-
const resizeMode = preferredString(camera.resizeMode, constraintMode);
|
|
1765
|
-
const width = preferredInteger(camera.width, constraintMode);
|
|
1766
|
-
if (aspectRatio) result.aspectRatio = aspectRatio;
|
|
1767
|
-
if (facingMode) result.facingMode = facingMode;
|
|
1768
|
-
if (frameRate) result.frameRate = frameRate;
|
|
1769
|
-
if (height) result.height = height;
|
|
1770
|
-
if (resizeMode) result.resizeMode = resizeMode;
|
|
1771
|
-
if (width) result.width = width;
|
|
1772
|
-
return result;
|
|
1773
|
-
}
|
|
1774
|
-
function buildRecorderScreenConstraints(settings) {
|
|
1775
|
-
const { screen } = settings;
|
|
1776
|
-
const result = {};
|
|
1777
|
-
const aspectRatio = preferredNumber(screen.aspectRatio, "ideal");
|
|
1778
|
-
const cursor = preferredString(screen.cursor, "ideal");
|
|
1779
|
-
const displaySurface = preferredString(screen.displaySurface, "ideal");
|
|
1780
|
-
const frameRate = preferredNumber(screen.frameRate, "ideal");
|
|
1781
|
-
const height = preferredInteger(screen.height, "ideal");
|
|
1782
|
-
const resizeMode = preferredString(screen.resizeMode, "ideal");
|
|
1783
|
-
const width = preferredInteger(screen.width, "ideal");
|
|
1784
|
-
if (screen.logicalSurface !== void 0) result.logicalSurface = screen.logicalSurface;
|
|
1785
|
-
if (aspectRatio) result.aspectRatio = aspectRatio;
|
|
1786
|
-
if (cursor) result.cursor = cursor;
|
|
1787
|
-
if (displaySurface) result.displaySurface = displaySurface;
|
|
1788
|
-
if (frameRate) result.frameRate = frameRate;
|
|
1789
|
-
if (height) result.height = height;
|
|
1790
|
-
if (resizeMode) result.resizeMode = resizeMode;
|
|
1791
|
-
if (width) result.width = width;
|
|
1792
|
-
return result;
|
|
1793
|
-
}
|
|
1794
|
-
function buildRecorderScreenAudioConstraints(settings) {
|
|
1795
|
-
const result = {};
|
|
1796
|
-
if (settings.screenAudio.restrictOwnAudio !== void 0) {
|
|
1797
|
-
result.restrictOwnAudio = settings.screenAudio.restrictOwnAudio;
|
|
1798
|
-
}
|
|
1799
|
-
if (settings.screenAudio.suppressLocalAudioPlayback !== void 0) {
|
|
1800
|
-
result.suppressLocalAudioPlayback = settings.screenAudio.suppressLocalAudioPlayback;
|
|
1801
|
-
}
|
|
1802
|
-
return result;
|
|
1803
|
-
}
|
|
1804
|
-
function recorderBitsPerSecond(value) {
|
|
1805
|
-
if (value === void 0 || !Number.isFinite(value) || value <= 0) return void 0;
|
|
1806
|
-
return Math.round(value * 1e3);
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
1720
|
// src/recorder/recordedMediaKind.ts
|
|
1810
1721
|
function recordedMediaKind(source, stream, mimeType) {
|
|
1811
1722
|
if (stream) return stream.getVideoTracks().length > 0 ? "video" : "audio";
|
|
@@ -3922,12 +3833,6 @@ export {
|
|
|
3922
3833
|
useMediaDevices,
|
|
3923
3834
|
RecorderDeviceSettingsPanel,
|
|
3924
3835
|
RecorderDeviceQuickPicks,
|
|
3925
|
-
DEFAULT_RECORDER_DEVICE_SETTINGS,
|
|
3926
|
-
buildRecorderAudioConstraints,
|
|
3927
|
-
buildRecorderCameraConstraints,
|
|
3928
|
-
buildRecorderScreenConstraints,
|
|
3929
|
-
buildRecorderScreenAudioConstraints,
|
|
3930
|
-
recorderBitsPerSecond,
|
|
3931
3836
|
recordedMediaKind,
|
|
3932
3837
|
isExpandedPanel,
|
|
3933
3838
|
panelModeAfterToggle,
|