@bendyline/squisq-editor-react 2.5.0 → 2.6.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.
@@ -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 filename = buildFilename(
2261
- source === "mic" ? "audio" : "video",
2262
- recorder.extension,
2263
- basename,
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 === "mic";
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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RecorderModal
3
- } from "./chunk-ZSQN6IO7.js";
3
+ } from "./chunk-JUAQQTJE.js";
4
4
 
5
5
  // src/recorder/RecorderButton.tsx
6
6
  import { useCallback, useState } from "react";
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { C as CodeContext, E as EditorHostMode, S as SceneTextChannel } from './shell-CU4GpGuq.js';
2
- export { B as BlockTagVisibility, a as CodeContextSection, D as DocumentLinkCandidate, b as DocumentLinkProvider, c as EditorActions, d as EditorColorScheme, e as EditorContextValue, f as EditorMode, g as EditorProvider, h as EditorProviderProps, i as EditorShell, j as EditorShellProps, k as EditorState, l as EditorView, I as ImageDisplayMode, L as LayoutMode, M as MentionCandidate, m as MentionProvider, P as PreviewPanel, n as PreviewPanelProps, R as RawEditor, o as RawEditorProps, T as ThemeInheritance, V as ViewPreferences, W as WriteCanvasSettings, p as WysiwygEditor, q as WysiwygEditorProps, u as useEditorContext } from './shell-CU4GpGuq.js';
1
+ import { C as CodeContext, E as EditorHostMode, S as SceneTextChannel } from './shell-BXG_NlvR.js';
2
+ export { B as BlockTagVisibility, a as CodeContextSection, D as DocumentLinkCandidate, b as DocumentLinkProvider, c as EditorActions, d as EditorColorScheme, e as EditorContextValue, f as EditorMode, g as EditorProvider, h as EditorProviderProps, i as EditorShell, j as EditorShellProps, k as EditorState, l as EditorView, I as ImageDisplayMode, L as LayoutMode, M as MentionCandidate, m as MentionProvider, P as PreviewPanel, n as PreviewPanelProps, R as RawEditor, o as RawEditorProps, T as ThemeInheritance, V as ViewPreferences, W as WriteCanvasSettings, p as WysiwygEditor, q as WysiwygEditorProps, u as useEditorContext } from './shell-BXG_NlvR.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { ReactNode, CSSProperties } from 'react';
6
6
  import { Doc, ScheduledClip, VideoPlacement, VideoPipSize, VideoPipShape, VideoPipPosition, MediaProvider, Theme, CustomTemplateDefinition, ThemeSeedColors, ViewportPreset, ViewportConfig, Block, MediaEntry, DiagramEdgeAnchor } from '@bendyline/squisq/schemas';
7
7
  import { ContentContainer } from '@bendyline/squisq/storage';
8
8
  export { CanvasRect, ImageEditor, ImageEditorAction, ImageEditorProps, ImageEditorState, ImageEditorTool, ImageViewer, ImageViewerProps, UseImageEditorOptions, UseImageEditorReturn, imageEditorReducer, initialImageEditorState, useImageEditor } from './image-editor/index.js';
9
+ import { CodeBlockCopyHandler, DisplayMode, CaptionStyle, VideoPresentation, PipSize, PipShape, PipPosition } from '@bendyline/squisq-react';
9
10
  import { IconFamily } from '@bendyline/squisq/icons';
10
- import { DisplayMode, CaptionStyle, VideoPresentation, PipSize, PipShape, PipPosition } from '@bendyline/squisq-react';
11
11
  import { CoverSlideTemplate, CoverSlidePlayback, ConnectorRouting, AsciiDiagram, Tree, AsciiTimeline, AsciiTimelineSide, AsciiTimelineMarker } from '@bendyline/squisq/doc';
12
12
  import { MarkdownWrapState } from '@bendyline/squisq/markdown';
13
13
  import * as monaco_editor from 'monaco-editor';
@@ -22,7 +22,7 @@ import { PluginKey } from '@tiptap/pm/state';
22
22
  import { Node } from '@tiptap/pm/model';
23
23
  import { RenderResult } from 'mermaid';
24
24
  export { JsonEditor, JsonEditorProps } from './json-editor/index.js';
