@bendyline/squisq-editor-react 2.11.0 → 2.11.1
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-FT5F2EGI.js → chunk-4KE4HP3W.js} +464 -126
- package/dist/{chunk-TCLNRATG.js → chunk-A2W4GYPG.js} +48 -2
- package/dist/{chunk-JYPLPGYJ.js → chunk-SK3MQSHQ.js} +1 -1
- package/dist/index.d.ts +16 -3
- package/dist/index.js +3 -3
- package/dist/json-editor/index.js +2 -2
- package/dist/shell/index.d.ts +2 -2
- package/dist/shell/index.js +2 -2
- package/dist/{shell-DInMVUpf.d.ts → shell-CJkHDwpz.d.ts} +14 -2
- package/dist/styles/index.css +59 -7
- package/package.json +6 -6
|
@@ -15,6 +15,8 @@ var RE_LEGACY_ITALIC_STAR = /(?<!\*)\*(?![\s*])(.+?)(?<![\s*])([ \t]+)\*(?=$|[^\
|
|
|
15
15
|
var ESCAPABLE_MD_CHARS = ["*", "_", "~", "\\"];
|
|
16
16
|
var RE_MD_ESCAPE = /\\([*_~\\])/g;
|
|
17
17
|
var RE_INLINE_CODE = /`(.+?)`/g;
|
|
18
|
+
var BACKTICK = "`";
|
|
19
|
+
var FENCE = "```";
|
|
18
20
|
var RE_IMAGE = /!\[(.*?)\]\((.+?)\)/g;
|
|
19
21
|
var RE_MENTION = /@\[([^\]]+?)\]\(([a-z][a-z0-9+.-]*)\\?:([^)\s]+)\)/gi;
|
|
20
22
|
var RE_MENTION_TAG = /<span\b[^>]*?\bdata-mention\b[^>]*?>(?:<[^>]+>)*([^<]*)<\/span>/gi;
|
|
@@ -26,10 +28,50 @@ var RE_VERT_ALIGN_TAG = /<(sup|sub)>((?:(?!<\/?(?:sup|sub)>)[\s\S])*)<\/\1>/gi;
|
|
|
26
28
|
var RE_A_TAG = /<a\b([^>]*)>(.*?)<\/a>/g;
|
|
27
29
|
var RE_IMG_TAG = /<img\b([^>]*)>/g;
|
|
28
30
|
var RE_STRIP_TAGS = /<[^>]+>/g;
|
|
31
|
+
function joinWrappedCodeSpans(lines) {
|
|
32
|
+
if (!lines.some((line) => line.includes(BACKTICK))) return lines;
|
|
33
|
+
const joined = [];
|
|
34
|
+
let inFence = false;
|
|
35
|
+
for (let i = 0; i < lines.length; i++) {
|
|
36
|
+
const line = lines[i];
|
|
37
|
+
if (line.startsWith(FENCE)) {
|
|
38
|
+
inFence = !inFence;
|
|
39
|
+
joined.push(line);
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (inFence || !leavesCodeSpanOpen(line)) {
|
|
43
|
+
joined.push(line);
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
let merged = line;
|
|
47
|
+
let next = i + 1;
|
|
48
|
+
let closed = false;
|
|
49
|
+
while (next < lines.length) {
|
|
50
|
+
const candidate = lines[next];
|
|
51
|
+
if (candidate.trim() === "" || candidate.startsWith(FENCE)) break;
|
|
52
|
+
merged = `${merged} ${candidate.replace(/^[ \t]+/, "")}`;
|
|
53
|
+
next++;
|
|
54
|
+
if (!leavesCodeSpanOpen(merged)) {
|
|
55
|
+
closed = true;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (!closed) {
|
|
60
|
+
joined.push(line);
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
joined.push(merged);
|
|
64
|
+
i = next - 1;
|
|
65
|
+
}
|
|
66
|
+
return joined;
|
|
67
|
+
}
|
|
68
|
+
function leavesCodeSpanOpen(text) {
|
|
69
|
+
return text.replace(RE_INLINE_CODE, "").includes(BACKTICK);
|
|
70
|
+
}
|
|
29
71
|
function markdownToTiptap(markdown) {
|
|
30
72
|
if (!markdown.trim()) return "<p></p>";
|
|
31
73
|
const html = markdown.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
32
|
-
const lines = html.split("\n");
|
|
74
|
+
const lines = joinWrappedCodeSpans(html.split("\n"));
|
|
33
75
|
const frontmatterEnd = findFrontmatterEnd(lines);
|
|
34
76
|
const outputBlocks = [];
|
|
35
77
|
let inCodeBlock = false;
|
|
@@ -403,7 +445,7 @@ function tiptapToMarkdown(html) {
|
|
|
403
445
|
while ((cellExec = cellRegex.exec(rowHtml)) !== null) {
|
|
404
446
|
const tag = cellExec[1];
|
|
405
447
|
const attrs = cellExec[2];
|
|
406
|
-
const content =
|
|
448
|
+
const content = htmlToTableCell(cellExec[3].replace(/<\/?p>/g, ""));
|
|
407
449
|
const alignExec = attrs.match(/text-align:\s*(left|center|right)/);
|
|
408
450
|
cells.push({
|
|
409
451
|
content,
|
|
@@ -789,6 +831,7 @@ function inlineToHtml(text) {
|
|
|
789
831
|
const name = tag.toLowerCase();
|
|
790
832
|
return stash(`<${name}>${inlineToHtml(inner)}</${name}>`);
|
|
791
833
|
});
|
|
834
|
+
staged = staged.replace(/<br\s*\/?>/gi, () => stash("<br>"));
|
|
792
835
|
staged = staged.replace(
|
|
793
836
|
RE_IMAGE,
|
|
794
837
|
(_m, alt, src) => stash(`<img alt="${escapeHtml(alt)}" src="${escapeHtml(src)}">`)
|
|
@@ -1031,6 +1074,9 @@ function htmlToInline(html) {
|
|
|
1031
1074
|
result = vault.restore(result);
|
|
1032
1075
|
return restoreLeadingSpaces(unescapeHtml(result));
|
|
1033
1076
|
}
|
|
1077
|
+
function htmlToTableCell(html) {
|
|
1078
|
+
return htmlToInline(html).replace(/ {2}\n/g, "<br>");
|
|
1079
|
+
}
|
|
1034
1080
|
function preserveLeadingSpaces(html) {
|
|
1035
1081
|
return html.replace(/^ +/, (spaces) => " ".repeat(spaces.length));
|
|
1036
1082
|
}
|
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 CsvSourceMeta, X as XlsxSourceMeta, F as FormulaEditRecord } from './shell-
|
|
2
|
-
export { B as BlockTagVisibility, c as CodeContextSection, d as CoverImageSaveOutput, D as DashboardImageSaveOutput, e as DocumentLinkCandidate, f as DocumentLinkProvider, g as EditorActions, h as EditorColorScheme, i as EditorContextMenuContext, j as EditorContextMenuItem, k as EditorContextMenuItemVisibility, l as EditorContextMenuProvider, m as EditorContextMenuProviderProps, n as EditorContextValue, o as EditorMode, p as EditorProvider, q as EditorProviderProps, r as EditorShell, s as EditorShellProps, t as EditorState, u as EditorView, v as FormulaSessionOptions, I as ImageDisplayMode, w as IngestedSidecar, L as LayoutMode, M as MentionCandidate, x as MentionProvider, P as PreviewPanel, y as PreviewPanelProps, R as RawEditor, z as RawEditorProps, T as ThemeInheritance, V as ViewPreferences, W as WriteCanvasSettings, A as WysiwygEditor, G as WysiwygEditorProps, H as XLSX_LOCKED_REASON, J as XlsxFormulaSession, K as createXlsxFormulaSession, N as ingestSidecarBytes, O as useEditorContext, Q as useEditorContextMenuItems } from './shell-
|
|
1
|
+
import { C as CodeContext, E as EditorHostMode, S as SceneTextChannel, a as CalcEngineFactory, b as CsvSourceMeta, X as XlsxSourceMeta, F as FormulaEditRecord } from './shell-CJkHDwpz.js';
|
|
2
|
+
export { B as BlockTagVisibility, c as CodeContextSection, d as CoverImageSaveOutput, D as DashboardImageSaveOutput, e as DocumentLinkCandidate, f as DocumentLinkProvider, g as EditorActions, h as EditorColorScheme, i as EditorContextMenuContext, j as EditorContextMenuItem, k as EditorContextMenuItemVisibility, l as EditorContextMenuProvider, m as EditorContextMenuProviderProps, n as EditorContextValue, o as EditorMode, p as EditorProvider, q as EditorProviderProps, r as EditorShell, s as EditorShellProps, t as EditorState, u as EditorView, v as FormulaSessionOptions, I as ImageDisplayMode, w as IngestedSidecar, L as LayoutMode, M as MentionCandidate, x as MentionProvider, P as PreviewPanel, y as PreviewPanelProps, R as RawEditor, z as RawEditorProps, T as ThemeInheritance, V as ViewPreferences, W as WriteCanvasSettings, A as WysiwygEditor, G as WysiwygEditorProps, H as XLSX_LOCKED_REASON, J as XlsxFormulaSession, K as createXlsxFormulaSession, N as ingestSidecarBytes, O as useEditorContext, Q as useEditorContextMenuItems } from './shell-CJkHDwpz.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';
|
|
@@ -2587,6 +2587,13 @@ interface CodeSnippetExtensionOptions {
|
|
|
2587
2587
|
* change freely behind the host extension's getter.
|
|
2588
2588
|
*/
|
|
2589
2589
|
reservedLanguages?: readonly string[];
|
|
2590
|
+
/**
|
|
2591
|
+
* Getter for the host clipboard adapter used by each snippet's Copy
|
|
2592
|
+
* button. A getter (not the handler itself) so a host can swap its
|
|
2593
|
+
* clipboard implementation without re-configuring the editor — the
|
|
2594
|
+
* same live-behind-a-getter contract `renderers` uses.
|
|
2595
|
+
*/
|
|
2596
|
+
onCopyCode?: () => CodeBlockCopyHandler | undefined;
|
|
2590
2597
|
}
|
|
2591
2598
|
declare const CODE_SNIPPET_KEY: PluginKey<CodeSnippetPluginState>;
|
|
2592
2599
|
declare function isCodeSnippetNode(node: Node, reserved?: ReadonlySet<string>): boolean;
|
|
@@ -2599,8 +2606,14 @@ interface CodeSnippetWidgetProps {
|
|
|
2599
2606
|
host?: HTMLElement | null;
|
|
2600
2607
|
/** Focus this newly inserted snippet after Monaco has mounted. */
|
|
2601
2608
|
focusOnMount?: boolean;
|
|
2609
|
+
/**
|
|
2610
|
+
* Getter for the host clipboard adapter. Read at click time so a host can
|
|
2611
|
+
* swap its implementation without remounting the widget. When it yields
|
|
2612
|
+
* nothing, the button falls back to `navigator.clipboard`.
|
|
2613
|
+
*/
|
|
2614
|
+
onCopyCode?: () => CodeBlockCopyHandler | undefined;
|
|
2602
2615
|
}
|
|
2603
|
-
declare function CodeSnippetWidget({ editor, blockId, host, focusOnMount, }: CodeSnippetWidgetProps): react_jsx_runtime.JSX.Element | null;
|
|
2616
|
+
declare function CodeSnippetWidget({ editor, blockId, host, focusOnMount, onCopyCode, }: CodeSnippetWidgetProps): react_jsx_runtime.JSX.Element | null;
|
|
2604
2617
|
|
|
2605
2618
|
/** Lossless edits for language-tagged code fences. */
|
|
2606
2619
|
|
package/dist/index.js
CHANGED
|
@@ -229,15 +229,15 @@ import {
|
|
|
229
229
|
useTreeViewData,
|
|
230
230
|
viewStateFromBinding,
|
|
231
231
|
writeHeadingViewState
|
|
232
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-4KE4HP3W.js";
|
|
233
233
|
import "./chunk-V4NBQF5C.js";
|
|
234
234
|
import {
|
|
235
235
|
JsonEditor
|
|
236
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-SK3MQSHQ.js";
|
|
237
237
|
import {
|
|
238
238
|
markdownToTiptap,
|
|
239
239
|
tiptapToMarkdown
|
|
240
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-A2W4GYPG.js";
|
|
241
241
|
import {
|
|
242
242
|
ImageEditor,
|
|
243
243
|
ImageViewer,
|
package/dist/shell/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BlockTagVisibility, e as DocumentLinkCandidate, f as DocumentLinkProvider, g as EditorActions, h as EditorColorScheme, i as EditorContextMenuContext, j as EditorContextMenuItem, k as EditorContextMenuItemVisibility, l as EditorContextMenuProvider, m as EditorContextMenuProviderProps, n as EditorContextValue, E as EditorHostMode, o as EditorMode, p as EditorProvider, q as EditorProviderProps, r as EditorShell, s as EditorShellProps, t as EditorState, u as EditorView, I as ImageDisplayMode, L as LayoutMode, M as MentionCandidate, x as MentionProvider, P as PreviewPanel, y as PreviewPanelProps, R as RawEditor, z as RawEditorProps, T as ThemeInheritance, V as ViewPreferences, A as WysiwygEditor, G as WysiwygEditorProps, O as useEditorContext, Q as useEditorContextMenuItems } from '../shell-
|
|
1
|
+
export { B as BlockTagVisibility, e as DocumentLinkCandidate, f as DocumentLinkProvider, g as EditorActions, h as EditorColorScheme, i as EditorContextMenuContext, j as EditorContextMenuItem, k as EditorContextMenuItemVisibility, l as EditorContextMenuProvider, m as EditorContextMenuProviderProps, n as EditorContextValue, E as EditorHostMode, o as EditorMode, p as EditorProvider, q as EditorProviderProps, r as EditorShell, s as EditorShellProps, t as EditorState, u as EditorView, I as ImageDisplayMode, L as LayoutMode, M as MentionCandidate, x as MentionProvider, P as PreviewPanel, y as PreviewPanelProps, R as RawEditor, z as RawEditorProps, T as ThemeInheritance, V as ViewPreferences, A as WysiwygEditor, G as WysiwygEditorProps, O as useEditorContext, Q as useEditorContextMenuItems } from '../shell-CJkHDwpz.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import '@bendyline/squisq/table';
|
|
4
4
|
import '@bendyline/squisq-calc';
|
|
@@ -7,6 +7,7 @@ import '@bendyline/squisq-formats/xlsx';
|
|
|
7
7
|
import 'react';
|
|
8
8
|
import '@bendyline/squisq/schemas';
|
|
9
9
|
import '@bendyline/squisq/fence';
|
|
10
|
+
import '@bendyline/squisq-react';
|
|
10
11
|
import '@bendyline/squisq/markdown';
|
|
11
12
|
import '@bendyline/squisq/storage';
|
|
12
13
|
import '../types-B_aHRuSc.js';
|
|
@@ -14,4 +15,3 @@ import '@bendyline/squisq/proof';
|
|
|
14
15
|
import '@bendyline/squisq/versions';
|
|
15
16
|
import '@tiptap/core';
|
|
16
17
|
import 'monaco-editor';
|
|
17
|
-
import '@bendyline/squisq-react';
|
package/dist/shell/index.js
CHANGED
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
WysiwygEditor,
|
|
8
8
|
useEditorContext,
|
|
9
9
|
useEditorContextMenuItems
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-4KE4HP3W.js";
|
|
11
11
|
import "../chunk-V4NBQF5C.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-A2W4GYPG.js";
|
|
13
13
|
import "../chunk-V44VP242.js";
|
|
14
14
|
import "../chunk-7RRYZULY.js";
|
|
15
15
|
import "../chunk-GS7QWYFT.js";
|
|
@@ -6,13 +6,13 @@ import { XlsxWorkbookGrids } from '@bendyline/squisq-formats/xlsx';
|
|
|
6
6
|
import { ReactNode, RefObject, ReactElement } from 'react';
|
|
7
7
|
import { Doc, MediaProvider, ViewportPreset, Theme } from '@bendyline/squisq/schemas';
|
|
8
8
|
import { FenceRendererMap } from '@bendyline/squisq/fence';
|
|
9
|
+
import { CodeBlockCopyHandler } from '@bendyline/squisq-react';
|
|
9
10
|
import { MarkdownDocument } from '@bendyline/squisq/markdown';
|
|
10
11
|
import { ContentContainer } from '@bendyline/squisq/storage';
|
|
11
12
|
import { P as ProofingCapability, b as ProofingIgnoreStore } from './types-B_aHRuSc.js';
|
|
12
13
|
import { DocumentVersionManager, SaveVersionOptions, SaveVersionResult, PrunePolicy } from '@bendyline/squisq/versions';
|
|
13
14
|
import { Editor } from '@tiptap/core';
|
|
14
15
|
import { editor } from 'monaco-editor';
|
|
15
|
-
import { CodeBlockCopyHandler } from '@bendyline/squisq-react';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Sidecar bytes → the grid's neutral `IngestTable`, via lazy formats
|
|
@@ -550,6 +550,13 @@ interface EditorContextValue extends EditorState, EditorActions {
|
|
|
550
550
|
* flow into the preview panel's read path. Null disables.
|
|
551
551
|
*/
|
|
552
552
|
fenceRenderers: FenceRendererMap | null;
|
|
553
|
+
/**
|
|
554
|
+
* Host clipboard adapter for code copy affordances. When omitted, the
|
|
555
|
+
* copy button on a Write-view code snippet falls back to
|
|
556
|
+
* `navigator.clipboard.writeText`. Supply this for Electron, native
|
|
557
|
+
* shells, or hosts with their own clipboard permission handling.
|
|
558
|
+
*/
|
|
559
|
+
onCopyCode: CodeBlockCopyHandler | undefined;
|
|
553
560
|
/**
|
|
554
561
|
* File name the host opened this document as (e.g. `Longview Plan.md`), if
|
|
555
562
|
* any. Used as a display-title fallback — for example, the header of a
|
|
@@ -643,6 +650,11 @@ interface EditorProviderProps {
|
|
|
643
650
|
* leave every explicit-language fence to the built-in families.
|
|
644
651
|
*/
|
|
645
652
|
fenceRenderers?: FenceRendererMap | null;
|
|
653
|
+
/**
|
|
654
|
+
* Host clipboard adapter shared by every code copy affordance. Omit to
|
|
655
|
+
* use `navigator.clipboard`.
|
|
656
|
+
*/
|
|
657
|
+
onCopyCode?: CodeBlockCopyHandler;
|
|
646
658
|
/**
|
|
647
659
|
* Extra link schemes this host resolves itself. Threaded into the link
|
|
648
660
|
* dialog's `sanitizeUrl` check so a host-custom protocol is accepted;
|
|
@@ -765,7 +777,7 @@ interface ViewPreferences {
|
|
|
765
777
|
/** Document vs. block-at-a-time layout. */
|
|
766
778
|
layoutMode?: LayoutMode;
|
|
767
779
|
}
|
|
768
|
-
declare function EditorProvider({ initialMarkdown, initialView, articleId, colorScheme: initialColorScheme, workspaceContainer, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, mediaProvider, imageDisplayMode, mentionProvider, proofing, proofingDefaultEnabled, proofingSpellingEnabled, proofingGrammarEnabled, proofingIgnoreStore, documentLinkProvider, fenceRenderers, linkSchemes, allowRecording, allowNarrate, preserveSourceWrapping, fileName, saveCoverImageOutput, saveDashboardImageOutput, language, findMode: controlledFindMode, onFindModeChange, inlinePreview, showStatusBar, outline, blockTags, blockTagVisibility: initialBlockTagVisibility, themeInheritance, layoutMode, viewPreferences, onViewPreferencesChange, children, }: EditorProviderProps): react_jsx_runtime.JSX.Element;
|
|
780
|
+
declare function EditorProvider({ initialMarkdown, initialView, articleId, colorScheme: initialColorScheme, workspaceContainer, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, mediaProvider, imageDisplayMode, mentionProvider, proofing, proofingDefaultEnabled, proofingSpellingEnabled, proofingGrammarEnabled, proofingIgnoreStore, documentLinkProvider, fenceRenderers, onCopyCode, linkSchemes, allowRecording, allowNarrate, preserveSourceWrapping, fileName, saveCoverImageOutput, saveDashboardImageOutput, language, findMode: controlledFindMode, onFindModeChange, inlinePreview, showStatusBar, outline, blockTags, blockTagVisibility: initialBlockTagVisibility, themeInheritance, layoutMode, viewPreferences, onViewPreferencesChange, children, }: EditorProviderProps): react_jsx_runtime.JSX.Element;
|
|
769
781
|
|
|
770
782
|
/**
|
|
771
783
|
* Host-supplied context sections rendered INSIDE the Monaco (raw/code)
|
package/dist/styles/index.css
CHANGED
|
@@ -9278,28 +9278,28 @@
|
|
|
9278
9278
|
}
|
|
9279
9279
|
.squisq-wysiwyg-editor h1 {
|
|
9280
9280
|
font-size: 2em;
|
|
9281
|
-
margin: 0.45em 0 0.4em;
|
|
9281
|
+
margin: calc(0.45em + 4px) 0 calc(0.4em - 2px);
|
|
9282
9282
|
}
|
|
9283
9283
|
.squisq-wysiwyg-editor h2 {
|
|
9284
9284
|
font-size: 1.5em;
|
|
9285
|
-
margin: 0.8em 0 0.25em;
|
|
9285
|
+
margin: calc(0.8em + 4px) 0 0.25em;
|
|
9286
9286
|
}
|
|
9287
9287
|
.squisq-wysiwyg-editor h3 {
|
|
9288
9288
|
font-size: 1.17em;
|
|
9289
9289
|
min-height: 26px;
|
|
9290
|
-
margin: 1.3em 0 0.3em;
|
|
9290
|
+
margin: calc(1.3em + 4px) 0 0.3em;
|
|
9291
9291
|
}
|
|
9292
9292
|
.squisq-wysiwyg-editor h4 {
|
|
9293
9293
|
font-size: 1em;
|
|
9294
|
-
margin: 1.4em 0 0.3em;
|
|
9294
|
+
margin: calc(1.4em + 4px) 0 0.3em;
|
|
9295
9295
|
}
|
|
9296
9296
|
.squisq-wysiwyg-editor h5 {
|
|
9297
9297
|
font-size: 0.83em;
|
|
9298
|
-
margin: 1.5em 0 0.3em;
|
|
9298
|
+
margin: calc(1.5em + 4px) 0 0.3em;
|
|
9299
9299
|
}
|
|
9300
9300
|
.squisq-wysiwyg-editor h6 {
|
|
9301
9301
|
font-size: 0.67em;
|
|
9302
|
-
margin: 1.6em 0 0.3em;
|
|
9302
|
+
margin: calc(1.6em + 4px) 0 0.3em;
|
|
9303
9303
|
}
|
|
9304
9304
|
.squisq-heading-content:has(> br.ProseMirror-trailingBreak:only-child) {
|
|
9305
9305
|
display: inline-block;
|
|
@@ -9311,6 +9311,9 @@
|
|
|
9311
9311
|
margin: 0.625em 0;
|
|
9312
9312
|
line-height: var(--squisq-write-line-spacing, 1.7);
|
|
9313
9313
|
}
|
|
9314
|
+
.squisq-wysiwyg-editor :is(h1, h2, h3, h4, h5, h6) + p {
|
|
9315
|
+
margin-top: calc(0.625em - 2px);
|
|
9316
|
+
}
|
|
9314
9317
|
.squisq-wysiwyg-editor blockquote {
|
|
9315
9318
|
border-left: 3px solid var(--squisq-theme-text-muted, var(--squisq-border));
|
|
9316
9319
|
padding-left: 16px;
|
|
@@ -9402,12 +9405,14 @@
|
|
|
9402
9405
|
border-collapse: collapse;
|
|
9403
9406
|
margin: 1em 0;
|
|
9404
9407
|
width: 100%;
|
|
9408
|
+
table-layout: fixed;
|
|
9405
9409
|
}
|
|
9406
9410
|
.squisq-wysiwyg-editor th,
|
|
9407
9411
|
.squisq-wysiwyg-editor td {
|
|
9408
9412
|
border: 1px solid var(--squisq-border);
|
|
9409
9413
|
padding: 6px 12px;
|
|
9410
9414
|
text-align: left;
|
|
9415
|
+
overflow-wrap: break-word;
|
|
9411
9416
|
}
|
|
9412
9417
|
.squisq-wysiwyg-editor th {
|
|
9413
9418
|
background: var(--squisq-surface-subtle);
|
|
@@ -16280,6 +16285,53 @@
|
|
|
16280
16285
|
color: var(--squisq-text);
|
|
16281
16286
|
font-weight: 600;
|
|
16282
16287
|
}
|
|
16288
|
+
.squisq-code-snippet-copy {
|
|
16289
|
+
display: inline-flex;
|
|
16290
|
+
flex: none;
|
|
16291
|
+
align-items: center;
|
|
16292
|
+
gap: 5px;
|
|
16293
|
+
margin-left: auto;
|
|
16294
|
+
padding: 2px 8px;
|
|
16295
|
+
border: 1px solid transparent;
|
|
16296
|
+
border-radius: 5px;
|
|
16297
|
+
background: transparent;
|
|
16298
|
+
color: var(--squisq-text-muted);
|
|
16299
|
+
font: inherit;
|
|
16300
|
+
line-height: 1.6;
|
|
16301
|
+
cursor: pointer;
|
|
16302
|
+
transition:
|
|
16303
|
+
background 120ms ease,
|
|
16304
|
+
color 120ms ease,
|
|
16305
|
+
opacity 120ms ease;
|
|
16306
|
+
}
|
|
16307
|
+
.squisq-code-snippet-copy[data-copy-state=idle] {
|
|
16308
|
+
opacity: 0;
|
|
16309
|
+
}
|
|
16310
|
+
.squisq-code-snippet-shell:hover .squisq-code-snippet-copy[data-copy-state=idle],
|
|
16311
|
+
.squisq-code-snippet-shell:focus-within .squisq-code-snippet-copy[data-copy-state=idle] {
|
|
16312
|
+
opacity: 1;
|
|
16313
|
+
}
|
|
16314
|
+
@media (hover: none) {
|
|
16315
|
+
.squisq-code-snippet-copy[data-copy-state=idle] {
|
|
16316
|
+
opacity: 1;
|
|
16317
|
+
}
|
|
16318
|
+
}
|
|
16319
|
+
.squisq-code-snippet-copy:hover {
|
|
16320
|
+
border-color: var(--squisq-border);
|
|
16321
|
+
background: var(--squisq-surface-hover);
|
|
16322
|
+
color: var(--squisq-text);
|
|
16323
|
+
}
|
|
16324
|
+
.squisq-code-snippet-copy:focus-visible {
|
|
16325
|
+
opacity: 1;
|
|
16326
|
+
outline: 2px solid var(--squisq-accent);
|
|
16327
|
+
outline-offset: 1px;
|
|
16328
|
+
}
|
|
16329
|
+
.squisq-code-snippet-copy[data-copy-state=copied] {
|
|
16330
|
+
color: var(--squisq-success);
|
|
16331
|
+
}
|
|
16332
|
+
.squisq-code-snippet-copy[data-copy-state=failed] {
|
|
16333
|
+
color: var(--squisq-danger-strong);
|
|
16334
|
+
}
|
|
16283
16335
|
.squisq-code-snippet-editor {
|
|
16284
16336
|
position: relative;
|
|
16285
16337
|
min-height: 0;
|
|
@@ -17950,7 +18002,7 @@ button.squisq-ascii-timeline-track-name:focus-visible {
|
|
|
17950
18002
|
}
|
|
17951
18003
|
.squisq-scene-dot {
|
|
17952
18004
|
fill: var(--squisq-text-muted);
|
|
17953
|
-
fill-opacity: 0.
|
|
18005
|
+
fill-opacity: 0.22;
|
|
17954
18006
|
}
|
|
17955
18007
|
.squisq-scene-selection-outline {
|
|
17956
18008
|
fill: none;
|
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.1",
|
|
4
4
|
"description": "React editor shell with raw/WYSIWYG/preview modes for Squisq documents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -94,12 +94,12 @@
|
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@bendyline/squisq": "2.11.
|
|
97
|
+
"@bendyline/squisq": "2.11.1",
|
|
98
98
|
"@bendyline/squisq-calc": "2.11.0",
|
|
99
|
-
"@bendyline/squisq-formats": "2.6.
|
|
100
|
-
"@bendyline/squisq-grid-react": "2.11.
|
|
101
|
-
"@bendyline/squisq-react": "2.11.
|
|
102
|
-
"@bendyline/squisq-video-react": "2.4.
|
|
99
|
+
"@bendyline/squisq-formats": "2.6.1",
|
|
100
|
+
"@bendyline/squisq-grid-react": "2.11.2",
|
|
101
|
+
"@bendyline/squisq-react": "2.11.1",
|
|
102
|
+
"@bendyline/squisq-video-react": "2.4.5",
|
|
103
103
|
"@fortawesome/fontawesome-free": "7.2.0",
|
|
104
104
|
"@tiptap/core": "2.27.2",
|
|
105
105
|
"@tiptap/extension-heading": "2.27.2",
|