@bendyline/squisq-editor-react 2.3.4 → 2.4.1
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 +4 -2
- package/dist/{chunk-GNIVYDZH.js → chunk-KR4VLXUM.js} +10998 -8247
- package/dist/{chunk-6VDYKI3L.js → chunk-LJRHKXDV.js} +3 -1
- package/dist/chunk-LOTY7AOS.js +1925 -0
- package/dist/{chunk-5JMHFAVW.js → chunk-PDCKJCOS.js} +1200 -868
- package/dist/chunk-V4NBQF5C.js +62 -0
- package/dist/chunk-V6Z7GG55.js +16 -0
- package/dist/{chunk-54UGTQBO.js → chunk-WDX6UDL5.js} +1 -1
- package/dist/{chunk-NITZVAXL.js → chunk-WLJ623UZ.js} +24 -0
- package/dist/index.d.ts +289 -118
- package/dist/index.js +52 -20
- package/dist/json-editor/index.js +2 -2
- package/dist/monaco.d.ts +26 -0
- package/dist/monaco.js +144 -10
- package/dist/monacoLanguageDetection-DEyUW-BS.d.ts +18 -0
- package/dist/monacoSuggestions-MDBODZ7F.js +3 -0
- package/dist/recorder/index.d.ts +7 -407
- package/dist/recorder/index.js +3 -3
- package/dist/recorder-C5tAYUE3.d.ts +508 -0
- package/dist/shell/index.d.ts +1 -1
- package/dist/shell/index.js +6 -5
- package/dist/{shell-C-KkTBz7.d.ts → shell-CU4GpGuq.d.ts} +76 -6
- package/dist/styles/index.css +845 -26
- package/dist/teleprompter/index.d.ts +57 -246
- package/dist/teleprompter/index.js +12 -3
- package/dist/useNarrationStage-Bqo18PBw.d.ts +313 -0
- package/package.json +8 -6
- package/dist/chunk-5Q4JN4I5.js +0 -132
- package/dist/chunk-MJJK7YQB.js +0 -949
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// src/monacoLanguageDetection.ts
|
|
2
|
+
var LANGUAGE_ALIASES = {
|
|
3
|
+
bash: "shell",
|
|
4
|
+
c: "cpp",
|
|
5
|
+
"c++": "cpp",
|
|
6
|
+
"c#": "csharp",
|
|
7
|
+
cs: "csharp",
|
|
8
|
+
cxx: "cpp",
|
|
9
|
+
docker: "dockerfile",
|
|
10
|
+
htm: "html",
|
|
11
|
+
js: "javascript",
|
|
12
|
+
jsx: "javascript",
|
|
13
|
+
md: "markdown",
|
|
14
|
+
mdown: "markdown",
|
|
15
|
+
py: "python",
|
|
16
|
+
rb: "ruby",
|
|
17
|
+
sh: "shell",
|
|
18
|
+
text: "plaintext",
|
|
19
|
+
txt: "plaintext",
|
|
20
|
+
ts: "typescript",
|
|
21
|
+
tsx: "typescript",
|
|
22
|
+
yml: "yaml",
|
|
23
|
+
zsh: "shell"
|
|
24
|
+
};
|
|
25
|
+
function normalizeMonacoLanguage(language) {
|
|
26
|
+
const normalized = language.trim().toLowerCase();
|
|
27
|
+
return LANGUAGE_ALIASES[normalized] ?? normalized;
|
|
28
|
+
}
|
|
29
|
+
function normalizedMonacoLanguageRequests(requested) {
|
|
30
|
+
const values = typeof requested === "string" ? [requested] : requested ?? [];
|
|
31
|
+
return [...new Set(values.map(normalizeMonacoLanguage).filter(Boolean))].sort();
|
|
32
|
+
}
|
|
33
|
+
function monacoLanguageRequestKey(requested, options = {}) {
|
|
34
|
+
return `${options.languageServices ? "services" : "syntax"}:${normalizedMonacoLanguageRequests(requested).join(",")}`;
|
|
35
|
+
}
|
|
36
|
+
function monacoLanguagesForDocument(primaryLanguage, source) {
|
|
37
|
+
const primary = normalizeMonacoLanguage(primaryLanguage);
|
|
38
|
+
const requested = new Set(primary ? [primary] : []);
|
|
39
|
+
if (primary !== "markdown") return [...requested];
|
|
40
|
+
let openFence = null;
|
|
41
|
+
for (const line of source.split(/\r?\n/)) {
|
|
42
|
+
const match = line.match(/^ {0,3}(`{3,}|~{3,})[ \t]*([^\s`~]+)?/);
|
|
43
|
+
if (!match) continue;
|
|
44
|
+
const fence = match[1];
|
|
45
|
+
const marker = fence[0];
|
|
46
|
+
if (openFence) {
|
|
47
|
+
if (marker === openFence.marker && fence.length >= openFence.length) openFence = null;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
openFence = { marker, length: fence.length };
|
|
51
|
+
const language = match[2];
|
|
52
|
+
if (language) requested.add(normalizeMonacoLanguage(language));
|
|
53
|
+
}
|
|
54
|
+
return [...requested];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
normalizeMonacoLanguage,
|
|
59
|
+
normalizedMonacoLanguageRequests,
|
|
60
|
+
monacoLanguageRequestKey,
|
|
61
|
+
monacoLanguagesForDocument
|
|
62
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NarrationStage,
|
|
3
|
+
useNarrationStage
|
|
4
|
+
} from "./chunk-PDCKJCOS.js";
|
|
5
|
+
|
|
6
|
+
// src/teleprompter/TeleprompterView.tsx
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
function TeleprompterView(props) {
|
|
9
|
+
const { doc, theme, presentationTarget = null, recording = null } = props;
|
|
10
|
+
const stage = useNarrationStage({ doc, recording });
|
|
11
|
+
return /* @__PURE__ */ jsx(NarrationStage, { stage, theme, presentationTarget });
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
TeleprompterView
|
|
16
|
+
};
|
|
@@ -723,11 +723,35 @@ function serializeMediaTag(tag, attrs) {
|
|
|
723
723
|
const width = /\bwidth="([^"]*)"/i.exec(attrs)?.[1];
|
|
724
724
|
const height = /\bheight="([^"]*)"/i.exec(attrs)?.[1];
|
|
725
725
|
const poster = tag === "video" ? /\bposter="([^"]*)"/i.exec(attrs)?.[1] : void 0;
|
|
726
|
+
const placement = tag === "video" ? /\bdata-squisq-video-placement="([^"]*)"/i.exec(attrs)?.[1] : void 0;
|
|
727
|
+
const lockToBlock = tag === "video" ? /\bdata-squisq-video-lock-to-block="([^"]*)"/i.exec(attrs)?.[1] : void 0;
|
|
728
|
+
const pipSize = tag === "video" ? /\bdata-squisq-video-pip-size="([^"]*)"/i.exec(attrs)?.[1] : void 0;
|
|
729
|
+
const pipShape = tag === "video" ? /\bdata-squisq-video-pip-shape="([^"]*)"/i.exec(attrs)?.[1] : void 0;
|
|
730
|
+
const pipPosition = tag === "video" ? /\bdata-squisq-video-pip-position="([^"]*)"/i.exec(attrs)?.[1] : void 0;
|
|
731
|
+
const startAt = tag === "video" ? /\bdata-squisq-video-start-at="([^"]*)"/i.exec(attrs)?.[1] : void 0;
|
|
732
|
+
const clipStart = tag === "video" ? /\bdata-squisq-video-clip-start="([^"]*)"/i.exec(attrs)?.[1] : void 0;
|
|
733
|
+
const clipEnd = tag === "video" ? /\bdata-squisq-video-clip-end="([^"]*)"/i.exec(attrs)?.[1] : void 0;
|
|
726
734
|
const parts = [`<${tag} src="${src}"`];
|
|
727
735
|
if (controls) parts.push(" controls");
|
|
728
736
|
if (width) parts.push(` width="${width}"`);
|
|
729
737
|
if (height) parts.push(` height="${height}"`);
|
|
730
738
|
if (poster) parts.push(` poster="${poster}"`);
|
|
739
|
+
if (placement === "picture-in-picture" || placement === "overlay") {
|
|
740
|
+
parts.push(` data-squisq-video-placement="${placement}"`);
|
|
741
|
+
}
|
|
742
|
+
if (lockToBlock === "false") parts.push(' data-squisq-video-lock-to-block="false"');
|
|
743
|
+
if (pipSize === "small" || pipSize === "large") {
|
|
744
|
+
parts.push(` data-squisq-video-pip-size="${pipSize}"`);
|
|
745
|
+
}
|
|
746
|
+
if (pipShape === "square" || pipShape === "wide") {
|
|
747
|
+
parts.push(` data-squisq-video-pip-shape="${pipShape}"`);
|
|
748
|
+
}
|
|
749
|
+
if (pipPosition === "top-left" || pipPosition === "top-right" || pipPosition === "bottom-left" || pipPosition === "bottom-right") {
|
|
750
|
+
parts.push(` data-squisq-video-pip-position="${pipPosition}"`);
|
|
751
|
+
}
|
|
752
|
+
if (startAt != null) parts.push(` data-squisq-video-start-at="${startAt}"`);
|
|
753
|
+
if (clipStart != null) parts.push(` data-squisq-video-clip-start="${clipStart}"`);
|
|
754
|
+
if (clipEnd != null) parts.push(` data-squisq-video-clip-end="${clipEnd}"`);
|
|
731
755
|
parts.push(`></${tag}>`);
|
|
732
756
|
return parts.join("");
|
|
733
757
|
}
|