25
- export { C as CameraStreamOptions, D as DEFAULT_RECORDER_DEVICE_SETTINGS, R as RecordedBookmark, a as RecorderAudioDeviceSettings, b as RecorderButton, c as RecorderButtonProps, d as RecorderCameraDeviceSettings, e as RecorderCameraSaveResult, f as RecorderColorScheme, g as RecorderConstraintMode, h as RecorderDeviceSettings, i as RecorderDeviceSettingsPanel, j as RecorderDeviceSettingsPanelProps, k as RecorderEncodingSettings, l as RecorderModal, m as RecorderModalProps, n as RecorderNarrationOptions, o as RecorderPanel, p as RecorderPanelProps, q as RecorderSaveResult, r as RecorderScreenAudioSettings, s as RecorderScreenDeviceSettings, S as ScreenStreamHandle, t as ScreenStreamOptions, T as TimingJson, u as buildRecorderAudioConstraints, v as buildRecorderCameraConstraints, w as buildRecorderScreenAudioConstraints, x as buildRecorderScreenConstraints, y as buildTimingJson, z as encodeTimingJson, A as recorderBitsPerSecond, B as requestCameraStream, E as requestMicStream, F as requestScreenStream, G as timingPathFor, H as useStreamPreview } from './recorder-CnOKlYY3.js';
25
+ export { C as CameraStreamOptions, D as DEFAULT_RECORDER_DEVICE_SETTINGS, R as RecordedBookmark, a as RecordedMediaKind, b as RecorderAudioDeviceSettings, c as RecorderButton, d as RecorderButtonProps, e as RecorderCameraDeviceSettings, f as RecorderCameraSaveResult, g as RecorderColorScheme, h as RecorderConstraintMode, i as RecorderDeviceSettings, j as RecorderDeviceSettingsPanel, k as RecorderDeviceSettingsPanelProps, l as RecorderEncodingSettings, m as RecorderModal, n as RecorderModalProps, o as RecorderNarrationOptions, p as RecorderPanel, q as RecorderPanelProps, r as RecorderSaveResult, s as RecorderScreenAudioSettings, t as RecorderScreenDeviceSettings, S as ScreenStreamHandle, u as ScreenStreamOptions, T as TimingJson, v as buildRecorderAudioConstraints, w as buildRecorderCameraConstraints, x as buildRecorderScreenAudioConstraints, y as buildRecorderScreenConstraints, z as buildTimingJson, A as encodeTimingJson, B as recordedMediaKind, E as recorderBitsPerSecond, F as requestCameraStream, G as requestMicStream, H as requestScreenStream, I as timingPathFor, J as useStreamPreview } from './recorder-xL-5Vfbu.js';
26
26
  export { C as CanvasSink, a as CaptureKind, D as DEFAULT_TELEPROMPTER_PREFS, F as FloatOpenOptions, b as FloatTier, c as FloatingWindowHandle, d as FloatingWindowManager, M as MicAnalysisHandle, e as MicAnalysisStatus, N as NarrationRecorderController, f as NarrationRecorderState, g as NarrationStageHandle, h as NarrationTake, P as PrompterTransport, R as RecorderAudioBitrateMode, i as RecorderCameraLane, j as RecorderExtendedMediaOptions, k as RecorderSource, l as RecorderState, m as ResolvedFormat, T as TeleprompterController, n as TeleprompterPrefs, o as TeleprompterRecordingDeps, U as UseMediaRecorderOptions, p as UseMediaRecorderResult, q as UseNarrationStageOptions, r as buildFilename, s as createFloatingWindowManager, t as detectFloatTiers, u as getCaptureKind, v as resolveFormat, w as supportsDisplayMedia, x as supportsMediaRecorder, y as supportsUserMedia, z as useFloatingWindow, A as useMediaRecorder, B as useMicAnalysis, E as useNarrationRecorder, G as useNarrationStage, H as useTeleprompter, I as vadConfigForSensitivity } from './useNarrationStage-Bk3mdW75.js';
27
27
  export { EYE_LINE_FRACTION, NarrationSavePlan, NarrationSaveResult, NarrationStage, NarrationStageProps, PCM_WORKLET_NAME, PCM_WORKLET_SOURCE, TELEPROMPTER_CSS, TeleprompterControls, TeleprompterControlsProps, TeleprompterSurface, TeleprompterSurfaceProps, TeleprompterView, TeleprompterViewProps, TokenLineMap, buildNarrationSavePlan, cameraVideoLine, ensureTeleprompterStyles, executeNarrationSave, insertNarrationPreamble, measureTokenLines, narrationAnnotationLine, prompterVarsFromTheme, registerPcmWorklet, stepScroll, targetOffsetFor } from './teleprompter/index.js';
