@bendyline/squisq-editor-react 2.11.20 → 2.11.21
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-NL4JP55H.js → chunk-5NXCXT55.js} +3350 -3216
- package/dist/{chunk-JI74KA6C.js → chunk-UCYZBMCG.js} +2 -2
- package/dist/index.d.ts +16 -13
- package/dist/index.js +2 -2
- package/dist/review/index.js +1 -1
- package/dist/shell/index.d.ts +1 -1
- package/dist/shell/index.js +2 -2
- package/dist/{shell-DTefmCBG.d.ts → shell-XyXxGPs4.d.ts} +3 -1
- package/dist/styles/index.css +6 -0
- package/package.json +6 -6
|
@@ -1960,7 +1960,7 @@ function EditorProvider({
|
|
|
1960
1960
|
const applySourceEdits = useCallback3(
|
|
1961
1961
|
(edits, options) => {
|
|
1962
1962
|
if (editorMode !== "markdown" || layoutModeState !== "document") return false;
|
|
1963
|
-
if (activeView === "raw" && monacoEditor) {
|
|
1963
|
+
if ((activeView === "raw" || activeView === "preview") && monacoEditor) {
|
|
1964
1964
|
const model = monacoEditor.getModel();
|
|
1965
1965
|
if (!model) return false;
|
|
1966
1966
|
const base = model.getValue();
|
|
@@ -1986,7 +1986,7 @@ function EditorProvider({
|
|
|
1986
1986
|
monacoEditor.pushUndoStop();
|
|
1987
1987
|
return true;
|
|
1988
1988
|
}
|
|
1989
|
-
if (activeView === "wysiwyg" && tiptapEditor) {
|
|
1989
|
+
if ((activeView === "wysiwyg" || activeView === "preview") && tiptapEditor) {
|
|
1990
1990
|
const base = markdownSourceRef.current;
|
|
1991
1991
|
if (options?.baseSource !== void 0 && options.baseSource !== base) return false;
|
|
1992
1992
|
const sorted = normalizeSourceEdits(base, edits);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CodeContext, E as EditorHostMode, S as SceneTextChannel, a as CalcEngineFactory, b as EditorView$1, c as CsvSourceMeta, X as XlsxSourceMeta, F as FormulaEditRecord } from './shell-
|
|
2
|
-
export { A as ApplySourceEditsOptions, B as BlockInsertionBuilder, d as BlockInsertionContext, e as BlockPlacement, f as BlockRange, g as BlockSlice, h as BlockTagVisibility, i as CodeContextSection, j as CoverImageSaveOutput, D as DashboardImageSaveOutput, k as DocumentLinkCandidate, l as DocumentLinkProvider, m as EditorActions, n as EditorColorScheme, o as EditorContextMenuContext, p as EditorContextMenuItem, q as EditorContextMenuItemVisibility, r as EditorContextMenuProvider, s as EditorContextMenuProviderProps, t as EditorContextValue, u as EditorInsertMenuItem, v as EditorMode, w as EditorProvider, x as EditorProviderProps, y as EditorSelectionInfo, z as EditorShell, G as EditorShellProps, H as EditorState, I as FormulaSessionOptions, J as ImageDisplayMode, K as IngestedSidecar, L as InsertBlockOptions, M as LayoutMode, N as MentionCandidate, O as MentionProvider, P as OutlineBlock, Q as OutlineInsertion, R as PreviewPanel, T as PreviewPanelProps, U as RawEditor, V as RawEditorProps, W as ThemeInheritance, Y as ViewPreferences, Z as WriteCanvasSettings, _ as WysiwygEditor, $ as WysiwygEditorProps, a0 as XLSX_LOCKED_REASON, a1 as XlsxFormulaSession, a2 as applySourceEditsToText, a3 as blockInsertionPoint, a4 as createXlsxFormulaSession, a5 as getBlockSlices, a6 as headingDepthForInsertion, a7 as ingestSidecarBytes, a8 as joinBlockAt, a9 as lineToOffset, aa as minimalReplaceEdit, ab as normalizeSourceEdits, ac as offsetToLine, ad as resolveOutlineInsertion, ae as sliceIndexAtOffset, af as sourceOutline, ag as spliceBlock, ah as useEditorContext, ai as useEditorContextMenuItems, aj as useEditorInsertMenuItems } from './shell-
|
|
1
|
+
import { C as CodeContext, E as EditorHostMode, S as SceneTextChannel, a as CalcEngineFactory, b as EditorView$1, c as CsvSourceMeta, X as XlsxSourceMeta, F as FormulaEditRecord } from './shell-XyXxGPs4.js';
|
|
2
|
+
export { A as ApplySourceEditsOptions, B as BlockInsertionBuilder, d as BlockInsertionContext, e as BlockPlacement, f as BlockRange, g as BlockSlice, h as BlockTagVisibility, i as CodeContextSection, j as CoverImageSaveOutput, D as DashboardImageSaveOutput, k as DocumentLinkCandidate, l as DocumentLinkProvider, m as EditorActions, n as EditorColorScheme, o as EditorContextMenuContext, p as EditorContextMenuItem, q as EditorContextMenuItemVisibility, r as EditorContextMenuProvider, s as EditorContextMenuProviderProps, t as EditorContextValue, u as EditorInsertMenuItem, v as EditorMode, w as EditorProvider, x as EditorProviderProps, y as EditorSelectionInfo, z as EditorShell, G as EditorShellProps, H as EditorState, I as FormulaSessionOptions, J as ImageDisplayMode, K as IngestedSidecar, L as InsertBlockOptions, M as LayoutMode, N as MentionCandidate, O as MentionProvider, P as OutlineBlock, Q as OutlineInsertion, R as PreviewPanel, T as PreviewPanelProps, U as RawEditor, V as RawEditorProps, W as ThemeInheritance, Y as ViewPreferences, Z as WriteCanvasSettings, _ as WysiwygEditor, $ as WysiwygEditorProps, a0 as XLSX_LOCKED_REASON, a1 as XlsxFormulaSession, a2 as applySourceEditsToText, a3 as blockInsertionPoint, a4 as createXlsxFormulaSession, a5 as getBlockSlices, a6 as headingDepthForInsertion, a7 as ingestSidecarBytes, a8 as joinBlockAt, a9 as lineToOffset, aa as minimalReplaceEdit, ab as normalizeSourceEdits, ac as offsetToLine, ad as resolveOutlineInsertion, ae as sliceIndexAtOffset, af as sourceOutline, ag as spliceBlock, ah as useEditorContext, ai as useEditorContextMenuItems, aj as useEditorInsertMenuItems } from './shell-XyXxGPs4.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ReactNode, CSSProperties, ReactElement } from 'react';
|
|
@@ -792,6 +792,17 @@ interface ImportThemeSectionProps {
|
|
|
792
792
|
}
|
|
793
793
|
declare function ImportThemeSection({ onImported, allowLayouts }: ImportThemeSectionProps): react_jsx_runtime.JSX.Element;
|
|
794
794
|
|
|
795
|
+
/**
|
|
796
|
+
* Dropdown trigger rendered directly beside the Use tab. Selecting a mode
|
|
797
|
+
* also enters the Use view, so the menu works from Write and Source as well
|
|
798
|
+
* as from an already-active preview.
|
|
799
|
+
*/
|
|
800
|
+
interface PreviewModeMenuProps {
|
|
801
|
+
/** Incremented by the parent to open the menu from another control. */
|
|
802
|
+
openRequest?: number;
|
|
803
|
+
}
|
|
804
|
+
declare function PreviewModeMenu({ openRequest }: PreviewModeMenuProps): react_jsx_runtime.JSX.Element;
|
|
805
|
+
|
|
795
806
|
/** Caption selection: off, or one of the two enabled styles. */
|
|
796
807
|
type CaptionMode = 'off' | CaptionStyle;
|
|
797
808
|
interface PreviewSettings {
|
|
@@ -944,24 +955,16 @@ interface PreviewToolbarControlsProps {
|
|
|
944
955
|
* setting still writes through the shared preview-settings context.
|
|
945
956
|
*/
|
|
946
957
|
displayMode?: DisplayMode;
|
|
958
|
+
/** Optional designer for the current document's slide summarization. */
|
|
959
|
+
summarizationDesigner?: (onClose: () => void) => ReactNode;
|
|
947
960
|
}
|
|
948
|
-
declare function PreviewToolbarControls({ displayMode }?: PreviewToolbarControlsProps): react_jsx_runtime.JSX.Element;
|
|
961
|
+
declare function PreviewToolbarControls({ displayMode, summarizationDesigner, }?: PreviewToolbarControlsProps): react_jsx_runtime.JSX.Element;
|
|
949
962
|
/**
|
|
950
963
|
* Segmented display-mode switch retained as a public, embeddable control.
|
|
951
964
|
* The editor shell uses {@link PreviewModeMenu} beside its Use tab instead.
|
|
952
965
|
* Narrate is hidden when the host disables `allowNarrate`.
|
|
953
966
|
*/
|
|
954
967
|
declare function PreviewModeSwitch(): react_jsx_runtime.JSX.Element;
|
|
955
|
-
/**
|
|
956
|
-
* Dropdown trigger rendered directly beside the Use tab. Selecting a mode
|
|
957
|
-
* also enters the Use view, so the menu works from Write and Source as well
|
|
958
|
-
* as from an already-active preview.
|
|
959
|
-
*/
|
|
960
|
-
interface PreviewModeMenuProps {
|
|
961
|
-
/** Incremented by the parent to open the menu from another control. */
|
|
962
|
-
openRequest?: number;
|
|
963
|
-
}
|
|
964
|
-
declare function PreviewModeMenu({ openRequest }: PreviewModeMenuProps): react_jsx_runtime.JSX.Element;
|
|
965
968
|
/**
|
|
966
969
|
* Segmented aspect-ratio switch (16:9 / 1:1 / 9:16 / 4:3), used inline in the
|
|
967
970
|
* Use toolbar and inside its overflow popover. Reads and writes the same
|
package/dist/index.js
CHANGED
|
@@ -232,7 +232,7 @@ import {
|
|
|
232
232
|
videoEmbedParagraphJson,
|
|
233
233
|
viewStateFromBinding,
|
|
234
234
|
writeHeadingViewState
|
|
235
|
-
} from "./chunk-
|
|
235
|
+
} from "./chunk-5NXCXT55.js";
|
|
236
236
|
import {
|
|
237
237
|
EditorProvider,
|
|
238
238
|
applySourceEditsToText,
|
|
@@ -253,7 +253,7 @@ import {
|
|
|
253
253
|
useBlockNavigator,
|
|
254
254
|
useEditorContext,
|
|
255
255
|
useEditorInsertMenuItems
|
|
256
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-UCYZBMCG.js";
|
|
257
257
|
import {
|
|
258
258
|
SPEECH_INPUT_SAMPLE_RATE,
|
|
259
259
|
isSpeechInputProviderFactory,
|
package/dist/review/index.js
CHANGED
package/dist/shell/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { h as BlockTagVisibility, k as DocumentLinkCandidate, l as DocumentLinkProvider, m as EditorActions, n as EditorColorScheme, o as EditorContextMenuContext, p as EditorContextMenuItem, q as EditorContextMenuItemVisibility, r as EditorContextMenuProvider, s as EditorContextMenuProviderProps, t as EditorContextValue, E as EditorHostMode, u as EditorInsertMenuItem, v as EditorMode, w as EditorProvider, x as EditorProviderProps, z as EditorShell, G as EditorShellProps, H as EditorState, b as EditorView, J as ImageDisplayMode, M as LayoutMode, N as MentionCandidate, O as MentionProvider, R as PreviewPanel, T as PreviewPanelProps, U as RawEditor, V as RawEditorProps, W as ThemeInheritance, Y as ViewPreferences, _ as WysiwygEditor, $ as WysiwygEditorProps, ah as useEditorContext, ai as useEditorContextMenuItems, aj as useEditorInsertMenuItems } from '../shell-
|
|
1
|
+
export { h as BlockTagVisibility, k as DocumentLinkCandidate, l as DocumentLinkProvider, m as EditorActions, n as EditorColorScheme, o as EditorContextMenuContext, p as EditorContextMenuItem, q as EditorContextMenuItemVisibility, r as EditorContextMenuProvider, s as EditorContextMenuProviderProps, t as EditorContextValue, E as EditorHostMode, u as EditorInsertMenuItem, v as EditorMode, w as EditorProvider, x as EditorProviderProps, z as EditorShell, G as EditorShellProps, H as EditorState, b as EditorView, J as ImageDisplayMode, M as LayoutMode, N as MentionCandidate, O as MentionProvider, R as PreviewPanel, T as PreviewPanelProps, U as RawEditor, V as RawEditorProps, W as ThemeInheritance, Y as ViewPreferences, _ as WysiwygEditor, $ as WysiwygEditorProps, ah as useEditorContext, ai as useEditorContextMenuItems, aj as useEditorInsertMenuItems } from '../shell-XyXxGPs4.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import '@bendyline/squisq/table';
|
|
4
4
|
import '@bendyline/squisq-calc';
|
package/dist/shell/index.js
CHANGED
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
RawEditor,
|
|
6
6
|
WysiwygEditor,
|
|
7
7
|
useEditorContextMenuItems
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-5NXCXT55.js";
|
|
9
9
|
import {
|
|
10
10
|
EditorProvider,
|
|
11
11
|
useEditorContext,
|
|
12
12
|
useEditorInsertMenuItems
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-UCYZBMCG.js";
|
|
14
14
|
import "../chunk-DNEVUOBZ.js";
|
|
15
15
|
import "../chunk-V4NBQF5C.js";
|
|
16
16
|
import "../chunk-OCQEWWHI.js";
|
|
@@ -1316,6 +1316,8 @@ interface EditorShellProps {
|
|
|
1316
1316
|
toolbarSlotAfterActions?: ReactNode;
|
|
1317
1317
|
/** Content rendered at the rightmost end of the toolbar, after all other elements. */
|
|
1318
1318
|
toolbarSlotRight?: ReactNode;
|
|
1319
|
+
/** Optional designer opened beside Summarize in the preview toolbar. */
|
|
1320
|
+
summarizationDesigner?: (onClose: () => void) => ReactNode;
|
|
1319
1321
|
/** Host-supplied content rendered at the right edge of the bottom status bar. */
|
|
1320
1322
|
statusBarSlotRight?: ReactNode;
|
|
1321
1323
|
/**
|
|
@@ -1719,7 +1721,7 @@ interface EditorShellProps {
|
|
|
1719
1721
|
* Complete markdown editor shell with toolbar, view switcher, and three
|
|
1720
1722
|
* editing modes: Raw (Monaco), WYSIWYG (Tiptap), and Preview.
|
|
1721
1723
|
*/
|
|
1722
|
-
declare function EditorShell({ initialMarkdown, initialView, hostMode, defaultViewportPreset, articleId, basePath, onChange, onLinkClick, showCodeCopyButton, onCopyCode, colorScheme, className, height, minHeight, maxHeight, mediaProvider, mediaEditRenders, workspaceContainer, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, showFilesToggle, showFilesWhenNotEmpty, showFormattingControls, showInsertControls, allowBinaryDownloads, toolbarSlotLeft, toolbarSlotAfterActions, toolbarSlotRight, statusBarSlotRight, sidePanelSlot, reviewProviders, showPlayTab, allowPresentationWindow, allowPresentationFullscreen, allowPrint, submitOnEnter, calcEngineFactory, codeContext, fullWidth, uxFont, thinMargins, writeCanvasSettings, showStatusBar, imageDisplayMode, fileName, saveCoverImageOutput, saveDashboardImageOutput, language, findMode, onFindModeChange, mentionProvider, proofing, proofingDefaultEnabled, proofingSpellingEnabled, proofingGrammarEnabled, proofingIgnoreStore, speechInput, documentLinkProvider, fenceRenderers, linkSchemes, allowRecording, allowNarrate, preserveSourceWrapping, placeholder, readOnly, imageSrc, imageAlt, imageMode, imageEditorContainer, onImageExport, inlinePreview, inlinePreviewWidth, outline, outlineWidth, blockTags, blockTagVisibility, themeInheritance, viewPreferences, onViewPreferencesChange, themeOverride, defaultThemeId, defaultThemeLabel, }: EditorShellProps): react_jsx_runtime.JSX.Element;
|
|
1724
|
+
declare function EditorShell({ initialMarkdown, initialView, hostMode, defaultViewportPreset, articleId, basePath, onChange, onLinkClick, showCodeCopyButton, onCopyCode, colorScheme, className, height, minHeight, maxHeight, mediaProvider, mediaEditRenders, workspaceContainer, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, showFilesToggle, showFilesWhenNotEmpty, showFormattingControls, showInsertControls, allowBinaryDownloads, toolbarSlotLeft, toolbarSlotAfterActions, toolbarSlotRight, summarizationDesigner, statusBarSlotRight, sidePanelSlot, reviewProviders, showPlayTab, allowPresentationWindow, allowPresentationFullscreen, allowPrint, submitOnEnter, calcEngineFactory, codeContext, fullWidth, uxFont, thinMargins, writeCanvasSettings, showStatusBar, imageDisplayMode, fileName, saveCoverImageOutput, saveDashboardImageOutput, language, findMode, onFindModeChange, mentionProvider, proofing, proofingDefaultEnabled, proofingSpellingEnabled, proofingGrammarEnabled, proofingIgnoreStore, speechInput, documentLinkProvider, fenceRenderers, linkSchemes, allowRecording, allowNarrate, preserveSourceWrapping, placeholder, readOnly, imageSrc, imageAlt, imageMode, imageEditorContainer, onImageExport, inlinePreview, inlinePreviewWidth, outline, outlineWidth, blockTags, blockTagVisibility, themeInheritance, viewPreferences, onViewPreferencesChange, themeOverride, defaultThemeId, defaultThemeLabel, }: EditorShellProps): react_jsx_runtime.JSX.Element;
|
|
1723
1725
|
|
|
1724
1726
|
/**
|
|
1725
1727
|
* Shared editor context menu.
|
package/dist/styles/index.css
CHANGED
|
@@ -9716,6 +9716,12 @@
|
|
|
9716
9716
|
min-width: 180px;
|
|
9717
9717
|
max-width: calc(100vw - 16px);
|
|
9718
9718
|
}
|
|
9719
|
+
.squisq-toolbar-button.squisq-preview-design-button {
|
|
9720
|
+
width: auto;
|
|
9721
|
+
height: 30px;
|
|
9722
|
+
padding: 3px 8px 1px;
|
|
9723
|
+
border: 1px solid var(--squisq-border);
|
|
9724
|
+
}
|
|
9719
9725
|
.squisq-preview-control--compact {
|
|
9720
9726
|
display: flex;
|
|
9721
9727
|
align-items: center;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/squisq-editor-react",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.21",
|
|
4
4
|
"description": "React editor shell with raw/WYSIWYG/preview modes for Squisq documents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -102,12 +102,12 @@
|
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
|
-
"@bendyline/squisq": "2.11.
|
|
105
|
+
"@bendyline/squisq": "2.11.18",
|
|
106
106
|
"@bendyline/squisq-calc": "2.11.1",
|
|
107
|
-
"@bendyline/squisq-formats": "2.6.
|
|
108
|
-
"@bendyline/squisq-grid-react": "2.11.
|
|
109
|
-
"@bendyline/squisq-react": "2.11.
|
|
110
|
-
"@bendyline/squisq-video-react": "2.4.
|
|
107
|
+
"@bendyline/squisq-formats": "2.6.18",
|
|
108
|
+
"@bendyline/squisq-grid-react": "2.11.19",
|
|
109
|
+
"@bendyline/squisq-react": "2.11.20",
|
|
110
|
+
"@bendyline/squisq-video-react": "2.4.24",
|
|
111
111
|
"@fortawesome/fontawesome-free": "7.2.0",
|
|
112
112
|
"@tiptap/core": "2.27.3",
|
|
113
113
|
"@tiptap/extension-heading": "2.27.3",
|