@bendyline/squisq-editor-react 2.11.12 → 2.11.14

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  markdownToTiptap
3
- } from "./chunk-MFE325P4.js";
3
+ } from "./chunk-EN5BYZOE.js";
4
4
 
5
5
  // src/blockRange.ts
6
6
  import { parseMarkdown } from "@bendyline/squisq/markdown";
@@ -62,6 +62,7 @@ function escapeLinkLabel(text) {
62
62
  }
63
63
 
64
64
  // src/tiptapBridge.ts
65
+ var MARKDOWN_ESCAPE_ATTR = "data-md-escape";
65
66
  var RE_BOLD_STAR = /\*\*(?![\s*])(.+?)(?<![\s*])\*\*/g;
66
67
  var RE_BOLD_UNDER = /(?<![\p{L}\p{N}_])__(?![\s_])(.+?)(?<![\s_])__(?![\p{L}\p{N}_])/gu;
67
68
  var RE_ITALIC_STAR = /\*(?![\s*])(.+?)(?<![\s*])\*/g;
@@ -71,6 +72,13 @@ var RE_LEGACY_BOLD_STAR = /\*\*(?![\s*])((?:(?!\*\*).)+?)(?<![\s*])([ \t]+)\*\*(
71
72
  var RE_LEGACY_ITALIC_STAR = /(?<!\*)\*(?![\s*])([^*]+?)(?<![\s*])([ \t]+)\*(?=$|[^\s*])/g;
72
73
  var ESCAPABLE_MD_CHARS = ["*", "_", "~", "\\"];
73
74
  var RE_MD_ESCAPE = /\\([*_~\\])/g;
75
+ var RE_BACKSLASH_PAIR = /\\([\s\S])/g;
76
+ var RE_MARK_ESCAPABLE = /[!"#$%&'()+,\-./:;<=>?@[\]^`{|}]/;
77
+ var RE_ASCII_PUNCTUATION = /[!-/:-@[-`{-~]/;
78
+ var RE_ESCAPE_SPAN = new RegExp(
79
+ `<span\\b[^>]*\\b${MARKDOWN_ESCAPE_ATTR}\\b[^>]*>([\\s\\S]*?)<\\/span>`,
80
+ "gi"
81
+ );
74
82
  var RE_INLINE_CODE = /`(.+?)`/g;
75
83
  var BACKTICK = "`";
76
84
  var FENCE = "```";
@@ -333,15 +341,15 @@ function markdownToTiptap(markdown) {
333
341
  pushBlock("<hr>");
334
342
  continue;
335
343
  }
336
- if (line.startsWith("> ")) {
344
+ if (isQuoteLine(line)) {
337
345
  flushList();
338
- const quoteLines = [line.slice(2)];
339
- while (i + 1 < lines.length && lines[i + 1].startsWith("> ")) {
346
+ const quoteLines = [quoteLineContent(line)];
347
+ while (i + 1 < lines.length && isQuoteLine(lines[i + 1])) {
340
348
  i++;
341
- quoteLines.push(lines[i].slice(2));
349
+ quoteLines.push(quoteLineContent(lines[i]));
342
350
  }
343
351
  pushBlock(
344
- `<blockquote>${quoteLines.map((quoteLine) => `<p>${inlineToHtml(quoteLine)}</p>`).join("")}</blockquote>`
352
+ `<blockquote>${quoteLines.map((quoteLine) => quoteLine ? `<p>${inlineToHtml(quoteLine)}</p>` : "<p></p>").join("")}</blockquote>`
345
353
  );
346
354
  continue;
347
355
  }
@@ -408,7 +416,17 @@ function markdownToTiptap(markdown) {
408
416
  continue;
409
417
  }
410
418
  flushList();
411
- pushBlock(`<p>${inlineToHtml(line)}</p>`);
419
+ const paragraphLines = [line];
420
+ while (i + 1 < lines.length && stripHardBreak(paragraphLines[paragraphLines.length - 1]) !== null && continuesParagraph(lines[i + 1])) {
421
+ i++;
422
+ paragraphLines.push(lines[i]);
423
+ }
424
+ const paragraphHtml = paragraphLines.map(
425
+ (paragraphLine, index) => inlineToHtml(
426
+ index < paragraphLines.length - 1 ? stripHardBreak(paragraphLine) ?? paragraphLine : paragraphLine
427
+ )
428
+ ).join("<br>");
429
+ pushBlock(`<p>${paragraphHtml}</p>`);
412
430
  }
413
431
  if (inCodeBlock) {
414
432
  const langAttr = codeBlockLang ? ` class="language-${escapeHtml(codeBlockLang)}"` : "";
@@ -470,7 +488,12 @@ function tiptapToMarkdown(html) {
470
488
  if (bqMatch) {
471
489
  const paragraphs = bqMatch[1].split(/<\/p>\s*<p[^>]*>/i).map((paragraph) => paragraph.replace(/^<p[^>]*>/i, "").replace(/<\/p>\s*$/i, ""));
472
490
  for (const paragraph of paragraphs) {
473
- for (const quoteLine of htmlToInline(paragraph).split("\n")) {
491
+ const inline = htmlToInline(paragraph);
492
+ if (!inline.trim()) {
493
+ lines.push(">");
494
+ continue;
495
+ }
496
+ for (const quoteLine of inline.split("\n")) {
474
497
  lines.push("> " + quoteLine);
475
498
  }
476
499
  }
@@ -552,7 +575,7 @@ function tiptapToMarkdown(html) {
552
575
  }
553
576
  const pMatch = remaining.match(/^<p>(.*?)<\/p>/s);
554
577
  if (pMatch) {
555
- const text = htmlToInline(pMatch[1]);
578
+ const text = htmlToInline(pMatch[1]).replace(/^(#{1,6})(?=\s|$)/gm, "\\$1");
556
579
  if (text.trim()) {
557
580
  lines.push(text);
558
581
  lines.push("");
@@ -751,6 +774,23 @@ function isIndentedCodeLine(line) {
751
774
  function stripCodeIndent(line) {
752
775
  return line.startsWith(" ") ? line.slice(1) : line.slice(4);
753
776
  }
777
+ function isQuoteLine(line) {
778
+ return line.startsWith("> ") || line.trimEnd() === ">";
779
+ }
780
+ function quoteLineContent(line) {
781
+ return line.trimEnd() === ">" ? "" : line.slice(2);
782
+ }
783
+ function stripHardBreak(line) {
784
+ if (/\S {2,}$/.test(line)) return line.replace(/ {2,}$/, "");
785
+ if (line.endsWith("\\") && isEscapedMarkdownCharacter(`${line}x`, line.length)) {
786
+ return line.slice(0, -1);
787
+ }
788
+ return null;
789
+ }
790
+ var RE_BLOCK_START = /^ {0,3}(?:#{1,6}(?:\s|$)|>|[-*+]\s|\d+[.)]\s|```|~~~|\||<(?:img|video|audio)\b|(?:-{3,}|\*{3,}|_{3,}|={3,})\s*$)/;
791
+ function continuesParagraph(line) {
792
+ return line.trim() !== "" && !RE_BLOCK_START.test(line);
793
+ }
754
794
  function headingToHtml(level, rawText) {
755
795
  let text = rawText;
756
796
  let attrs = "";
@@ -920,6 +960,12 @@ function inlineToHtml(text) {
920
960
  const titleAttr = title === null ? "" : ` title="${escapeHtml(title)}"`;
921
961
  return stash(`<a href="${escapeHtml(url)}"${titleAttr}>${inlineToHtml(linkText)}</a>`);
922
962
  });
963
+ const escapes = [];
964
+ staged = staged.replace(RE_BACKSLASH_PAIR, (pair, ch) => {
965
+ if (!RE_MARK_ESCAPABLE.test(ch)) return pair;
966
+ escapes.push(`<span ${MARKDOWN_ESCAPE_ATTR}="">${escapeHtml(ch)}</span>`);
967
+ return `\0ME${escapes.length - 1}\0`;
968
+ });
923
969
  let result = escapeHtml(staged);
924
970
  result = result.replace(
925
971
  RE_MD_ESCAPE,
@@ -938,6 +984,9 @@ function inlineToHtml(text) {
938
984
  for (let index = placeholders.length - 1; index >= 0; index--) {
939
985
  result = result.split(`\0PH${index}\0`).join(placeholders[index] ?? "");
940
986
  }
987
+ for (let index = escapes.length - 1; index >= 0; index--) {
988
+ result = result.split(`\0ME${index}\0`).join(escapes[index] ?? "");
989
+ }
941
990
  return preserveLeadingSpaces(result);
942
991
  }
943
992
  function replaceMarkdownLinks(text, replace) {
@@ -1041,7 +1090,7 @@ function escapeMarkdownRun(text) {
1041
1090
  const prev = text[i - 1];
1042
1091
  const next = text[i + 1];
1043
1092
  if (ch === "\\") {
1044
- out += ESCAPABLE_MD_CHARS.includes(next ?? "") ? "\\\\" : "\\";
1093
+ out += next === void 0 || next === "\0" || RE_ASCII_PUNCTUATION.test(next) ? "\\\\" : "\\";
1045
1094
  continue;
1046
1095
  }
1047
1096
  if (ch === "~") {
@@ -1109,6 +1158,15 @@ var RawHtmlVault = class {
1109
1158
  function htmlToInline(html) {
1110
1159
  let result = html;
1111
1160
  const vault = new RawHtmlVault();
1161
+ result = result.replace(
1162
+ RE_ESCAPE_SPAN,
1163
+ (_span, inner) => inner.replace(
1164
+ /(<[^>]+>)|([^<]+)/g,
1165
+ (_segment, tag, text) => tag !== void 0 ? tag : [...unescapeHtml(text ?? "")].map(
1166
+ (ch) => RE_ASCII_PUNCTUATION.test(ch) ? vault.protect(escapeHtml(`\\${ch}`)) : escapeHtml(ch)
1167
+ ).join("")
1168
+ )
1169
+ );
1112
1170
  result = result.replace(/<br\s*\/?>/gi, " \n");
1113
1171
  result = escapeMarkdownTextNodes(result);
1114
1172
  result = result.replace(RE_ICON_TAG, (_m, token) => `{[${token}]}`);
@@ -1157,6 +1215,7 @@ export {
1157
1215
  mediaEditNodeAttributes,
1158
1216
  formatLinkDestination,
1159
1217
  escapeLinkLabel,
1218
+ MARKDOWN_ESCAPE_ATTR,
1160
1219
  markdownToTiptap,
1161
1220
  tiptapToMarkdown
1162
1221
  };
@@ -13,19 +13,22 @@ import {
13
13
  stripFrontmatter,
14
14
  useEditorContext,
15
15
  useEditorContextOptional
16
- } from "./chunk-AKWS5KEQ.js";
16
+ } from "./chunk-DNB32SU2.js";
17
17
  import {
18
18
  monacoLanguageRequestKey,
19
19
  monacoLanguagesForDocument,
20
20
  normalizeMonacoLanguage
21
21
  } from "./chunk-V4NBQF5C.js";
22
+ import {
23
+ MarkdownEscape
24
+ } from "./chunk-ZDWZRVAY.js";
22
25
  import {
23
26
  escapeLinkLabel,
24
27
  formatLinkDestination,
25
28
  markdownToTiptap,
26
29
  mediaEditNodeAttributes,
27
30
  tiptapToMarkdown
28
- } from "./chunk-MFE325P4.js";
31
+ } from "./chunk-EN5BYZOE.js";
29
32
  import {
30
33
  ImageEditor,
31
34
  ImageViewer,
@@ -12491,7 +12494,7 @@ function buildSceneTextExtensions(level) {
12491
12494
  codeBlock: false,
12492
12495
  horizontalRule: false
12493
12496
  }) : level === "block" ? StarterKit.configure({ heading: false, horizontalRule: false }) : StarterKit.configure({ horizontalRule: false });
12494
- return [starter, Link.configure({ openOnClick: false })];
12497
+ return [starter, Link.configure({ openOnClick: false }), MarkdownEscape];
12495
12498
  }
12496
12499
 
12497
12500
  // src/scene/text/SceneTextOverlay.tsx
@@ -32187,6 +32190,12 @@ function WysiwygEditor({
32187
32190
  submitOnEnterRef.current = submitOnEnter;
32188
32191
  }, [submitOnEnter]);
32189
32192
  const editor = useEditor2({
32193
+ // Nothing this component renders reads editor state; the toolbar, outline
32194
+ // and context subscribe to editor events themselves. Re-rendering on every
32195
+ // transaction also re-applied the freshly built options (setOptions +
32196
+ // updateState) after each one, and a host that sent a message hit React's
32197
+ // maximum update depth inside that per-transaction subscriber.
32198
+ shouldRerenderOnTransaction: false,
32190
32199
  editable: !readOnly,
32191
32200
  extensions: [
32192
32201
  StarterKit2.configure({
@@ -32199,6 +32208,7 @@ function WysiwygEditor({
32199
32208
  HeadingWithTemplate.configure({ levels: [1, 2, 3, 4, 5, 6] }),
32200
32209
  Superscript,
32201
32210
  Subscript,
32211
+ MarkdownEscape,
32202
32212
  BlockTagActivityExtension,
32203
32213
  AsciiDiagramExtension.configure({ textChannel: sceneTextChannel }),
32204
32214
  MermaidDiagramExtension.configure({ themeStore: mermaidThemeStore }),
@@ -1,7 +1,10 @@
1
+ import {
2
+ MarkdownEscape
3
+ } from "./chunk-ZDWZRVAY.js";
1
4
  import {
2
5
  markdownToTiptap,
3
6
  tiptapToMarkdown
4
- } from "./chunk-MFE325P4.js";
7
+ } from "./chunk-EN5BYZOE.js";
5
8
 
6
9
  // src/jsonEditor/JsonEditorContext.tsx
7
10
  import { createContext, useContext, useEffect, useMemo } from "react";
@@ -78,6 +81,8 @@ function EmbeddedRichTextField(props) {
78
81
  const isExternalUpdate = useRef(false);
79
82
  const lastValueRef = useRef(value);
80
83
  const editor = useEditor({
84
+ // The render reads no editor state; see WysiwygEditor.
85
+ shouldRerenderOnTransaction: false,
81
86
  editable: !readOnly,
82
87
  extensions: [
83
88
  StarterKit.configure({
@@ -89,7 +94,8 @@ function EmbeddedRichTextField(props) {
89
94
  TableHeader,
90
95
  TaskList,
91
96
  TaskItem.configure({ nested: true }),
92
- Placeholder.configure({ placeholder: placeholder ?? "" })
97
+ Placeholder.configure({ placeholder: placeholder ?? "" }),
98
+ MarkdownEscape
93
99
  ],
94
100
  content: markdownToTiptap(value),
95
101
  onUpdate: ({ editor: ed }) => {
@@ -0,0 +1,20 @@
1
+ import {
2
+ MARKDOWN_ESCAPE_ATTR
3
+ } from "./chunk-EN5BYZOE.js";
4
+
5
+ // src/MarkdownEscape.ts
6
+ import { Mark, mergeAttributes } from "@tiptap/core";
7
+ var MarkdownEscape = Mark.create({
8
+ name: "markdownEscape",
9
+ inclusive: false,
10
+ parseHTML() {
11
+ return [{ tag: `span[${MARKDOWN_ESCAPE_ATTR}]` }];
12
+ },
13
+ renderHTML({ HTMLAttributes }) {
14
+ return ["span", mergeAttributes(HTMLAttributes, { [MARKDOWN_ESCAPE_ATTR]: "" }), 0];
15
+ }
16
+ });
17
+
18
+ export {
19
+ MarkdownEscape
20
+ };
package/dist/index.d.ts CHANGED
@@ -1590,18 +1590,6 @@ interface DiagramData {
1590
1590
  warnings: string[];
1591
1591
  }
1592
1592
 
1593
- /**
1594
- * Tiptap Bridge
1595
- *
1596
- * Conversion utilities between raw markdown source and Tiptap's JSON/HTML
1597
- * content format. Uses a lightweight HTML-based approach: we convert markdown
1598
- * to a simple HTML representation that Tiptap can consume, and parse
1599
- * Tiptap's HTML output back to markdown.
1600
- *
1601
- * This bridge preserves markdown semantics much better than going through
1602
- * Tiptap's native markdown extension, since we control the conversion
1603
- * using squisq's own parser.
1604
- */
1605
1593
  /**
1606
1594
  * Convert raw markdown source to Tiptap-consumable HTML content.
1607
1595
  * Uses a simple markdown-to-HTML conversion that maps cleanly to
@@ -1665,6 +1653,27 @@ declare module '@tiptap/core' {
1665
1653
  declare const Superscript: Mark<any, any>;
1666
1654
  declare const Subscript: Mark<any, any>;
1667
1655
 
1656
+ /**
1657
+ * MarkdownEscape — Tiptap Mark Extension
1658
+ *
1659
+ * A backslash escape (`\$`, `\#`, `\[`) is source syntax: the reader of the
1660
+ * rendered document sees only the character. The Write view used to show the
1661
+ * backslash too, so a quote converted from Word read `\$3.50` and a hashtag
1662
+ * line read `\#RiseAndCrumb`, and anyone who copied the text carried the
1663
+ * backslashes along.
1664
+ *
1665
+ * Dropping the backslash on the way in is not safe on its own. `\$3.50 and
1666
+ * \$4.00` escapes the dollars precisely because `$3.50 and $4.00` parses as
1667
+ * inline math, and the Write view has no math node to keep the two apart. So
1668
+ * the bridge marks each escaped character with this invisible mark instead,
1669
+ * and writes the backslash back in front of it (see `tiptapBridge.ts`). The
1670
+ * person sees `$3.50`; the file keeps `\$3.50`, byte for byte.
1671
+ *
1672
+ * `inclusive: false` keeps text typed right after an escaped character plain.
1673
+ */
1674
+
1675
+ declare const MarkdownEscape: Mark<any, any>;
1676
+
1668
1677
  type DiagramCommand = {
1669
1678
  kind: 'moveNode';
1670
1679
  nodeId: string;
@@ -3341,4 +3350,4 @@ declare function unshownSlidesWarning(total: number, unshown: number): string |
3341
3350
  /** The exact label of the review-state block-timings checkbox. */
3342
3351
  declare const SLIDE_TIMING_CHECKBOX_LABEL = "Update block timings when I save this narration";
3343
3352
 
3344
- 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, 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, 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, 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, VersionHistoryPanel, ViewMenuPanel, ViewSwitcher, type ViewSwitcherProps, type WrapPolicyIngest, XlsxSourceMeta, adaptThemeToSurface, addEdgeOp, addItemOp, addNodeOp, addTimelineEventOp, applyAsciiDiagramCommand, applyRepairCommand, applyTimelineCommand, applyTreeCommand, asciiDiagramToCanvas, buildRecorderSlideDeck, clampSlideIndex, classifyFile, codeSnippetFenceLanguageToken, codeSnippetLanguageLabel, codeSnippetMarkdown, containFenceWidgetEvents, dataExtensionOf, dataLinkHrefOf, detectLanguageFromFileName, draftPatchFromImportedTheme, findAsciiDiagramBlockPos, findCodeSnippetBlockPos, findDataCardBlockPos, findHostFenceBlockPos, findMermaidDiagramBlockPos, findOwningHeadingPosition, findRepairableBlockPos, findTimelineBlockPos, findTransitionEntry, findTreeBlockPos, formatSeconds, getTimelineForNode, indentItemOp, ingestForWrite, 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, 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, useTimelineData, useTreeViewData, viewStateFromBinding, writeHeadingViewState };
3353
+ 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, 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, 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, VersionHistoryPanel, ViewMenuPanel, ViewSwitcher, type ViewSwitcherProps, type WrapPolicyIngest, XlsxSourceMeta, adaptThemeToSurface, addEdgeOp, addItemOp, addNodeOp, addTimelineEventOp, applyAsciiDiagramCommand, applyRepairCommand, applyTimelineCommand, applyTreeCommand, asciiDiagramToCanvas, buildRecorderSlideDeck, clampSlideIndex, classifyFile, codeSnippetFenceLanguageToken, codeSnippetLanguageLabel, codeSnippetMarkdown, containFenceWidgetEvents, dataExtensionOf, dataLinkHrefOf, detectLanguageFromFileName, draftPatchFromImportedTheme, findAsciiDiagramBlockPos, findCodeSnippetBlockPos, findDataCardBlockPos, findHostFenceBlockPos, findMermaidDiagramBlockPos, findOwningHeadingPosition, findRepairableBlockPos, findTimelineBlockPos, findTransitionEntry, findTreeBlockPos, formatSeconds, getTimelineForNode, indentItemOp, ingestForWrite, 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, 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, useTimelineData, useTreeViewData, viewStateFromBinding, writeHeadingViewState };
package/dist/index.js CHANGED
@@ -219,7 +219,7 @@ import {
219
219
  useTreeViewData,
220
220
  viewStateFromBinding,
221
221
  writeHeadingViewState
222
- } from "./chunk-5ZA7YMCP.js";
222
+ } from "./chunk-QY2ZFRJE.js";
223
223
  import {
224
224
  EditorProvider,
225
225
  detectLanguageFromFileName,
@@ -231,15 +231,18 @@ import {
231
231
  spliceBlock,
232
232
  useBlockNavigator,
233
233
  useEditorContext
234
- } from "./chunk-AKWS5KEQ.js";
234
+ } from "./chunk-DNB32SU2.js";
235
235
  import "./chunk-V4NBQF5C.js";
236
236
  import {
237
237
  JsonEditor
238
- } from "./chunk-E5QXSFW3.js";
238
+ } from "./chunk-WDQFWD7Z.js";
239
+ import {
240
+ MarkdownEscape
241
+ } from "./chunk-ZDWZRVAY.js";
239
242
  import {
240
243
  markdownToTiptap,
241
244
  tiptapToMarkdown
242
- } from "./chunk-MFE325P4.js";
245
+ } from "./chunk-EN5BYZOE.js";
243
246
  import {
244
247
  ImageEditor,
245
248
  ImageViewer,
@@ -788,6 +791,7 @@ export {
788
791
  MERMAID_DIAGRAM_KEY,
789
792
  MERMAID_DIAGRAM_TYPES,
790
793
  MERMAID_FLOWCHART_SHAPES,
794
+ MarkdownEscape,
791
795
  MediaBin,
792
796
  MermaidDiagramCanvas,
793
797
  MermaidDiagramExtension,
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  JsonEditor
3
- } from "../chunk-E5QXSFW3.js";
4
- import "../chunk-MFE325P4.js";
3
+ } from "../chunk-WDQFWD7Z.js";
4
+ import "../chunk-ZDWZRVAY.js";
5
+ import "../chunk-EN5BYZOE.js";
5
6
  export {
6
7
  JsonEditor
7
8
  };
@@ -19,8 +19,8 @@ import {
19
19
  updateReviewDecorations,
20
20
  useReview,
21
21
  useReviewState
22
- } from "../chunk-AKWS5KEQ.js";
23
- import "../chunk-MFE325P4.js";
22
+ } from "../chunk-DNB32SU2.js";
23
+ import "../chunk-EN5BYZOE.js";
24
24
 
25
25
  // src/review/proofingAdapter.ts
26
26
  import {
@@ -5,13 +5,14 @@ import {
5
5
  RawEditor,
6
6
  WysiwygEditor,
7
7
  useEditorContextMenuItems
8
- } from "../chunk-5ZA7YMCP.js";
8
+ } from "../chunk-QY2ZFRJE.js";
9
9
  import {
10
10
  EditorProvider,
11
11
  useEditorContext
12
- } from "../chunk-AKWS5KEQ.js";
12
+ } from "../chunk-DNB32SU2.js";
13
13
  import "../chunk-V4NBQF5C.js";
14
- import "../chunk-MFE325P4.js";
14
+ import "../chunk-ZDWZRVAY.js";
15
+ import "../chunk-EN5BYZOE.js";
15
16
  import "../chunk-V44VP242.js";
16
17
  import "../chunk-BJ3TXAIQ.js";
17
18
  import "../chunk-GS7QWYFT.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/squisq-editor-react",
3
- "version": "2.11.12",
3
+ "version": "2.11.14",
4
4
  "description": "React editor shell with raw/WYSIWYG/preview modes for Squisq documents",
5
5
  "license": "MIT",
6
6
  "author": "Bendyline",
@@ -98,12 +98,12 @@
98
98
  }
99
99
  },
100
100
  "dependencies": {
101
- "@bendyline/squisq": "2.11.9",
101
+ "@bendyline/squisq": "2.11.11",
102
102
  "@bendyline/squisq-calc": "2.11.0",
103
- "@bendyline/squisq-formats": "2.6.9",
104
- "@bendyline/squisq-grid-react": "2.11.10",
105
- "@bendyline/squisq-react": "2.11.11",
106
- "@bendyline/squisq-video-react": "2.4.15",
103
+ "@bendyline/squisq-formats": "2.6.11",
104
+ "@bendyline/squisq-grid-react": "2.11.12",
105
+ "@bendyline/squisq-react": "2.11.13",
106
+ "@bendyline/squisq-video-react": "2.4.17",
107
107
  "@fortawesome/fontawesome-free": "7.2.0",
108
108
  "@tiptap/core": "2.27.3",
109
109
  "@tiptap/extension-heading": "2.27.3",