28
28
  import '@bendyline/squisq/versions';
@@ -471,8 +471,12 @@ interface PlainHtmlPreviewProps {
471
471
  * Return `false` to allow the iframe's default navigation.
472
472
  */
473
473
  onLinkClick?: (href: string) => boolean | undefined;
474
+ /** Show a Copy button on ordinary fenced code blocks (default: false). */
475
+ showCodeCopyButton?: boolean;
476
+ /** Optional host clipboard adapter; otherwise the browser Clipboard API is used. */
477
+ onCopyCode?: CodeBlockCopyHandler;
474
478
  }
475
- declare function PlainHtmlPreview({ markdown, title, images, mediaProvider, mediaRevision, theme, className, style, globalKeyboardShortcuts, onFrameChange, onLinkClick, }: PlainHtmlPreviewProps): react_jsx_runtime.JSX.Element;
479
+ declare function PlainHtmlPreview({ markdown, title, images, mediaProvider, mediaRevision, theme, className, style, globalKeyboardShortcuts, onFrameChange, onLinkClick, showCodeCopyButton, onCopyCode, }: PlainHtmlPreviewProps): react_jsx_runtime.JSX.Element;
476
480
 
477
481
  /**
478
482
  * Emoji Dataset
@@ -950,6 +954,17 @@ interface ToolbarProps {
950
954
  * editing free-form prompts — can pass false to suppress it.
951
955
  */
952
956
  showPlayTab?: boolean;
957
+ /**
958
+ * Whether to render Squisq's built-in text, block, and contextual
959
+ * formatting controls. The toolbar, Insert menu, view tabs, and host slots
960
+ * remain mounted when false. Defaults to true.
961
+ */
962
+ showFormattingControls?: boolean;
963
+ /**
964
+ * Whether to render Squisq's built-in Insert button and menu independently
965
+ * of the formatting controls. Defaults to true.
966
+ */
967
+ showInsertControls?: boolean;
953
968
  /**
954
969
  * Semantic embedding mode inherited from EditorShell. Chat mode exposes
955
970
  * only the Write surface, which suppresses the view tabs and their
@@ -962,7 +977,7 @@ interface ToolbarProps {
962
977
  * - WYSIWYG: calls Tiptap chain commands (toggleBold, etc.)
963
978
  * - Raw: appends markdown syntax to the source
964
979
  */
965
- declare function Toolbar({ className, showFiles, fileCount, onToggleFiles, slotLeft, slotAfterTabs, slotAfterActions, slotRight, showPlayTab, hostMode, }: ToolbarProps): react_jsx_runtime.JSX.Element;
980
+ declare function Toolbar({ className, showFiles, fileCount, onToggleFiles, slotLeft, slotAfterTabs, slotAfterActions, slotRight, showPlayTab, showFormattingControls, showInsertControls, hostMode, }: ToolbarProps): react_jsx_runtime.JSX.Element;
966
981
 
