@bendyline/squisq-editor-react 2.11.18 → 2.11.20
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-2MP7QE7O.js +15 -0
- package/dist/{chunk-H7YTL6SL.js → chunk-DJS5I5NO.js} +1 -1
- package/dist/{chunk-DPAMJV6A.js → chunk-HSWWEWT4.js} +31 -2
- package/dist/{chunk-45NQUR62.js → chunk-JI74KA6C.js} +197 -126
- package/dist/chunk-K56KR27T.js +141 -0
- package/dist/{chunk-WKZLBGPX.js → chunk-LR6Q2MK4.js} +1 -1
- package/dist/{chunk-GIXXD2O3.js → chunk-NL4JP55H.js} +3453 -2606
- package/dist/{chunk-2XXBDECJ.js → chunk-OCQEWWHI.js} +1 -1
- package/dist/{chunk-U6NVT3BY.js → chunk-UFK47ZAI.js} +42 -22
- package/dist/{chunk-UBFNLWCN.js → chunk-V2OLZOYJ.js} +2 -2
- package/dist/{chunk-CGENKHWY.js → chunk-ZS6G2P57.js} +27 -3
- package/dist/deviceSettings-BSkIQncC.d.ts +83 -0
- package/dist/{dictationSession-PN3OT5LJ.js → dictationSession-SLDNYIZ2.js} +3 -133
- package/dist/index.d.ts +200 -18
- package/dist/index.js +33 -10
- package/dist/json-editor/index.js +3 -3
- package/dist/recorder/index.d.ts +4 -2
- package/dist/recorder/index.js +3 -3
- package/dist/{recorder-CRsw0eC7.d.ts → recorder-Civyq5SU.d.ts} +4 -82
- package/dist/review/index.js +2 -2
- package/dist/screenRegion-Ci_RsCzG.d.ts +8 -0
- package/dist/shell/index.d.ts +2 -2
- package/dist/shell/index.js +11 -9
- package/dist/{shell-Cb0P_ln8.d.ts → shell-DTefmCBG.d.ts} +40 -3
- package/dist/speech/index.d.ts +35 -118
- package/dist/speech/index.js +7 -1
- package/dist/speechAudioWav-WKIQWGIJ.js +13 -0
- package/dist/styles/index.css +113 -3
- package/dist/teleprompter/index.d.ts +3 -2
- package/dist/teleprompter/index.js +2 -2
- package/dist/types-Bi4ZVKvN.d.ts +126 -0
- package/dist/{useNarrationStage-vKtk6H-V.d.ts → useNarrationStage-DlighI1z.d.ts} +17 -9
- package/package.json +6 -6
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/speech/index.ts
|
|
2
|
+
async function startDictationSession(options) {
|
|
3
|
+
const session = await import("./dictationSession-SLDNYIZ2.js");
|
|
4
|
+
if (options.signal.aborted) throw new DOMException("Aborted", "AbortError");
|
|
5
|
+
return session.startDictationSession(options);
|
|
6
|
+
}
|
|
7
|
+
async function encodeMonoPcm16Wav(channels, sampleRate) {
|
|
8
|
+
const audio = await import("./speechAudioWav-WKIQWGIJ.js");
|
|
9
|
+
return audio.encodeMonoPcm16Wav(channels, sampleRate);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
startDictationSession,
|
|
14
|
+
encodeMonoPcm16Wav
|
|
15
|
+
};
|
|
@@ -70,6 +70,35 @@ var RE_ITALIC_UNDER = /(?<![\p{L}\p{N}_])_(?![\s_])(.+?)(?<![\s_])_(?![\p{L}\p{N
|
|
|
70
70
|
var RE_STRIKETHROUGH = /~~(.+?)~~/g;
|
|
71
71
|
var RE_LEGACY_BOLD_STAR = /\*\*(?![\s*])((?:(?!\*\*).)+?)(?<![\s*])([ \t]+)\*\*(?=$|[^\s*])/g;
|
|
72
72
|
var RE_LEGACY_ITALIC_STAR = /(?<!\*)\*(?![\s*])([^*]+?)(?<![\s*])([ \t]+)\*(?=$|[^\s*])/g;
|
|
73
|
+
var RE_BOLD_DELIMITER = /\*\*/g;
|
|
74
|
+
var RE_ITALIC_DELIMITER = /\*/g;
|
|
75
|
+
function countEmphasisDelimiters(text, end, delimiter) {
|
|
76
|
+
let count = 0;
|
|
77
|
+
delimiter.lastIndex = 0;
|
|
78
|
+
for (let match = delimiter.exec(text); match && match.index < end; match = delimiter.exec(text)) {
|
|
79
|
+
const before = text[match.index - 1];
|
|
80
|
+
const after = text[match.index + match[0].length];
|
|
81
|
+
if ((before === void 0 || /\s/.test(before)) && (after === void 0 || /\s/.test(after))) {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
count++;
|
|
85
|
+
}
|
|
86
|
+
return count;
|
|
87
|
+
}
|
|
88
|
+
function recoverLegacyEmphasis(text, pattern, delimiter, delimiterLength, tag) {
|
|
89
|
+
let output = "";
|
|
90
|
+
let copied = 0;
|
|
91
|
+
pattern.lastIndex = 0;
|
|
92
|
+
for (let match = pattern.exec(text); match; match = pattern.exec(text)) {
|
|
93
|
+
if (countEmphasisDelimiters(text, match.index, delimiter) % 2 === 1) {
|
|
94
|
+
pattern.lastIndex = match.index + delimiterLength;
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
output += `${text.slice(copied, match.index)}<${tag}>${match[1]}</${tag}>${match[2]}`;
|
|
98
|
+
copied = match.index + match[0].length;
|
|
99
|
+
}
|
|
100
|
+
return output + text.slice(copied);
|
|
101
|
+
}
|
|
73
102
|
var ESCAPABLE_MD_CHARS = ["*", "_", "~", "\\"];
|
|
74
103
|
var RE_MD_ESCAPE = /\\([*_~\\])/g;
|
|
75
104
|
var RE_BACKSLASH_PAIR = /\\([\s\S])/g;
|
|
@@ -972,10 +1001,10 @@ function inlineToHtml(text) {
|
|
|
972
1001
|
RE_MD_ESCAPE,
|
|
973
1002
|
(_m, ch) => `\0ESC${ESCAPABLE_MD_CHARS.indexOf(ch)}\0`
|
|
974
1003
|
);
|
|
975
|
-
result = result
|
|
1004
|
+
result = recoverLegacyEmphasis(result, RE_LEGACY_BOLD_STAR, RE_BOLD_DELIMITER, 2, "strong");
|
|
976
1005
|
result = result.replace(RE_BOLD_STAR, "<strong>$1</strong>");
|
|
977
1006
|
result = result.replace(RE_BOLD_UNDER, "<strong>$1</strong>");
|
|
978
|
-
result = result
|
|
1007
|
+
result = recoverLegacyEmphasis(result, RE_LEGACY_ITALIC_STAR, RE_ITALIC_DELIMITER, 1, "em");
|
|
979
1008
|
result = result.replace(RE_ITALIC_STAR, "<em>$1</em>");
|
|
980
1009
|
result = result.replace(RE_ITALIC_UNDER, "<em>$1</em>");
|
|
981
1010
|
result = result.replace(RE_STRIKETHROUGH, "<s>$1</s>");
|