@bendyline/squisq-editor-react 2.5.0 → 2.7.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 +4 -1
- package/dist/{chunk-ZSQN6IO7.js → chunk-JUAQQTJE.js} +15 -8
- package/dist/{chunk-DCMJXDQY.js → chunk-NJ2VKEQF.js} +1080 -687
- package/dist/{chunk-4F7SN6WU.js → chunk-WH3DL6TG.js} +1 -1
- package/dist/index.d.ts +140 -9
- package/dist/index.js +19 -3
- package/dist/recorder/index.d.ts +1 -1
- package/dist/recorder/index.js +4 -2
- package/dist/{recorder-CnOKlYY3.d.ts → recorder-xL-5Vfbu.d.ts} +14 -1
- package/dist/shell/index.d.ts +3 -1
- package/dist/shell/index.js +2 -2
- package/dist/{shell-CU4GpGuq.d.ts → shell-595XbANu.d.ts} +51 -4
- package/dist/styles/index.css +19 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -97,7 +97,10 @@ and block-at-a-time / timeline editing primitives (`useBlockNavigator`,
|
|
|
97
97
|
host-controlled Write typography through `writeCanvasSettings` (`textSize`
|
|
98
98
|
and `lineSpacing`). Set `hostMode="chat"` to keep the shell in Write view,
|
|
99
99
|
remove its view tabs, and hide Custom layouts, Transform, View options, and
|
|
100
|
-
Document settings.
|
|
100
|
+
Document settings. `showCodeCopyButton` opts Document/Page previews into a
|
|
101
|
+
subtle fenced-code Copy control; use `onCopyCode` to bridge clipboard writes
|
|
102
|
+
in Electron or native hosts (browser hosts fall back to
|
|
103
|
+
`navigator.clipboard.writeText`).
|
|
101
104
|
- **Color scheme** — pass `colorScheme="light" | "dark"` for the editor chrome
|
|
102
105
|
(**v1.5:** renamed from the old `theme` prop; `RawEditor`'s own `theme` prop is
|
|
103
106
|
now `monacoTheme`).
|
|
@@ -1521,6 +1521,13 @@ function recorderBitsPerSecond(value) {
|
|
|
1521
1521
|
return Math.round(value * 1e3);
|
|
1522
1522
|
}
|
|
1523
1523
|
|
|
1524
|
+
// src/recorder/recordedMediaKind.ts
|
|
1525
|
+
function recordedMediaKind(source, stream, mimeType) {
|
|
1526
|
+
if (stream) return stream.getVideoTracks().length > 0 ? "video" : "audio";
|
|
1527
|
+
if (mimeType?.toLowerCase().startsWith("audio/")) return "audio";
|
|
1528
|
+
return source === "mic" ? "audio" : "video";
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1524
1531
|
// src/recorder/RecorderModal.tsx
|
|
1525
1532
|
import {
|
|
1526
1533
|
Fragment as Fragment2,
|
|
@@ -2233,6 +2240,7 @@ function RecorderModal({
|
|
|
2233
2240
|
relativePath: screenPath,
|
|
2234
2241
|
filename: screenFilename,
|
|
2235
2242
|
source,
|
|
2243
|
+
mediaKind: "video",
|
|
2236
2244
|
mimeType: recorder.mimeType,
|
|
2237
2245
|
duration,
|
|
2238
2246
|
hasTimingSidecar: false,
|
|
@@ -2257,13 +2265,10 @@ function RecorderModal({
|
|
|
2257
2265
|
setIsSaving(true);
|
|
2258
2266
|
setSaveError(null);
|
|
2259
2267
|
try {
|
|
2260
|
-
const
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
filenameSeed
|
|
2265
|
-
);
|
|
2266
|
-
const relativeName = `${recorder.directory}/${filename}`;
|
|
2268
|
+
const mediaKind = recordedMediaKind(source, recorder.stream, recorder.mimeType);
|
|
2269
|
+
const filename = buildFilename(mediaKind, recorder.extension, basename, filenameSeed);
|
|
2270
|
+
const directory = mediaKind === "audio" ? "audio" : recorder.directory;
|
|
2271
|
+
const relativeName = `${directory}/${filename}`;
|
|
2267
2272
|
const relativePath = await mediaProvider.addMedia(
|
|
2268
2273
|
relativeName,
|
|
2269
2274
|
recorder.blob,
|
|
@@ -2291,6 +2296,7 @@ function RecorderModal({
|
|
|
2291
2296
|
relativePath,
|
|
2292
2297
|
filename,
|
|
2293
2298
|
source,
|
|
2299
|
+
mediaKind,
|
|
2294
2300
|
mimeType: recorder.mimeType,
|
|
2295
2301
|
duration: recorder.durationMs / 1e3,
|
|
2296
2302
|
hasTimingSidecar
|
|
@@ -2331,7 +2337,7 @@ function RecorderModal({
|
|
|
2331
2337
|
},
|
|
2332
2338
|
[recorder.durationMs]
|
|
2333
2339
|
);
|
|
2334
|
-
const isAudioOnly = source === "
|
|
2340
|
+
const isAudioOnly = recordedMediaKind(source, recorder.stream, recorder.mimeType) === "audio";
|
|
2335
2341
|
const showPreview = recorder.state !== "idle" && recorder.state !== "error";
|
|
2336
2342
|
const canRecord = recorder.state === "ready";
|
|
2337
2343
|
const canStop = recorder.state === "recording";
|
|
@@ -2839,6 +2845,7 @@ export {
|
|
|
2839
2845
|
buildRecorderScreenConstraints,
|
|
2840
2846
|
buildRecorderScreenAudioConstraints,
|
|
2841
2847
|
recorderBitsPerSecond,
|
|
2848
|
+
recordedMediaKind,
|
|
2842
2849
|
useModalDialog,
|
|
2843
2850
|
RecorderModal,
|
|
2844
2851
|
RecorderPanel
|