967
982
  /**
968
983
  * VersionHistoryPanel
package/dist/index.js CHANGED
@@ -194,7 +194,7 @@ import {
194
194
  usePreviewSettings,
195
195
  useTimelineData,
196
196
  useTreeViewData
197
- } from "./chunk-DCMJXDQY.js";
197
+ } from "./chunk-5FG3NAPH.js";
198
198
  import "./chunk-V4NBQF5C.js";
199
199
  import {
200
200
  JsonEditor
@@ -212,7 +212,7 @@ import {
212
212
  } from "./chunk-V44VP242.js";
213
213
  import {
214
214
  RecorderButton
215
- } from "./chunk-4F7SN6WU.js";
215
+ } from "./chunk-WH3DL6TG.js";
216
216
  import {
217
217
  DEFAULT_RECORDER_DEVICE_SETTINGS,
218
218
  RecorderDeviceSettingsPanel,
@@ -223,10 +223,11 @@ import {
223
223
  buildRecorderScreenAudioConstraints,
224
224
  buildRecorderScreenConstraints,
225
225
  getCaptureKind,
226
+ recordedMediaKind,
226
227
  recorderBitsPerSecond,
227
228
  requestScreenStream,
228
229
  useMediaRecorder
229
- } from "./chunk-ZSQN6IO7.js";
230
+ } from "./chunk-JUAQQTJE.js";
230
231
  import "./chunk-GS7QWYFT.js";
231
232
  import {
232
233
  TeleprompterView
@@ -865,6 +866,7 @@ export {
865
866
  readBlockAttrsTransition,
866
867
  readBlockAttrsValue,
867
868
  readHeadingLineTransition,
869
+ recordedMediaKind,
868
870
  recorderBitsPerSecond,
869
871
  registerPcmWorklet,
870
872
  removeEdgeOp,
@@ -1,4 +1,4 @@
1
- export { C as CameraStreamOptions, D as DEFAULT_RECORDER_DEVICE_SETTINGS, R as RecordedBookmark, a as RecorderAudioDeviceSettings, b as RecorderButton, c as RecorderButtonProps, d as RecorderCameraDeviceSettings, e as RecorderCameraSaveResult, f as RecorderColorScheme, g as RecorderConstraintMode, h as RecorderDeviceSettings, i as RecorderDeviceSettingsPanel, j as RecorderDeviceSettingsPanelProps, k as RecorderEncodingSettings, l as RecorderModal, m as RecorderModalProps, o as RecorderPanel, p as RecorderPanelProps, q as RecorderSaveResult, r as RecorderScreenAudioSettings, s as RecorderScreenDeviceSettings, S as ScreenStreamHandle, t as ScreenStreamOptions, T as TimingJson, u as buildRecorderAudioConstraints, v as buildRecorderCameraConstraints, w as buildRecorderScreenAudioConstraints, x as buildRecorderScreenConstraints, y as buildTimingJson, z as encodeTimingJson, A as recorderBitsPerSecond, B as requestCameraStream, E as requestMicStream, F as requestScreenStream, G as timingPathFor, H as useStreamPreview } from '../recorder-CnOKlYY3.js';
1
+ export { C as CameraStreamOptions, D as DEFAULT_RECORDER_DEVICE_SETTINGS, R as RecordedBookmark, a as RecordedMediaKind, b as RecorderAudioDeviceSettings, c as RecorderButton, d as RecorderButtonProps, e as RecorderCameraDeviceSettings, f as RecorderCameraSaveResult, g as RecorderColorScheme, h as RecorderConstraintMode, i as RecorderDeviceSettings, j as RecorderDeviceSettingsPanel, k as RecorderDeviceSettingsPanelProps, l as RecorderEncodingSettings, m as RecorderModal, n as RecorderModalProps, p as RecorderPanel, q as RecorderPanelProps, r as RecorderSaveResult, s as RecorderScreenAudioSettings, t as RecorderScreenDeviceSettings, S as ScreenStreamHandle, u as ScreenStreamOptions, T as TimingJson, v as buildRecorderAudioConstraints, w as buildRecorderCameraConstraints, x as buildRecorderScreenAudioConstraints, y as buildRecorderScreenConstraints, z as buildTimingJson, A as encodeTimingJson, B as recordedMediaKind, E as recorderBitsPerSecond, F as requestCameraStream, G as requestMicStream, H as requestScreenStream, I as timingPathFor, J as useStreamPreview } from '../recorder-xL-5Vfbu.js';
2
2
  export { a as CaptureKind, R as RecorderAudioBitrateMode, i as RecorderCameraLane, j as RecorderExtendedMediaOptions, k as RecorderSource, l as RecorderState, m as ResolvedFormat, U as UseMediaRecorderOptions, p as UseMediaRecorderResult, r as buildFilename, u as getCaptureKind, v as resolveFormat, w as supportsDisplayMedia, x as supportsMediaRecorder, y as supportsUserMedia, A as useMediaRecorder } from '../useNarrationStage-Bk3mdW75.js';
3
3
  import 'react/jsx-runtime';
4
4
  import '@bendyline/squisq/schemas';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RecorderButton
3
- } from "../chunk-4F7SN6WU.js";
3
+ } from "../chunk-WH3DL6TG.js";
4
4
  import {
5
5
  DEFAULT_RECORDER_DEVICE_SETTINGS,
6
6
  RecorderDeviceSettingsPanel,
@@ -11,10 +11,11 @@ import {
11
11
  buildRecorderScreenAudioConstraints,
12
12
  buildRecorderScreenConstraints,
13
13
  getCaptureKind,
14
+ recordedMediaKind,
14
15
  recorderBitsPerSecond,
15
16
  requestScreenStream,
16
17
  useMediaRecorder
17
- } from "../chunk-ZSQN6IO7.js";
18
+ } from "../chunk-JUAQQTJE.js";
18
19
  import "../chunk-GS7QWYFT.js";
19
20
  import {
20
21
  buildFilename,
@@ -43,6 +44,7 @@ export {
43
44
  buildTimingJson,
44
45
  encodeTimingJson,
45
46
  getCaptureKind,
47
+ recordedMediaKind,
46
48
  recorderBitsPerSecond,
47
49
  requestCameraStream,
48
50
  requestMicStream,
@@ -4,6 +4,17 @@ import { ContentContainer } from '@bendyline/squisq/storage';
4
4
  import { k as RecorderSource, o as TeleprompterRecordingDeps } from './useNarrationStage-Bk3mdW75.js';
5
5
  import { CSSProperties, RefObject } from 'react';
6
6
 
7
+ type RecordedMediaKind = 'audio' | 'video';
8
+ /**
9
+ * Classify the file that was actually recorded.
10
+ *
11
+ * The acquired stream is authoritative when it is still available: a browser
12
+ * can negotiate a `video/webm` container even when the stream contains only
13
+ * audio. MIME and requested source are retained as fallbacks for hosts that
14
+ * construct a save result without exposing the stream.
15
+ */
16
+ declare function recordedMediaKind(source: RecorderSource, stream: Pick<MediaStream, 'getVideoTracks'> | null, mimeType: string | null | undefined): RecordedMediaKind;
17
+
7
18
  type RecorderColorScheme = 'light' | 'dark';
