@bendyline/squisq-editor-react 2.12.2 → 2.12.4
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-V4NBQF5C.js → chunk-A2H3JOA5.js} +1 -0
- package/dist/{chunk-WA7KBG3D.js → chunk-CLO2AM6J.js} +1594 -1268
- package/dist/index.d.ts +66 -3
- package/dist/index.js +22 -2
- package/dist/monaco.js +1 -1
- package/dist/shell/index.js +2 -2
- package/dist/styles/index.css +61 -0
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { CodeBlockCopyHandler, DisplayMode, CaptionStyle, VideoPresentation, Pip
|
|
|
9
9
|
import { IconFamily } from '@bendyline/squisq/icons';
|
|
10
10
|
import { CoverSlideTemplate, CoverSlidePlayback, DashboardStyleId, DashboardLayoutSummary, ConnectorRouting, AsciiDiagram, Tree, AsciiTimeline, AsciiTimelineSide, AsciiTimelineMarker } from '@bendyline/squisq/doc';
|
|
11
11
|
export { BuildPreviewDocOptions, buildPreviewDoc, documentTitleFromFileName } from '@bendyline/squisq/doc';
|
|
12
|
-
import { MarkdownWrapState, BlockVideoEmbed, VideoEmbed } from '@bendyline/squisq/markdown';
|
|
12
|
+
import { MarkdownWrapState, SvgIslandDiagnostic, BlockVideoEmbed, VideoEmbed } from '@bendyline/squisq/markdown';
|
|
13
13
|
export { MarkdownSourceEdit } from '@bendyline/squisq/markdown';
|
|
14
14
|
import * as monaco_editor from 'monaco-editor';
|
|
15
15
|
import { editor } from 'monaco-editor';
|
|
@@ -22,8 +22,8 @@ import { DecorationSet, EditorView } from '@tiptap/pm/view';
|
|
|
22
22
|
import { Editor } from '@tiptap/react';
|
|
23
23
|
import { Transaction, PluginKey, EditorState } from '@tiptap/pm/state';
|
|
24
24
|
import { Node } from '@tiptap/pm/model';
|
|
25
|
-
import { RenderResult } from 'mermaid';
|
|
26
25
|
import { FenceRendererMap } from '@bendyline/squisq/fence';
|
|
26
|
+
import { RenderResult } from 'mermaid';
|
|
27
27
|
import { TableViewState } from '@bendyline/squisq/table';
|
|
28
28
|
import { EditJournal } from '@bendyline/squisq-grid-react';
|
|
29
29
|
export { JsonEditor, JsonEditorProps } from './json-editor/index.js';
|
|
@@ -2056,6 +2056,69 @@ declare function removeNodeOp(diagram: AsciiDiagram, nodeId: string): AsciiDiagr
|
|
|
2056
2056
|
*/
|
|
2057
2057
|
declare function shouldPasteAsAsciiFence(text: string): boolean;
|
|
2058
2058
|
|
|
2059
|
+
/**
|
|
2060
|
+
* Tiptap extension for `svg` code fences (SVG islands).
|
|
2061
|
+
*
|
|
2062
|
+
* The code block stays the document's source of truth: the extension hides
|
|
2063
|
+
* it and mounts a widget after it that shows the island as a picture, with a
|
|
2064
|
+
* Source view (a Monaco inset) that edits the fence body. Nothing but the
|
|
2065
|
+
* author's own edits is ever written back, so an untouched island round-trips
|
|
2066
|
+
* byte-identically.
|
|
2067
|
+
*
|
|
2068
|
+
* A host that registers its own `svg` fence renderer owns those fences
|
|
2069
|
+
* instead (the `HostFenceExtension` mounts it), as on the read path.
|
|
2070
|
+
*/
|
|
2071
|
+
|
|
2072
|
+
type SvgIslandBlockEntry = FenceBlockEntry;
|
|
2073
|
+
interface SvgIslandPluginState {
|
|
2074
|
+
entries: SvgIslandBlockEntry[];
|
|
2075
|
+
decorations: DecorationSet;
|
|
2076
|
+
/**
|
|
2077
|
+
* Islands showing their Source view. Held here rather than in the widget,
|
|
2078
|
+
* so it survives ProseMirror re-creating the widget's DOM.
|
|
2079
|
+
*/
|
|
2080
|
+
sourceVisible: ReadonlySet<string>;
|
|
2081
|
+
seq: number;
|
|
2082
|
+
}
|
|
2083
|
+
interface SvgIslandExtensionOptions {
|
|
2084
|
+
/** When false, leave svg fences as ordinary code blocks. */
|
|
2085
|
+
enabled?: boolean;
|
|
2086
|
+
/** Live host fence-renderer registry; a host `svg` renderer wins. */
|
|
2087
|
+
renderers?: () => FenceRendererMap | null | undefined;
|
|
2088
|
+
}
|
|
2089
|
+
declare const SVG_ISLAND_KEY: PluginKey<SvgIslandPluginState>;
|
|
2090
|
+
/** Whether a node is a ```svg fence (whether or not it sanitizes cleanly). */
|
|
2091
|
+
declare function isSvgIslandNode(node: Node): boolean;
|
|
2092
|
+
declare function findSvgIslandBlockPos(editor: Editor, blockId: string): number | null;
|
|
2093
|
+
declare function isSvgIslandSourceVisible(editor: Editor, blockId: string): boolean;
|
|
2094
|
+
/** Show or hide an island's Source view without changing any document bytes. */
|
|
2095
|
+
declare function toggleSvgIslandSource(editor: Editor, blockId: string): void;
|
|
2096
|
+
/**
|
|
2097
|
+
* Replace an island's fence body in one transaction. Honors read-only, and
|
|
2098
|
+
* clears the body rather than building an (invalid) empty text node.
|
|
2099
|
+
*/
|
|
2100
|
+
declare function replaceSvgIslandText(editor: Editor, blockId: string, next: string): boolean;
|
|
2101
|
+
declare const SvgIslandExtension: Extension<SvgIslandExtensionOptions, any>;
|
|
2102
|
+
|
|
2103
|
+
interface SvgIslandWidgetProps {
|
|
2104
|
+
editor: Editor;
|
|
2105
|
+
blockId: string;
|
|
2106
|
+
host?: HTMLElement | null;
|
|
2107
|
+
}
|
|
2108
|
+
declare function SvgIslandWidget({ editor, blockId, host }: SvgIslandWidgetProps): react.JSX.Element | null;
|
|
2109
|
+
|
|
2110
|
+
/** "script, onload attribute, 2 style rules" — what sanitizing removed. */
|
|
2111
|
+
declare function describeSvgIslandRemovals(diagnostics: readonly SvgIslandDiagnostic[]): string;
|
|
2112
|
+
|
|
2113
|
+
/**
|
|
2114
|
+
* Paste gate: raw SVG markup (`<svg …>…</svg>`, optionally with an XML
|
|
2115
|
+
* prolog, as an editor's "Copy SVG" or a file's text produces) pasted into
|
|
2116
|
+
* the Write view becomes a ```svg fence — an SVG island — rather than a
|
|
2117
|
+
* paragraph of literal markup.
|
|
2118
|
+
*/
|
|
2119
|
+
/** Whether pasted text is one SVG document that renders as an island. */
|
|
2120
|
+
declare function shouldPasteAsSvgFence(text: string): boolean;
|
|
2121
|
+
|
|
2059
2122
|
interface MermaidThemeStore {
|
|
2060
2123
|
getSnapshot: () => Theme;
|
|
2061
2124
|
subscribe: (listener: () => void) => () => void;
|
|
@@ -3527,4 +3590,4 @@ declare function unshownSlidesWarning(total: number, unshown: number): string |
|
|
|
3527
3590
|
/** The exact label of the review-state block-timings checkbox. */
|
|
3528
3591
|
declare const SLIDE_TIMING_CHECKBOX_LABEL = "Update block timings when I save this narration";
|
|
3529
3592
|
|
|
3530
|
-
export { ALL_PICKER_ENTRIES, type AddTimelineEventOptions, type AddTimelineEventResult, type ApplyAsciiDiagramCommandOptions, type AsciiDiagramBlockEntry, AsciiDiagramExtension, type AsciiDiagramExtensionOptions, type AsciiDiagramPluginState, type AsciiDiagramView, AsciiDiagramWidget, BlockCardView, type BlockCardViewProps, type BlockNavigator, BlockPropertiesPopover, type BlockPropertiesPopoverProps, CODE_SNIPPET_KEY, CODE_SNIPPET_LANGUAGES, CalcEngineFactory, CodeContext, CodeContextZones, type CodeSnippetBlockEntry, type CodeSnippetData, CodeSnippetExtension, type CodeSnippetExtensionOptions, type CodeSnippetLanguage, type CodeSnippetPluginState, CodeSnippetWidget, type CodeSnippetWidgetProps, CsvSourceMeta, type CustomTemplateContextValue, CustomTemplateProvider, type CustomTemplateProviderProps, type CustomThemeContextValue, CustomThemeProvider, type CustomThemeProviderProps, DATA_CARD_KEY, DEFAULT_MERMAID_DIAGRAM_TYPE, type DataCardBlockEntry, DataCardExtension, type DataCardExtensionOptions, type DataCardPluginState, DataCardWidget, type DataPreview, DiagramCanvas, type DiagramCommand, type DiagramData, type DiagramEdge, type DiagramNode, type DirectionModel, type DocCustomTemplates, type DocCustomThemes, DocumentSettingsDialog, type DocumentSettingsDialogProps, type DragContentType, type DropTarget, DropZoneOverlay, type DropZoneOverlayProps, EMPTY_TRANSITION, EditorHostMode, EditorView$1 as EditorView, EmojiPicker, type EmojiPickerProps, FENCE_WIDGET_CONTAINED_EVENTS, type FenceBlockEntry, type FileCategory, type FileKind, type FolderEntry, FolderView, type FolderViewProps, FormulaEditRecord, type GridSaveResult, HOST_FENCE_KEY, type HeadingTransitionAttrs, type HeadingViewBinding, HeadingWithTemplate, type HostFenceBlockEntry, HostFenceExtension, type HostFenceExtensionOptions, type HostFencePluginState, ImportThemeSection, type ImportThemeSectionProps, type ImportedThemeResult, InlinePreviewGutter, type InlinePreviewGutterProps, MERMAID_DIAGRAM_KEY, MERMAID_DIAGRAM_TYPES, MERMAID_FLOWCHART_SHAPES, MarkdownEscape, MediaBin, type MediaBinProps, type MediaClipPatch, type MermaidDiagramBlockEntry, MermaidDiagramCanvas, type MermaidDiagramCanvasProps, type MermaidDiagramCategory, type MermaidDiagramData, MermaidDiagramExtension, type MermaidDiagramExtensionOptions, type MermaidDiagramPluginState, type MermaidDiagramPreview, type MermaidDiagramProperty, type MermaidDiagramType, MermaidDiagramTypeThumbnail, MermaidDiagramWidget, type MermaidDiagramWidgetProps, type MermaidEditCapabilities, type MermaidEditableDiagramKind, type MermaidEditableEdge, type MermaidEditableModel, type MermaidEditableNode, type MermaidEditableText, type MermaidEditableTextTarget, type MermaidFlowchartDirection, type MermaidFlowchartModel, type MermaidFlowchartShape, type MermaidFlowchartShapeId, type MermaidNodeCanvasAction, type MermaidRenderResult, type MermaidSelection, MermaidShapePalette, type MermaidShapePaletteProps, type MermaidSourceEditableModel, type MermaidSurfaceScheme, type MermaidValidationResult, MonacoLanguageLoadOptions, MonacoLanguageRequest, OutlinePanel, type OutlinePanelProps, PICKER_CATEGORIES, type PickerCategory, type PickerEntry, PlainHtmlPreview, type PlainHtmlPreviewProps, PreviewFormatSwitch, PreviewModeMenu, PreviewModeSwitch, type PreviewSettings, PreviewSettingsProvider, PreviewToolbarControls, type PreviewToolbarControlsProps, REPAIRABLE_KEY, type RecorderPanelMode, type RecorderSlide, RecorderSlidesPanel, type RecorderSlidesPanelProps, RecorderState, type RepairableBlockEntry, RepairableDiagramExtension, type RepairableDiagramExtensionOptions, type RepairablePluginState, SLIDE_TIMING_CHECKBOX_LABEL, type SaveCsvEditsOptions, type SaveXlsxEditsOptions, StatusBar, type StatusBarProps, Subscript, Superscript, TIMELINE_VIEW_KEY, TRANSITION_ENTRIES, TRANSITION_GROUPS, TemplatePicker, ThemeCustomizerPanel, type ThemeCustomizerPanelProps, ThemePicker, type ThemePickerProps, type ThemeSaveExtras, type TimelineBlockEntry, type TimelineCommand, type TimelineCommandResult, TimelineCompositionPanel, type TimelineCompositionPanelProps, TimelineEditorWidget, type TimelineEditorWidgetProps, type TimelineEventPatch, TimelineToolbar, type TimelineToolbarProps, TimelineTrack, type TimelineTrackProps, TimelineVideoPanel, type TimelineVideoPanelProps, type TimelineViewData, TimelineViewExtension, type TimelineViewExtensionOptions, type TimelineViewPluginState, Toolbar, type ToolbarProps, TooltipLayer, TransformMenu, type TransitionCatalogEntry, type TransitionFields, type TransitionGroup, TransitionPicker, type TransitionPickerProps, type TreeBlockEntry, type TreeCommand, TreeOutlineWidget, type TreeViewData, TreeViewExtension, type TreeViewExtensionOptions, type TreeViewPluginState, type UseBlockNavigatorOptions, type UseFileDropOptions, type UseFileDropResult, type UseMonacoLoaderResult, VIDEO_EMBED_KEY, VersionHistoryPanel, type VideoEmbedBlockEntry, VideoEmbedDialog, type VideoEmbedDialogProps, VideoEmbedExtension, type VideoEmbedExtensionOptions, type VideoEmbedPluginState, ViewMenuPanel, ViewSwitcher, type ViewSwitcherProps, type WrapPolicyIngest, XlsxSourceMeta, adaptThemeToSurface, addEdgeOp, addItemOp, addNodeOp, addTimelineEventOp, applyAsciiDiagramCommand, applyRepairCommand, applyTimelineCommand, applyTreeCommand, asciiDiagramToCanvas, buildRecorderSlideDeck, clampSlideIndex, classifyFile, codeSnippetFenceLanguageToken, codeSnippetLanguageLabel, codeSnippetMarkdown, containFenceWidgetEvents, convertVideoEmbedToLink, dataExtensionOf, dataLinkHrefOf, detectLanguageFromFileName, draftPatchFromImportedTheme, findAsciiDiagramBlockPos, findCodeSnippetBlockPos, findDataCardBlockPos, findHostFenceBlockPos, findMermaidDiagramBlockPos, findOwningHeadingPosition, findRepairableBlockPos, findTimelineBlockPos, findTransitionEntry, findTreeBlockPos, findVideoEmbedBlockPos, formatSeconds, getTimelineForNode, indentItemOp, ingestForWrite, insertVideoEmbedReference, inspectMermaidSource, isAsciiSourceVisible, isCodeSnippetFenceLanguage, isCodeSnippetNode, isExpandedPanel, isMermaidDiagramNode, isMermaidFlowchartShapeId, isMermaidSourceVisible, isRepairableFence, isTimelineSourceSafeForSemanticEdit, loadDataPreview, mapFenceEntries, markdownToTiptap, mermaidDiagramMarkdown, mermaidDiagramProperties, mermaidEditCapabilities, mermaidEditableTexts, mermaidErrorMessage, mermaidSurfaceScheme, monacoLanguageForFence, moveItemDownOp, moveItemUpOp, moveNodeOp, nextTimelineEventId, normalizeMermaidFlowchartShape, outdentItemOp, panelModeAfterToggle, parseTimelineForNode, partitionFiles, pasteVideoEmbedCode, persistFromWrite, preloadMonaco, preloadMonacoSuggestions, processDataFiles, processMediaFiles, processTextFile, processTextFiles, readBlockAttrsParams, readBlockAttrsTransition, readBlockAttrsValue, readHeadingLineTransition, readHeadingViewBinding, removeEdgeOp, removeItemOp, removeNodeOp, removeTimelineEventOp, renameItemOp, renameNodeOp, renderMermaidDiagram, replaceAsciiFenceText, replaceCodeSnippetText, replaceHostFenceText, replaceAsciiFenceText as replaceTreeFenceText, resizeNodeOp, resolveFileKind, resolveMermaidSurfaceTheme, sanitizeAsciiLabel, sanitizeTimelineText, sanitizeTreeLabel, saveCsvEdits, saveXlsxEdits, searchPickerEntries, setBlockAttrsValue, setBlockDurationInSource, setBlockStartTimeInSource, setBlockTransitionInSource, setHeadingAttrsTransition, setHeadingLineTransition, setMediaClipInSource, shouldPasteAsAsciiFence, shouldPasteAsTimelineFence, shouldPasteAsTreeFence, showSlideTimingCheckbox, slideStepForKey, summarizeBlockProps, templateLabel, tiptapToMarkdown, toggleAsciiSource, toggleDirOp, toggleMermaidSource, transitionLabel, translateDiagramOp, unshownSlidesWarning, updateTimelineEventOp, useAsciiDiagramData, useBlockNavigator, useCodeSnippetData, useCustomTemplates, useCustomThemes, useDocCustomTemplates, useDocCustomThemes, useFileDrop, useMermaidDiagramData, useMermaidSurfaceTheme, useMonacoLoader, usePreviewSettings, usePreviewSettingsOptional, useTimelineData, useTreeViewData, validateMermaidSource, videoEmbedMarkdown, videoEmbedOfParagraph, videoEmbedParagraphJson, viewStateFromBinding, writeHeadingViewState };
|
|
3593
|
+
export { ALL_PICKER_ENTRIES, type AddTimelineEventOptions, type AddTimelineEventResult, type ApplyAsciiDiagramCommandOptions, type AsciiDiagramBlockEntry, AsciiDiagramExtension, type AsciiDiagramExtensionOptions, type AsciiDiagramPluginState, type AsciiDiagramView, AsciiDiagramWidget, BlockCardView, type BlockCardViewProps, type BlockNavigator, BlockPropertiesPopover, type BlockPropertiesPopoverProps, CODE_SNIPPET_KEY, CODE_SNIPPET_LANGUAGES, CalcEngineFactory, CodeContext, CodeContextZones, type CodeSnippetBlockEntry, type CodeSnippetData, CodeSnippetExtension, type CodeSnippetExtensionOptions, type CodeSnippetLanguage, type CodeSnippetPluginState, CodeSnippetWidget, type CodeSnippetWidgetProps, CsvSourceMeta, type CustomTemplateContextValue, CustomTemplateProvider, type CustomTemplateProviderProps, type CustomThemeContextValue, CustomThemeProvider, type CustomThemeProviderProps, DATA_CARD_KEY, DEFAULT_MERMAID_DIAGRAM_TYPE, type DataCardBlockEntry, DataCardExtension, type DataCardExtensionOptions, type DataCardPluginState, DataCardWidget, type DataPreview, DiagramCanvas, type DiagramCommand, type DiagramData, type DiagramEdge, type DiagramNode, type DirectionModel, type DocCustomTemplates, type DocCustomThemes, DocumentSettingsDialog, type DocumentSettingsDialogProps, type DragContentType, type DropTarget, DropZoneOverlay, type DropZoneOverlayProps, EMPTY_TRANSITION, EditorHostMode, EditorView$1 as EditorView, EmojiPicker, type EmojiPickerProps, FENCE_WIDGET_CONTAINED_EVENTS, type FenceBlockEntry, type FileCategory, type FileKind, type FolderEntry, FolderView, type FolderViewProps, FormulaEditRecord, type GridSaveResult, HOST_FENCE_KEY, type HeadingTransitionAttrs, type HeadingViewBinding, HeadingWithTemplate, type HostFenceBlockEntry, HostFenceExtension, type HostFenceExtensionOptions, type HostFencePluginState, ImportThemeSection, type ImportThemeSectionProps, type ImportedThemeResult, InlinePreviewGutter, type InlinePreviewGutterProps, MERMAID_DIAGRAM_KEY, MERMAID_DIAGRAM_TYPES, MERMAID_FLOWCHART_SHAPES, MarkdownEscape, MediaBin, type MediaBinProps, type MediaClipPatch, type MermaidDiagramBlockEntry, MermaidDiagramCanvas, type MermaidDiagramCanvasProps, type MermaidDiagramCategory, type MermaidDiagramData, MermaidDiagramExtension, type MermaidDiagramExtensionOptions, type MermaidDiagramPluginState, type MermaidDiagramPreview, type MermaidDiagramProperty, type MermaidDiagramType, MermaidDiagramTypeThumbnail, MermaidDiagramWidget, type MermaidDiagramWidgetProps, type MermaidEditCapabilities, type MermaidEditableDiagramKind, type MermaidEditableEdge, type MermaidEditableModel, type MermaidEditableNode, type MermaidEditableText, type MermaidEditableTextTarget, type MermaidFlowchartDirection, type MermaidFlowchartModel, type MermaidFlowchartShape, type MermaidFlowchartShapeId, type MermaidNodeCanvasAction, type MermaidRenderResult, type MermaidSelection, MermaidShapePalette, type MermaidShapePaletteProps, type MermaidSourceEditableModel, type MermaidSurfaceScheme, type MermaidValidationResult, MonacoLanguageLoadOptions, MonacoLanguageRequest, OutlinePanel, type OutlinePanelProps, PICKER_CATEGORIES, type PickerCategory, type PickerEntry, PlainHtmlPreview, type PlainHtmlPreviewProps, PreviewFormatSwitch, PreviewModeMenu, PreviewModeSwitch, type PreviewSettings, PreviewSettingsProvider, PreviewToolbarControls, type PreviewToolbarControlsProps, REPAIRABLE_KEY, type RecorderPanelMode, type RecorderSlide, RecorderSlidesPanel, type RecorderSlidesPanelProps, RecorderState, type RepairableBlockEntry, RepairableDiagramExtension, type RepairableDiagramExtensionOptions, type RepairablePluginState, SLIDE_TIMING_CHECKBOX_LABEL, SVG_ISLAND_KEY, type SaveCsvEditsOptions, type SaveXlsxEditsOptions, StatusBar, type StatusBarProps, Subscript, Superscript, type SvgIslandBlockEntry, SvgIslandExtension, type SvgIslandExtensionOptions, type SvgIslandPluginState, SvgIslandWidget, type SvgIslandWidgetProps, TIMELINE_VIEW_KEY, TRANSITION_ENTRIES, TRANSITION_GROUPS, TemplatePicker, ThemeCustomizerPanel, type ThemeCustomizerPanelProps, ThemePicker, type ThemePickerProps, type ThemeSaveExtras, type TimelineBlockEntry, type TimelineCommand, type TimelineCommandResult, TimelineCompositionPanel, type TimelineCompositionPanelProps, TimelineEditorWidget, type TimelineEditorWidgetProps, type TimelineEventPatch, TimelineToolbar, type TimelineToolbarProps, TimelineTrack, type TimelineTrackProps, TimelineVideoPanel, type TimelineVideoPanelProps, type TimelineViewData, TimelineViewExtension, type TimelineViewExtensionOptions, type TimelineViewPluginState, Toolbar, type ToolbarProps, TooltipLayer, TransformMenu, type TransitionCatalogEntry, type TransitionFields, type TransitionGroup, TransitionPicker, type TransitionPickerProps, type TreeBlockEntry, type TreeCommand, TreeOutlineWidget, type TreeViewData, TreeViewExtension, type TreeViewExtensionOptions, type TreeViewPluginState, type UseBlockNavigatorOptions, type UseFileDropOptions, type UseFileDropResult, type UseMonacoLoaderResult, VIDEO_EMBED_KEY, VersionHistoryPanel, type VideoEmbedBlockEntry, VideoEmbedDialog, type VideoEmbedDialogProps, VideoEmbedExtension, type VideoEmbedExtensionOptions, type VideoEmbedPluginState, ViewMenuPanel, ViewSwitcher, type ViewSwitcherProps, type WrapPolicyIngest, XlsxSourceMeta, adaptThemeToSurface, addEdgeOp, addItemOp, addNodeOp, addTimelineEventOp, applyAsciiDiagramCommand, applyRepairCommand, applyTimelineCommand, applyTreeCommand, asciiDiagramToCanvas, buildRecorderSlideDeck, clampSlideIndex, classifyFile, codeSnippetFenceLanguageToken, codeSnippetLanguageLabel, codeSnippetMarkdown, containFenceWidgetEvents, convertVideoEmbedToLink, dataExtensionOf, dataLinkHrefOf, describeSvgIslandRemovals, detectLanguageFromFileName, draftPatchFromImportedTheme, findAsciiDiagramBlockPos, findCodeSnippetBlockPos, findDataCardBlockPos, findHostFenceBlockPos, findMermaidDiagramBlockPos, findOwningHeadingPosition, findRepairableBlockPos, findSvgIslandBlockPos, findTimelineBlockPos, findTransitionEntry, findTreeBlockPos, findVideoEmbedBlockPos, formatSeconds, getTimelineForNode, indentItemOp, ingestForWrite, insertVideoEmbedReference, inspectMermaidSource, isAsciiSourceVisible, isCodeSnippetFenceLanguage, isCodeSnippetNode, isExpandedPanel, isMermaidDiagramNode, isMermaidFlowchartShapeId, isMermaidSourceVisible, isRepairableFence, isSvgIslandNode, isSvgIslandSourceVisible, isTimelineSourceSafeForSemanticEdit, loadDataPreview, mapFenceEntries, markdownToTiptap, mermaidDiagramMarkdown, mermaidDiagramProperties, mermaidEditCapabilities, mermaidEditableTexts, mermaidErrorMessage, mermaidSurfaceScheme, monacoLanguageForFence, moveItemDownOp, moveItemUpOp, moveNodeOp, nextTimelineEventId, normalizeMermaidFlowchartShape, outdentItemOp, panelModeAfterToggle, parseTimelineForNode, partitionFiles, pasteVideoEmbedCode, persistFromWrite, preloadMonaco, preloadMonacoSuggestions, processDataFiles, processMediaFiles, processTextFile, processTextFiles, readBlockAttrsParams, readBlockAttrsTransition, readBlockAttrsValue, readHeadingLineTransition, readHeadingViewBinding, removeEdgeOp, removeItemOp, removeNodeOp, removeTimelineEventOp, renameItemOp, renameNodeOp, renderMermaidDiagram, replaceAsciiFenceText, replaceCodeSnippetText, replaceHostFenceText, replaceSvgIslandText, replaceAsciiFenceText as replaceTreeFenceText, resizeNodeOp, resolveFileKind, resolveMermaidSurfaceTheme, sanitizeAsciiLabel, sanitizeTimelineText, sanitizeTreeLabel, saveCsvEdits, saveXlsxEdits, searchPickerEntries, setBlockAttrsValue, setBlockDurationInSource, setBlockStartTimeInSource, setBlockTransitionInSource, setHeadingAttrsTransition, setHeadingLineTransition, setMediaClipInSource, shouldPasteAsAsciiFence, shouldPasteAsSvgFence, shouldPasteAsTimelineFence, shouldPasteAsTreeFence, showSlideTimingCheckbox, slideStepForKey, summarizeBlockProps, templateLabel, tiptapToMarkdown, toggleAsciiSource, toggleDirOp, toggleMermaidSource, toggleSvgIslandSource, transitionLabel, translateDiagramOp, unshownSlidesWarning, updateTimelineEventOp, useAsciiDiagramData, useBlockNavigator, useCodeSnippetData, useCustomTemplates, useCustomThemes, useDocCustomTemplates, useDocCustomThemes, useFileDrop, useMermaidDiagramData, useMermaidSurfaceTheme, useMonacoLoader, usePreviewSettings, usePreviewSettingsOptional, useTimelineData, useTreeViewData, validateMermaidSource, videoEmbedMarkdown, videoEmbedOfParagraph, videoEmbedParagraphJson, viewStateFromBinding, writeHeadingViewState };
|
package/dist/index.js
CHANGED
|
@@ -65,11 +65,14 @@ import {
|
|
|
65
65
|
REPAIRABLE_KEY,
|
|
66
66
|
RawEditor,
|
|
67
67
|
RepairableDiagramExtension,
|
|
68
|
+
SVG_ISLAND_KEY,
|
|
68
69
|
Section,
|
|
69
70
|
SeedColorRow,
|
|
70
71
|
StatusBar,
|
|
71
72
|
Subscript,
|
|
72
73
|
Superscript,
|
|
74
|
+
SvgIslandExtension,
|
|
75
|
+
SvgIslandWidget,
|
|
73
76
|
TEXT_SHADOW_PRESETS,
|
|
74
77
|
TIMELINE_VIEW_KEY,
|
|
75
78
|
TRANSITION_ENTRIES,
|
|
@@ -115,6 +118,7 @@ import {
|
|
|
115
118
|
createXlsxFormulaSession,
|
|
116
119
|
dataExtensionOf,
|
|
117
120
|
dataLinkHrefOf,
|
|
121
|
+
describeSvgIslandRemovals,
|
|
118
122
|
draftPatchFromImportedTheme,
|
|
119
123
|
findAsciiDiagramBlockPos,
|
|
120
124
|
findCodeSnippetBlockPos,
|
|
@@ -123,6 +127,7 @@ import {
|
|
|
123
127
|
findMermaidDiagramBlockPos,
|
|
124
128
|
findOwningHeadingPosition,
|
|
125
129
|
findRepairableBlockPos,
|
|
130
|
+
findSvgIslandBlockPos,
|
|
126
131
|
findTimelineBlockPos,
|
|
127
132
|
findTransitionEntry,
|
|
128
133
|
findTreeBlockPos,
|
|
@@ -141,6 +146,8 @@ import {
|
|
|
141
146
|
isMermaidFlowchartShapeId,
|
|
142
147
|
isMermaidSourceVisible,
|
|
143
148
|
isRepairableFence,
|
|
149
|
+
isSvgIslandNode,
|
|
150
|
+
isSvgIslandSourceVisible,
|
|
144
151
|
isTimelineSourceSafeForSemanticEdit,
|
|
145
152
|
loadDataPreview,
|
|
146
153
|
mapFenceEntries,
|
|
@@ -184,6 +191,7 @@ import {
|
|
|
184
191
|
replaceAsciiFenceText,
|
|
185
192
|
replaceCodeSnippetText,
|
|
186
193
|
replaceHostFenceText,
|
|
194
|
+
replaceSvgIslandText,
|
|
187
195
|
resizeNodeOp,
|
|
188
196
|
resolveMermaidSurfaceTheme,
|
|
189
197
|
sanitizeAsciiLabel,
|
|
@@ -200,6 +208,7 @@ import {
|
|
|
200
208
|
setHeadingLineTransition,
|
|
201
209
|
setMediaClipInSource,
|
|
202
210
|
shouldPasteAsAsciiFence,
|
|
211
|
+
shouldPasteAsSvgFence,
|
|
203
212
|
shouldPasteAsTimelineFence,
|
|
204
213
|
shouldPasteAsTreeFence,
|
|
205
214
|
summarizeBlockProps,
|
|
@@ -208,6 +217,7 @@ import {
|
|
|
208
217
|
toggleAsciiSource,
|
|
209
218
|
toggleDirOp,
|
|
210
219
|
toggleMermaidSource,
|
|
220
|
+
toggleSvgIslandSource,
|
|
211
221
|
transitionLabel,
|
|
212
222
|
translateDiagramOp,
|
|
213
223
|
updateTimelineEventOp,
|
|
@@ -233,7 +243,7 @@ import {
|
|
|
233
243
|
videoEmbedParagraphJson,
|
|
234
244
|
viewStateFromBinding,
|
|
235
245
|
writeHeadingViewState
|
|
236
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-CLO2AM6J.js";
|
|
237
247
|
import {
|
|
238
248
|
EditorProvider,
|
|
239
249
|
applySourceEditsToText,
|
|
@@ -260,7 +270,7 @@ import {
|
|
|
260
270
|
isSpeechInputProviderFactory,
|
|
261
271
|
resolveSpeechInputProvider
|
|
262
272
|
} from "./chunk-DNEVUOBZ.js";
|
|
263
|
-
import "./chunk-
|
|
273
|
+
import "./chunk-A2H3JOA5.js";
|
|
264
274
|
import {
|
|
265
275
|
JsonEditor
|
|
266
276
|
} from "./chunk-PXO3D42N.js";
|
|
@@ -860,9 +870,12 @@ export {
|
|
|
860
870
|
RepairableDiagramExtension,
|
|
861
871
|
SLIDE_TIMING_CHECKBOX_LABEL,
|
|
862
872
|
SPEECH_INPUT_SAMPLE_RATE,
|
|
873
|
+
SVG_ISLAND_KEY,
|
|
863
874
|
StatusBar,
|
|
864
875
|
Subscript,
|
|
865
876
|
Superscript,
|
|
877
|
+
SvgIslandExtension,
|
|
878
|
+
SvgIslandWidget,
|
|
866
879
|
TELEPROMPTER_CSS,
|
|
867
880
|
TIMELINE_VIEW_KEY,
|
|
868
881
|
TRANSITION_ENTRIES,
|
|
@@ -928,6 +941,7 @@ export {
|
|
|
928
941
|
createXlsxFormulaSession,
|
|
929
942
|
dataExtensionOf,
|
|
930
943
|
dataLinkHrefOf,
|
|
944
|
+
describeSvgIslandRemovals,
|
|
931
945
|
detectFloatTiers,
|
|
932
946
|
detectLanguageFromFileName,
|
|
933
947
|
documentTitleFromFileName,
|
|
@@ -942,6 +956,7 @@ export {
|
|
|
942
956
|
findMermaidDiagramBlockPos,
|
|
943
957
|
findOwningHeadingPosition,
|
|
944
958
|
findRepairableBlockPos,
|
|
959
|
+
findSvgIslandBlockPos,
|
|
945
960
|
findTimelineBlockPos,
|
|
946
961
|
findTransitionEntry,
|
|
947
962
|
findTreeBlockPos,
|
|
@@ -969,6 +984,8 @@ export {
|
|
|
969
984
|
isMermaidSourceVisible,
|
|
970
985
|
isRepairableFence,
|
|
971
986
|
isSpeechInputProviderFactory,
|
|
987
|
+
isSvgIslandNode,
|
|
988
|
+
isSvgIslandSourceVisible,
|
|
972
989
|
isTimelineSourceSafeForSemanticEdit,
|
|
973
990
|
joinBlockAt,
|
|
974
991
|
lineToOffset,
|
|
@@ -1025,6 +1042,7 @@ export {
|
|
|
1025
1042
|
replaceAsciiFenceText,
|
|
1026
1043
|
replaceCodeSnippetText,
|
|
1027
1044
|
replaceHostFenceText,
|
|
1045
|
+
replaceSvgIslandText,
|
|
1028
1046
|
replaceAsciiFenceText as replaceTreeFenceText,
|
|
1029
1047
|
requestCameraStream,
|
|
1030
1048
|
requestMicStream,
|
|
@@ -1049,6 +1067,7 @@ export {
|
|
|
1049
1067
|
setHeadingLineTransition,
|
|
1050
1068
|
setMediaClipInSource,
|
|
1051
1069
|
shouldPasteAsAsciiFence,
|
|
1070
|
+
shouldPasteAsSvgFence,
|
|
1052
1071
|
shouldPasteAsTimelineFence,
|
|
1053
1072
|
shouldPasteAsTreeFence,
|
|
1054
1073
|
showSlideTimingCheckbox,
|
|
@@ -1068,6 +1087,7 @@ export {
|
|
|
1068
1087
|
toggleAsciiSource,
|
|
1069
1088
|
toggleDirOp,
|
|
1070
1089
|
toggleMermaidSource,
|
|
1090
|
+
toggleSvgIslandSource,
|
|
1071
1091
|
transitionLabel,
|
|
1072
1092
|
translateDiagramOp,
|
|
1073
1093
|
unshownSlidesWarning,
|
package/dist/monaco.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
monacoLanguagesForDocument,
|
|
4
4
|
normalizeMonacoLanguage,
|
|
5
5
|
normalizedMonacoLanguageRequests
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-A2H3JOA5.js";
|
|
7
7
|
|
|
8
8
|
// src/monacoFeatures.ts
|
|
9
9
|
import "monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestMemory.js";
|
package/dist/shell/index.js
CHANGED
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
RawEditor,
|
|
6
6
|
WysiwygEditor,
|
|
7
7
|
useEditorContextMenuItems
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-CLO2AM6J.js";
|
|
9
9
|
import {
|
|
10
10
|
EditorProvider,
|
|
11
11
|
useEditorContext,
|
|
12
12
|
useEditorInsertMenuItems
|
|
13
13
|
} from "../chunk-SKKA3YFF.js";
|
|
14
14
|
import "../chunk-DNEVUOBZ.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-A2H3JOA5.js";
|
|
16
16
|
import "../chunk-KI5XQWRU.js";
|
|
17
17
|
import "../chunk-WMNL2WEI.js";
|
|
18
18
|
import "../chunk-HLU6ZBS7.js";
|
package/dist/styles/index.css
CHANGED
|
@@ -17613,6 +17613,67 @@ button.squisq-view-menu-radio-row:focus-visible {
|
|
|
17613
17613
|
color: var(--squisq-danger-strong);
|
|
17614
17614
|
}
|
|
17615
17615
|
|
|
17616
|
+
/* src/styles/svg-island.css */
|
|
17617
|
+
.squisq-wysiwyg-editor pre.squisq-svg-island-fence-hidden {
|
|
17618
|
+
display: none;
|
|
17619
|
+
}
|
|
17620
|
+
.squisq-svg-island-widget-host {
|
|
17621
|
+
margin: 0.75rem 0 1.25rem;
|
|
17622
|
+
}
|
|
17623
|
+
.squisq-svg-island-preview {
|
|
17624
|
+
padding: 0.5rem 0;
|
|
17625
|
+
}
|
|
17626
|
+
.squisq-svg-island-preview .squisq-md-svg,
|
|
17627
|
+
.squisq-svg-island-preview .squisq-md-svg-error {
|
|
17628
|
+
margin: 0;
|
|
17629
|
+
}
|
|
17630
|
+
.squisq-svg-island-picture > img {
|
|
17631
|
+
display: block;
|
|
17632
|
+
max-width: 100%;
|
|
17633
|
+
height: auto;
|
|
17634
|
+
}
|
|
17635
|
+
.squisq-md-svg-error-note {
|
|
17636
|
+
margin: 0;
|
|
17637
|
+
color: var(--squisq-text-muted);
|
|
17638
|
+
font-size: 0.85em;
|
|
17639
|
+
}
|
|
17640
|
+
.squisq-svg-island-source {
|
|
17641
|
+
box-sizing: border-box;
|
|
17642
|
+
display: flex;
|
|
17643
|
+
margin-top: 0.5rem;
|
|
17644
|
+
overflow: hidden;
|
|
17645
|
+
resize: vertical;
|
|
17646
|
+
border: 1px solid var(--squisq-border);
|
|
17647
|
+
border-radius: 8px;
|
|
17648
|
+
background: var(--squisq-surface);
|
|
17649
|
+
}
|
|
17650
|
+
.squisq-svg-island-removed {
|
|
17651
|
+
margin: 0.4rem 0 0;
|
|
17652
|
+
color: var(--squisq-text-muted);
|
|
17653
|
+
font-size: 0.8rem;
|
|
17654
|
+
}
|
|
17655
|
+
.squisq-svg-island-max {
|
|
17656
|
+
align-items: center;
|
|
17657
|
+
justify-content: center;
|
|
17658
|
+
}
|
|
17659
|
+
.squisq-svg-island-max-picture {
|
|
17660
|
+
display: flex;
|
|
17661
|
+
flex: 1;
|
|
17662
|
+
min-width: 0;
|
|
17663
|
+
min-height: 0;
|
|
17664
|
+
align-items: center;
|
|
17665
|
+
justify-content: center;
|
|
17666
|
+
padding: 2rem;
|
|
17667
|
+
}
|
|
17668
|
+
.squisq-svg-island-max-picture .squisq-md-svg {
|
|
17669
|
+
margin: 0;
|
|
17670
|
+
}
|
|
17671
|
+
.squisq-svg-island-max-picture img {
|
|
17672
|
+
width: min(100%, 1200px);
|
|
17673
|
+
max-height: 80vh;
|
|
17674
|
+
object-fit: contain;
|
|
17675
|
+
}
|
|
17676
|
+
|
|
17616
17677
|
/* src/styles/code-snippet.css */
|
|
17617
17678
|
.squisq-wysiwyg-editor pre.squisq-code-snippet-fence-hidden {
|
|
17618
17679
|
display: none;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/squisq-editor-react",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.4",
|
|
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.12.
|
|
105
|
+
"@bendyline/squisq": "2.12.3",
|
|
106
106
|
"@bendyline/squisq-calc": "2.11.2",
|
|
107
|
-
"@bendyline/squisq-formats": "2.7.
|
|
108
|
-
"@bendyline/squisq-grid-react": "2.11.
|
|
109
|
-
"@bendyline/squisq-react": "2.12.
|
|
110
|
-
"@bendyline/squisq-video-react": "2.5.
|
|
107
|
+
"@bendyline/squisq-formats": "2.7.3",
|
|
108
|
+
"@bendyline/squisq-grid-react": "2.11.26",
|
|
109
|
+
"@bendyline/squisq-react": "2.12.4",
|
|
110
|
+
"@bendyline/squisq-video-react": "2.5.4",
|
|
111
111
|
"@fortawesome/fontawesome-free": "7.3.1",
|
|
112
112
|
"@tiptap/core": "2.27.3",
|
|
113
113
|
"@tiptap/extension-heading": "2.27.3",
|