8
19
  /**
9
20
  * Everything narration mode needs beyond the base recorder props. Supplying
@@ -78,6 +89,8 @@ interface RecorderSaveResult {
78
89
  filename: string;
79
90
  /** Capture source the user picked. */
80
91
  source: RecorderSource;
92
+ /** Media kind detected from the tracks that were actually recorded. */
93
+ mediaKind: RecordedMediaKind;
81
94
  /** MIME type of the saved blob. */
82
95
  mimeType: string;
83
96
  /** Recording length in seconds. */
@@ -399,4 +412,4 @@ declare function encodeTimingJson(timing: TimingJson): Uint8Array;
399
412
  */
400
413
  declare function timingPathFor(audioRelativePath: string): string;
401
414
 
402
- export { recorderBitsPerSecond as A, requestCameraStream as B, type CameraStreamOptions as C, DEFAULT_RECORDER_DEVICE_SETTINGS as D, requestMicStream as E, requestScreenStream as F, timingPathFor as G, useStreamPreview as H, type RecordedBookmark as R, type ScreenStreamHandle as S, type TimingJson as T, type RecorderAudioDeviceSettings as a, RecorderButton as b, type RecorderButtonProps as c, type RecorderCameraDeviceSettings as d, type RecorderCameraSaveResult as e, type RecorderColorScheme as f, type RecorderConstraintMode as g, type RecorderDeviceSettings as h, RecorderDeviceSettingsPanel as i, type RecorderDeviceSettingsPanelProps as j, type RecorderEncodingSettings as k, RecorderModal as l, type RecorderModalProps as m, type RecorderNarrationOptions as n, RecorderPanel as o, type RecorderPanelProps as p, type RecorderSaveResult as q, type RecorderScreenAudioSettings as r, type RecorderScreenDeviceSettings as s, type ScreenStreamOptions as t, buildRecorderAudioConstraints as u, buildRecorderCameraConstraints as v, buildRecorderScreenAudioConstraints as w, buildRecorderScreenConstraints as x, buildTimingJson as y, encodeTimingJson as z };
415
+ export { encodeTimingJson as A, recordedMediaKind as B, type CameraStreamOptions as C, DEFAULT_RECORDER_DEVICE_SETTINGS as D, recorderBitsPerSecond as E, requestCameraStream as F, requestMicStream as G, requestScreenStream as H, timingPathFor as I, useStreamPreview as J, type RecordedBookmark as R, type ScreenStreamHandle as S, type TimingJson as T, type RecordedMediaKind as a, type RecorderAudioDeviceSettings as b, RecorderButton as c, type RecorderButtonProps as d, type RecorderCameraDeviceSettings as e, type RecorderCameraSaveResult as f, type RecorderColorScheme as g, type RecorderConstraintMode as h, type RecorderDeviceSettings as i, RecorderDeviceSettingsPanel as j, type RecorderDeviceSettingsPanelProps as k, type RecorderEncodingSettings as l, RecorderModal as m, type RecorderModalProps as n, type RecorderNarrationOptions as o, RecorderPanel as p, type RecorderPanelProps as q, type RecorderSaveResult as r, type RecorderScreenAudioSettings as s, type RecorderScreenDeviceSettings as t, type ScreenStreamOptions as u, buildRecorderAudioConstraints as v, buildRecorderCameraConstraints as w, buildRecorderScreenAudioConstraints as x, buildRecorderScreenConstraints as y, buildTimingJson as z };
@@ -1,4 +1,4 @@
1
- export { B as BlockTagVisibility, D as DocumentLinkCandidate, b as DocumentLinkProvider, c as EditorActions, d as EditorColorScheme, e as EditorContextValue, E as EditorHostMode, f as EditorMode, g as EditorProvider, h as EditorProviderProps, i as EditorShell, j as EditorShellProps, k as EditorState, l as EditorView, I as ImageDisplayMode, L as LayoutMode, M as MentionCandidate, m as MentionProvider, P as PreviewPanel, n as PreviewPanelProps, R as RawEditor, o as RawEditorProps, T as ThemeInheritance, V as ViewPreferences, p as WysiwygEditor, q as WysiwygEditorProps, u as useEditorContext } from '../shell-CU4GpGuq.js';
1
+ export { B as BlockTagVisibility, D as DocumentLinkCandidate, b as DocumentLinkProvider, c as EditorActions, d as EditorColorScheme, e as EditorContextValue, E as EditorHostMode, f as EditorMode, g as EditorProvider, h as EditorProviderProps, i as EditorShell, j as EditorShellProps, k as EditorState, l as EditorView, I as ImageDisplayMode, L as LayoutMode, M as MentionCandidate, m as MentionProvider, P as PreviewPanel, n as PreviewPanelProps, R as RawEditor, o as RawEditorProps, T as ThemeInheritance, V as ViewPreferences, p as WysiwygEditor, q as WysiwygEditorProps, u as useEditorContext } from '../shell-BXG_NlvR.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
4
4
  import '@bendyline/squisq/schemas';
@@ -7,3 +7,4 @@ import '@bendyline/squisq/storage';
7
7
  import '@bendyline/squisq/versions';
8
8
  import '@tiptap/core';
9
9
  import 'monaco-editor';
10
+ import '@bendyline/squisq-react';
@@ -5,11 +5,11 @@ import {
5
5
  RawEditor,
6
6
  WysiwygEditor,
7
7
  useEditorContext
8
- } from "../chunk-DCMJXDQY.js";
8
+ } from "../chunk-5FG3NAPH.js";
9
9
  import "../chunk-V4NBQF5C.js";
10
10
  import "../chunk-K2WJYVS4.js";
11
11
  import "../chunk-V44VP242.js";
12
- import "../chunk-ZSQN6IO7.js";
12
+ import "../chunk-JUAQQTJE.js";
13
13
  import "../chunk-GS7QWYFT.js";
14
14
  import "../chunk-IQFPX2CE.js";
15
15
  import "../chunk-OWOKKZAU.js";
@@ -6,6 +6,7 @@ import { ContentContainer } from '@bendyline/squisq/storage';
6
6
  import { DocumentVersionManager, SaveVersionOptions, SaveVersionResult, PrunePolicy } from '@bendyline/squisq/versions';
7
7
  import { Editor } from '@tiptap/core';
8
8
  import { editor } from 'monaco-editor';
9
+ import { CodeBlockCopyHandler } from '@bendyline/squisq-react';
9
10
 
10
11
  /**
11
12
  * Configuration a Scene host (diagram / drawing / layout widget) supplies
@@ -671,7 +672,8 @@ interface EditorShellProps {
671
672
  * Semantic mode for the surface embedding the editor. `'document'`
672
673
  * (default) exposes the normal multi-view authoring shell. `'chat'`
673
674
  * starts and stays in Write view through the shell's own controls, hides
674
- * the view tabs, and removes document-level layout, transform, view, and
675
+ * the view tabs, hides formatting controls by default while retaining the
676
+ * Insert menu, and removes document-level layout, transform, view, and
675
677
  * settings controls from the toolbar.
676
678
  */
677
679
  hostMode?: EditorHostMode;
@@ -693,6 +695,13 @@ interface EditorShellProps {
693
695
  * navigation; any other return (or void) marks the link as handled.
694
696
  */
695
697
  onLinkClick?: (href: string) => boolean | undefined;
698
+ /** Show a Copy button on ordinary fenced code blocks (default: false). */
699
+ showCodeCopyButton?: boolean;
700
+ /**
701
+ * Optional host clipboard adapter. When omitted, enabled controls use the
702
+ * browser Clipboard API. Electron/native hosts can bridge copying here.
703
+ */
704
+ onCopyCode?: CodeBlockCopyHandler;
696
705
  /**
697
706
  * Light/dark chrome color scheme for the editor shell — toolbar, tabs,
698
707
  * status bar, and side panes (default: `'light'`). This is the editor's
@@ -768,6 +777,18 @@ interface EditorShellProps {
768
777
  onSaveVersion?: (result: SaveVersionResult) => void;
769
778
  /** Show the Files toggle in the toolbar. Defaults to true when mediaProvider is passed. */
770
779
  showFilesToggle?: boolean;
780
+ /**
781
+ * Show the toolbar's built-in text, block, and contextual formatting
782
+ * controls. The toolbar, Insert menu, and host-provided slots remain
783
+ * visible when false. Defaults to true in document mode and false in chat
784
+ * mode.
785
+ */
786
+ showFormattingControls?: boolean;
787
+ /**
788
+ * Show the toolbar's built-in Insert button and menu independently of the
789
+ * formatting controls. Defaults to true.
790
+ */
791
+ showInsertControls?: boolean;
771
792
  /**
772
793
  * Whether the Files panel offers browser downloads for its binary entries.
773
794
  * Defaults to true. Pass false to remove the built-in download affordance.
@@ -1065,7 +1086,7 @@ interface EditorShellProps {
1065
1086
  * Complete markdown editor shell with toolbar, view switcher, and three
1066
1087
  * editing modes: Raw (Monaco), WYSIWYG (Tiptap), and Preview.
1067
1088
  */
1068
- declare function EditorShell({ initialMarkdown, initialView, hostMode, defaultViewportPreset, articleId, basePath, onChange, onLinkClick, colorScheme, className, height, minHeight, maxHeight, mediaProvider, workspaceContainer, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, showFilesToggle, allowBinaryDownloads, toolbarSlotLeft, toolbarSlotAfterActions, toolbarSlotRight, statusBarSlotRight, showPlayTab, allowPresentationWindow, allowPresentationFullscreen, allowPrint, submitOnEnter, codeContext, fullWidth, uxFont, thinMargins, writeCanvasSettings, showStatusBar, imageDisplayMode, fileName, language, findMode, onFindModeChange, mentionProvider, documentLinkProvider, linkSchemes, allowRecording, allowNarrate, preserveSourceWrapping, placeholder, readOnly, imageSrc, imageAlt, imageMode, imageEditorContainer, onImageExport, inlinePreview, inlinePreviewWidth, outline, outlineWidth, blockTags, blockTagVisibility, themeInheritance, viewPreferences, onViewPreferencesChange, themeOverride, }: EditorShellProps): react_jsx_runtime.JSX.Element;
1089
+ declare function EditorShell({ initialMarkdown, initialView, hostMode, defaultViewportPreset, articleId, basePath, onChange, onLinkClick, showCodeCopyButton, onCopyCode, colorScheme, className, height, minHeight, maxHeight, mediaProvider, workspaceContainer, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, showFilesToggle, showFormattingControls, showInsertControls, allowBinaryDownloads, toolbarSlotLeft, toolbarSlotAfterActions, toolbarSlotRight, statusBarSlotRight, showPlayTab, allowPresentationWindow, allowPresentationFullscreen, allowPrint, submitOnEnter, codeContext, fullWidth, uxFont, thinMargins, writeCanvasSettings, showStatusBar, imageDisplayMode, fileName, language, findMode, onFindModeChange, mentionProvider, documentLinkProvider, linkSchemes, allowRecording, allowNarrate, preserveSourceWrapping, placeholder, readOnly, imageSrc, imageAlt, imageMode, imageEditorContainer, onImageExport, inlinePreview, inlinePreviewWidth, outline, outlineWidth, blockTags, blockTagVisibility, themeInheritance, viewPreferences, onViewPreferencesChange, themeOverride, }: EditorShellProps): react_jsx_runtime.JSX.Element;
1069
1090
 
1070
1091
  /**
1071
1092
  * RawEditor
@@ -1143,12 +1164,16 @@ interface PreviewPanelProps {
1143
1164
  workspaceContainer?: ContentContainer | null;
1144
1165
  /** Delegate authored link activation to the embedding host. */
1145
1166
  onLinkClick?: (href: string) => boolean | undefined;
1167
+ /** Show a Copy button on ordinary fenced code blocks (default: false). */
1168
+ showCodeCopyButton?: boolean;
1169
+ /** Optional host clipboard adapter; otherwise the browser Clipboard API is used. */
1170
+ onCopyCode?: CodeBlockCopyHandler;
1146
1171
  }
1147
1172
  /**
1148
1173
  * Live preview panel that renders the current document as a slideshow
1149
1174
  * or document view. Controls (viewport, mode, theme, transform, captions)
1150
1175
  * are rendered in the main toolbar via PreviewToolbarControls.
1151
1176
  */
1152
- declare function PreviewPanel({ basePath, className, workspaceContainer, onLinkClick, }: PreviewPanelProps): react_jsx_runtime.JSX.Element;
1177
+ declare function PreviewPanel({ basePath, className, workspaceContainer, onLinkClick, showCodeCopyButton, onCopyCode, }: PreviewPanelProps): react_jsx_runtime.JSX.Element;
1153
1178
 
1154
1179
  export { type BlockTagVisibility as B, type CodeContext as C, type DocumentLinkCandidate as D, type EditorHostMode as E, type ImageDisplayMode as I, type LayoutMode as L, type MentionCandidate as M, PreviewPanel as P, RawEditor as R, type SceneTextChannel as S, type ThemeInheritance as T, type ViewPreferences as V, type WriteCanvasSettings as W, type CodeContextSection as a, type DocumentLinkProvider as b, type EditorActions as c, type EditorColorScheme as d, type EditorContextValue as e, type EditorMode as f, EditorProvider as g, type EditorProviderProps as h, EditorShell as i, type EditorShellProps as j, type EditorState as k, type EditorView as l, type MentionProvider as m, type PreviewPanelProps as n, type RawEditorProps as o, WysiwygEditor as p, type WysiwygEditorProps as q, useEditorContext as u };
@@ -7808,6 +7808,8 @@
7808
7808
  z-index: 100;
7809
7809
  min-width: 200px;
7810
7810
  padding: 4px 0;
7811
+ overflow-y: auto;
7812
+ overscroll-behavior: contain;
7811
7813
  font-family: var( --squisq-ux-font, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif );
7812
7814
  background: #fff;
7813
7815
  border: 1px solid #e5e7eb;
@@ -9166,6 +9168,15 @@
9166
9168
  margin: 0;
9167
9169
  border-radius: 0;
9168
9170
  }
9171
+ .squisq-wysiwyg-editor .squisq-video-node--audio-only {
9172
+ width: min(100%, 360px);
9173
+ max-width: 360px;
9174
+ background: transparent;
9175
+ }
9176
+ .squisq-wysiwyg-editor .squisq-video-node--audio-only audio {
9177
+ display: block;
9178
+ width: 100%;
9179
+ }
9169
9180
  .squisq-editor-shell[data-theme=dark] .squisq-video-placement-toolbar {
9170
9181
  border-bottom-color: #374151;
9171
9182
  background: #111827;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/squisq-editor-react",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "React editor shell with raw/WYSIWYG/preview modes for Squisq documents",
5
5
  "license": "MIT",
6
6
  "author": "Bendyline",
@@ -84,10 +84,10 @@
84
84
  "react-dom": "^18.0.0 || ^19.0.0"
85
85
  },
86
86
  "dependencies": {
87
- "@bendyline/squisq": "2.5.0",
88
- "@bendyline/squisq-formats": "2.3.10",
89
- "@bendyline/squisq-react": "2.5.0",
90
- "@bendyline/squisq-video-react": "2.3.0",
87
+ "@bendyline/squisq": "2.6.0",
88
+ "@bendyline/squisq-formats": "2.4.0",
89
+ "@bendyline/squisq-react": "2.6.0",
90
+ "@bendyline/squisq-video-react": "2.3.1",
91
91
  "@fortawesome/fontawesome-free": "7.2.0",
92
92
  "@tiptap/core": "2.27.2",
93
93
  "@tiptap/extension-heading": "2.27.2",