@bendyline/squisq-editor-react 2.12.7 → 2.12.9
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-LRUBYTKW.js → chunk-6KS5IDN3.js} +1 -1
- package/dist/{chunk-MHG4KPMA.js → chunk-G4INWIOX.js} +40 -4
- package/dist/{chunk-ZA6VWQUQ.js → chunk-RWNS7R5S.js} +2 -2
- package/dist/{chunk-W63WEDBC.js → chunk-T7HO6JUS.js} +3478 -2838
- package/dist/{chunk-XF2YCVZM.js → chunk-VYHPGIXU.js} +38 -4
- package/dist/index.d.ts +7 -5
- package/dist/index.js +5 -5
- package/dist/json-editor/index.js +3 -3
- package/dist/monaco.js +13 -11
- package/dist/review/index.js +2 -2
- package/dist/shell/index.d.ts +2 -2
- package/dist/shell/index.js +4 -4
- package/dist/{shell-DXhttvsO.d.ts → shell-D0XgDAZj.d.ts} +8 -3
- package/dist/styles/index.css +80 -13
- package/package.json +6 -6
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
markdownToTiptap,
|
|
7
7
|
tiptapToMarkdown
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-G4INWIOX.js";
|
|
9
9
|
|
|
10
10
|
// src/InsertMenuItems.tsx
|
|
11
11
|
import { createContext, useContext, useEffect, useMemo, useRef } from "react";
|
|
@@ -492,7 +492,11 @@ import {
|
|
|
492
492
|
useRef as useRef3,
|
|
493
493
|
useEffect as useEffect3
|
|
494
494
|
} from "react";
|
|
495
|
-
import {
|
|
495
|
+
import {
|
|
496
|
+
parseMarkdown as parseMarkdown3,
|
|
497
|
+
stringifyMarkdown,
|
|
498
|
+
resolveWikiLinks
|
|
499
|
+
} from "@bendyline/squisq/markdown";
|
|
496
500
|
import { markdownToDoc } from "@bendyline/squisq/doc";
|
|
497
501
|
|
|
498
502
|
// src/speech/useDictationController.ts
|
|
@@ -1512,6 +1516,7 @@ function EditorProvider({
|
|
|
1512
1516
|
proofingIgnoreStore = null,
|
|
1513
1517
|
speechInput = null,
|
|
1514
1518
|
documentLinkProvider = null,
|
|
1519
|
+
wikiLinks = null,
|
|
1515
1520
|
fenceRenderers = null,
|
|
1516
1521
|
onCopyCode,
|
|
1517
1522
|
linkSchemes,
|
|
@@ -1827,6 +1832,33 @@ function EditorProvider({
|
|
|
1827
1832
|
setIsParsing(false);
|
|
1828
1833
|
}
|
|
1829
1834
|
}, []);
|
|
1835
|
+
const [wikiProjection, setWikiProjection] = useState3(null);
|
|
1836
|
+
const presentationDoc = wikiProjection?.source === markdownDoc && wikiProjection?.support === wikiLinks ? wikiProjection.doc : doc;
|
|
1837
|
+
useEffect3(() => {
|
|
1838
|
+
if (!markdownDoc || !wikiLinks) return;
|
|
1839
|
+
let cancelled = false;
|
|
1840
|
+
void resolveWikiLinks(
|
|
1841
|
+
markdownDoc,
|
|
1842
|
+
(target) => wikiLinks.resolve ? wikiLinks.resolve(target) : wikiLinks.exists(target)
|
|
1843
|
+
).then(
|
|
1844
|
+
(resolved) => {
|
|
1845
|
+
if (!cancelled && resolved !== markdownDoc)
|
|
1846
|
+
setWikiProjection({
|
|
1847
|
+
source: markdownDoc,
|
|
1848
|
+
support: wikiLinks,
|
|
1849
|
+
doc: markdownToDoc(resolved, {
|
|
1850
|
+
articleId: articleIdRef.current,
|
|
1851
|
+
fileName: fileNameRef.current
|
|
1852
|
+
})
|
|
1853
|
+
});
|
|
1854
|
+
},
|
|
1855
|
+
() => {
|
|
1856
|
+
}
|
|
1857
|
+
);
|
|
1858
|
+
return () => {
|
|
1859
|
+
cancelled = true;
|
|
1860
|
+
};
|
|
1861
|
+
}, [markdownDoc, wikiLinks]);
|
|
1830
1862
|
useEffect3(() => {
|
|
1831
1863
|
if (editorMode !== "markdown") return;
|
|
1832
1864
|
if (skipInitialDebouncedParseRef.current) {
|
|
@@ -2181,7 +2213,7 @@ function EditorProvider({
|
|
|
2181
2213
|
() => ({
|
|
2182
2214
|
markdownSource,
|
|
2183
2215
|
markdownDoc,
|
|
2184
|
-
doc,
|
|
2216
|
+
doc: presentationDoc,
|
|
2185
2217
|
activeView,
|
|
2186
2218
|
parseError,
|
|
2187
2219
|
isParsing,
|
|
@@ -2228,6 +2260,7 @@ function EditorProvider({
|
|
|
2228
2260
|
dictation,
|
|
2229
2261
|
articleId,
|
|
2230
2262
|
documentLinkProvider,
|
|
2263
|
+
wikiLinks,
|
|
2231
2264
|
fenceRenderers,
|
|
2232
2265
|
onCopyCode,
|
|
2233
2266
|
linkSchemes,
|
|
@@ -2270,7 +2303,7 @@ function EditorProvider({
|
|
|
2270
2303
|
[
|
|
2271
2304
|
markdownSource,
|
|
2272
2305
|
markdownDoc,
|
|
2273
|
-
|
|
2306
|
+
presentationDoc,
|
|
2274
2307
|
activeView,
|
|
2275
2308
|
parseError,
|
|
2276
2309
|
isParsing,
|
|
@@ -2311,6 +2344,7 @@ function EditorProvider({
|
|
|
2311
2344
|
dictation,
|
|
2312
2345
|
articleId,
|
|
2313
2346
|
documentLinkProvider,
|
|
2347
|
+
wikiLinks,
|
|
2314
2348
|
fenceRenderers,
|
|
2315
2349
|
onCopyCode,
|
|
2316
2350
|
linkSchemes,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
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 FindOptions, J as FindRequest, K as FormulaSessionOptions, L as ImageDisplayMode, M as IngestedSidecar, N as InsertBlockOptions, O as LayoutMode, P as MentionCandidate, Q as MentionProvider, R as OutlineBlock, T as OutlineInsertion, U as PreviewPanel, V as PreviewPanelProps, W as RawEditor, Y as RawEditorProps, Z as ThemeInheritance, _ as ViewPreferences, $ as WriteCanvasSettings, a0 as WysiwygEditor, a1 as WysiwygEditorProps, a2 as XLSX_LOCKED_REASON, a3 as XlsxFormulaSession, a4 as applySourceEditsToText, a5 as blockInsertionPoint, a6 as createXlsxFormulaSession, a7 as getBlockSlices, a8 as headingDepthForInsertion, a9 as ingestSidecarBytes, aa as joinBlockAt, ab as lineToOffset, ac as minimalReplaceEdit, ad as normalizeSourceEdits, ae as offsetToLine, af as resolveOutlineInsertion, ag as sliceIndexAtOffset, ah as sourceOutline, ai as spliceBlock, aj as useEditorContext, ak as useEditorContextMenuItems, al 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-D0XgDAZj.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 FindOptions, J as FindRequest, K as FormulaSessionOptions, L as ImageDisplayMode, M as IngestedSidecar, N as InsertBlockOptions, O as LayoutMode, P as MentionCandidate, Q as MentionProvider, R as OutlineBlock, T as OutlineInsertion, U as PreviewPanel, V as PreviewPanelProps, W as RawEditor, Y as RawEditorProps, Z as ThemeInheritance, _ as ViewPreferences, $ as WriteCanvasSettings, a0 as WysiwygEditor, a1 as WysiwygEditorProps, a2 as XLSX_LOCKED_REASON, a3 as XlsxFormulaSession, a4 as applySourceEditsToText, a5 as blockInsertionPoint, a6 as createXlsxFormulaSession, a7 as getBlockSlices, a8 as headingDepthForInsertion, a9 as ingestSidecarBytes, aa as joinBlockAt, ab as lineToOffset, ac as minimalReplaceEdit, ad as normalizeSourceEdits, ae as offsetToLine, af as resolveOutlineInsertion, ag as sliceIndexAtOffset, ah as sourceOutline, ai as spliceBlock, aj as useEditorContext, ak as useEditorContextMenuItems, al as useEditorInsertMenuItems } from './shell-D0XgDAZj.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode, CSSProperties, ReactElement } from 'react';
|
|
5
5
|
import { Doc, ScheduledClip, VideoPlacement, VideoPipSize, VideoPipShape, VideoPipPosition, MediaEdits, MediaProvider, Theme, CustomTemplateDefinition, ThemeSeedColors, ViewportPreset, ViewportConfig, Block, MediaEntry, DiagramEdgeAnchor } from '@bendyline/squisq/schemas';
|
|
6
6
|
import { ContentContainer } from '@bendyline/squisq/storage';
|
|
7
7
|
export { CanvasRect, ImageEditor, ImageEditorAction, ImageEditorProps, ImageEditorState, ImageEditorTool, ImageViewer, ImageViewerProps, UseImageEditorOptions, UseImageEditorReturn, imageEditorReducer, initialImageEditorState, useImageEditor } from './image-editor/index.js';
|
|
8
|
+
import { WikiLinkSupport, MarkdownWrapState, SvgIslandDiagnostic, BlockVideoEmbed, VideoEmbed } from '@bendyline/squisq/markdown';
|
|
9
|
+
export { MarkdownSourceEdit } from '@bendyline/squisq/markdown';
|
|
8
10
|
import { CodeBlockCopyHandler, DisplayMode, CaptionStyle, VideoPresentation, PipSize, PipShape, PipPosition } from '@bendyline/squisq-react';
|
|
9
11
|
import { IconFamily } from '@bendyline/squisq/icons';
|
|
10
12
|
import { CoverSlideTemplate, CoverSlidePlayback, DashboardStyleId, DashboardLayoutSummary, ConnectorRouting, AsciiDiagram, Tree, AsciiTimeline, AsciiTimelineSide, AsciiTimelineMarker } from '@bendyline/squisq/doc';
|
|
11
13
|
export { BuildPreviewDocOptions, buildPreviewDoc, documentTitleFromFileName } from '@bendyline/squisq/doc';
|
|
12
|
-
import { MarkdownWrapState, SvgIslandDiagnostic, BlockVideoEmbed, VideoEmbed } from '@bendyline/squisq/markdown';
|
|
13
|
-
export { MarkdownSourceEdit } from '@bendyline/squisq/markdown';
|
|
14
14
|
import * as monaco_editor from 'monaco-editor';
|
|
15
15
|
import { editor } from 'monaco-editor';
|
|
16
16
|
import { M as MonacoLanguageRequest, a as MonacoLanguageLoadOptions } from './monacoLanguageDetection-DEyUW-BS.js';
|
|
@@ -415,6 +415,8 @@ declare function resolveFileKind(fileName?: string, language?: string): FileKind
|
|
|
415
415
|
interface PlainHtmlPreviewProps {
|
|
416
416
|
/** Raw markdown source. */
|
|
417
417
|
markdown: string;
|
|
418
|
+
/** Optional article resolver for a connected document workspace. */
|
|
419
|
+
wikiLinks?: WikiLinkSupport | null;
|
|
418
420
|
/** Document title — populates the iframe's `<title>`. */
|
|
419
421
|
title?: string;
|
|
420
422
|
/**
|
|
@@ -454,7 +456,7 @@ interface PlainHtmlPreviewProps {
|
|
|
454
456
|
/** Optional host clipboard adapter; otherwise the browser Clipboard API is used. */
|
|
455
457
|
onCopyCode?: CodeBlockCopyHandler;
|
|
456
458
|
}
|
|
457
|
-
declare function PlainHtmlPreview({ markdown, title, images, mediaProvider, mediaRevision, theme, className, style, globalKeyboardShortcuts, onFrameChange, onLinkClick, showCodeCopyButton, onCopyCode, }: PlainHtmlPreviewProps): react.JSX.Element;
|
|
459
|
+
declare function PlainHtmlPreview({ markdown, wikiLinks, title, images, mediaProvider, mediaRevision, theme, className, style, globalKeyboardShortcuts, onFrameChange, onLinkClick, showCodeCopyButton, onCopyCode, }: PlainHtmlPreviewProps): react.JSX.Element;
|
|
458
460
|
|
|
459
461
|
/**
|
|
460
462
|
* Emoji Dataset
|
package/dist/index.js
CHANGED
|
@@ -243,7 +243,7 @@ import {
|
|
|
243
243
|
videoEmbedParagraphJson,
|
|
244
244
|
viewStateFromBinding,
|
|
245
245
|
writeHeadingViewState
|
|
246
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-T7HO6JUS.js";
|
|
247
247
|
import {
|
|
248
248
|
EditorProvider,
|
|
249
249
|
applySourceEditsToText,
|
|
@@ -264,7 +264,7 @@ import {
|
|
|
264
264
|
useBlockNavigator,
|
|
265
265
|
useEditorContext,
|
|
266
266
|
useEditorInsertMenuItems
|
|
267
|
-
} from "./chunk-
|
|
267
|
+
} from "./chunk-VYHPGIXU.js";
|
|
268
268
|
import {
|
|
269
269
|
SPEECH_INPUT_SAMPLE_RATE,
|
|
270
270
|
isSpeechInputProviderFactory,
|
|
@@ -273,14 +273,14 @@ import {
|
|
|
273
273
|
import "./chunk-A2H3JOA5.js";
|
|
274
274
|
import {
|
|
275
275
|
JsonEditor
|
|
276
|
-
} from "./chunk-
|
|
276
|
+
} from "./chunk-RWNS7R5S.js";
|
|
277
277
|
import {
|
|
278
278
|
MarkdownEscape
|
|
279
|
-
} from "./chunk-
|
|
279
|
+
} from "./chunk-6KS5IDN3.js";
|
|
280
280
|
import {
|
|
281
281
|
markdownToTiptap,
|
|
282
282
|
tiptapToMarkdown
|
|
283
|
-
} from "./chunk-
|
|
283
|
+
} from "./chunk-G4INWIOX.js";
|
|
284
284
|
import {
|
|
285
285
|
ImageEditor,
|
|
286
286
|
ImageViewer,
|
package/dist/monaco.js
CHANGED
|
@@ -41,6 +41,9 @@ import "monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShow
|
|
|
41
41
|
// src/monaco.ts
|
|
42
42
|
export * from "monaco-editor/esm/vs/editor/editor.api.js";
|
|
43
43
|
|
|
44
|
+
// src/monacoLanguages.ts
|
|
45
|
+
import * as monaco from "monaco-editor/esm/vs/editor/editor.api.js";
|
|
46
|
+
|
|
44
47
|
// src/monacoJsonc.ts
|
|
45
48
|
var JSON_LANGUAGE = {
|
|
46
49
|
defaultToken: "",
|
|
@@ -90,27 +93,27 @@ var JSONC_CONFIGURATION = {
|
|
|
90
93
|
{ open: '"', close: '"' }
|
|
91
94
|
]
|
|
92
95
|
};
|
|
93
|
-
function registerJsoncLanguage(
|
|
94
|
-
if (
|
|
95
|
-
|
|
96
|
+
function registerJsoncLanguage(monaco2) {
|
|
97
|
+
if (monaco2.languages.getLanguages().some(({ id }) => id === "jsonc")) return;
|
|
98
|
+
monaco2.languages.register({
|
|
96
99
|
id: "jsonc",
|
|
97
100
|
aliases: ["JSONC", "JSON with Comments", "jsonc"],
|
|
98
101
|
extensions: [".jsonc"],
|
|
99
102
|
mimetypes: ["application/jsonc"]
|
|
100
103
|
});
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
monaco2.languages.setLanguageConfiguration("jsonc", JSONC_CONFIGURATION);
|
|
105
|
+
monaco2.languages.setMonarchTokensProvider("jsonc", JSON_LANGUAGE);
|
|
103
106
|
}
|
|
104
|
-
function registerJsonLanguage(
|
|
105
|
-
if (
|
|
106
|
-
|
|
107
|
+
function registerJsonLanguage(monaco2) {
|
|
108
|
+
if (monaco2.languages.getLanguages().some(({ id }) => id === "json")) return;
|
|
109
|
+
monaco2.languages.register({
|
|
107
110
|
id: "json",
|
|
108
111
|
aliases: ["JSON", "json"],
|
|
109
112
|
extensions: [".json"],
|
|
110
113
|
mimetypes: ["application/json"]
|
|
111
114
|
});
|
|
112
|
-
|
|
113
|
-
|
|
115
|
+
monaco2.languages.setLanguageConfiguration("json", JSONC_CONFIGURATION);
|
|
116
|
+
monaco2.languages.setMonarchTokensProvider("json", JSON_LANGUAGE);
|
|
114
117
|
}
|
|
115
118
|
|
|
116
119
|
// src/monacoLanguages.ts
|
|
@@ -153,7 +156,6 @@ var SERVICE_LOADERS = {
|
|
|
153
156
|
};
|
|
154
157
|
var languagePromises = /* @__PURE__ */ new Map();
|
|
155
158
|
async function registerLightweightJson(language) {
|
|
156
|
-
const monaco = await import("monaco-editor/esm/vs/editor/editor.api.js");
|
|
157
159
|
if (language === "json") registerJsonLanguage(monaco);
|
|
158
160
|
else registerJsoncLanguage(monaco);
|
|
159
161
|
}
|
package/dist/review/index.js
CHANGED
|
@@ -19,9 +19,9 @@ import {
|
|
|
19
19
|
updateReviewDecorations,
|
|
20
20
|
useReview,
|
|
21
21
|
useReviewState
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-VYHPGIXU.js";
|
|
23
23
|
import "../chunk-DNEVUOBZ.js";
|
|
24
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-G4INWIOX.js";
|
|
25
25
|
|
|
26
26
|
// src/review/proofingAdapter.ts
|
|
27
27
|
import {
|
package/dist/shell/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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, L as ImageDisplayMode, O as LayoutMode, P as MentionCandidate, Q as MentionProvider, U as PreviewPanel, V as PreviewPanelProps, W as RawEditor, Y as RawEditorProps, Z as ThemeInheritance, _ as ViewPreferences, a0 as WysiwygEditor, a1 as WysiwygEditorProps, aj as useEditorContext, ak as useEditorContextMenuItems, al 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, L as ImageDisplayMode, O as LayoutMode, P as MentionCandidate, Q as MentionProvider, U as PreviewPanel, V as PreviewPanelProps, W as RawEditor, Y as RawEditorProps, Z as ThemeInheritance, _ as ViewPreferences, a0 as WysiwygEditor, a1 as WysiwygEditorProps, aj as useEditorContext, ak as useEditorContextMenuItems, al as useEditorInsertMenuItems } from '../shell-D0XgDAZj.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '@bendyline/squisq/table';
|
|
4
4
|
import '@bendyline/squisq-calc';
|
|
5
5
|
import '@bendyline/squisq-grid-react';
|
|
6
6
|
import '@bendyline/squisq-formats/xlsx';
|
|
7
|
+
import '@bendyline/squisq/markdown';
|
|
7
8
|
import '@bendyline/squisq/schemas';
|
|
8
9
|
import '@bendyline/squisq/fence';
|
|
9
10
|
import '@bendyline/squisq-react';
|
|
10
|
-
import '@bendyline/squisq/markdown';
|
|
11
11
|
import '@bendyline/squisq/storage';
|
|
12
12
|
import '../types-qxwhho3e.js';
|
|
13
13
|
import '@bendyline/squisq/proof';
|
package/dist/shell/index.js
CHANGED
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
RawEditor,
|
|
6
6
|
WysiwygEditor,
|
|
7
7
|
useEditorContextMenuItems
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-T7HO6JUS.js";
|
|
9
9
|
import {
|
|
10
10
|
EditorProvider,
|
|
11
11
|
useEditorContext,
|
|
12
12
|
useEditorInsertMenuItems
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-VYHPGIXU.js";
|
|
14
14
|
import "../chunk-DNEVUOBZ.js";
|
|
15
15
|
import "../chunk-A2H3JOA5.js";
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-6KS5IDN3.js";
|
|
17
|
+
import "../chunk-G4INWIOX.js";
|
|
18
18
|
import "../chunk-HLU6ZBS7.js";
|
|
19
19
|
import "../chunk-LXGQA2SY.js";
|
|
20
20
|
import "../chunk-LRZJD5YD.js";
|
|
@@ -4,10 +4,10 @@ import { TableCellValue, TableCellEdit } from '@bendyline/squisq/table';
|
|
|
4
4
|
import { CalcEngineConfig, CalcEngine } from '@bendyline/squisq-calc';
|
|
5
5
|
import { IngestTable } from '@bendyline/squisq-grid-react';
|
|
6
6
|
import { XlsxWorkbookGrids } from '@bendyline/squisq-formats/xlsx';
|
|
7
|
+
import { MarkdownSourceEdit, MarkdownDocument, WikiLinkSupport } from '@bendyline/squisq/markdown';
|
|
7
8
|
import { Doc, MediaProvider, ViewportPreset, Theme } from '@bendyline/squisq/schemas';
|
|
8
9
|
import { FenceRendererMap } from '@bendyline/squisq/fence';
|
|
9
10
|
import { CodeBlockCopyHandler } from '@bendyline/squisq-react';
|
|
10
|
-
import { MarkdownSourceEdit, MarkdownDocument } from '@bendyline/squisq/markdown';
|
|
11
11
|
import { ContentContainer } from '@bendyline/squisq/storage';
|
|
12
12
|
import { a as ProofingCapability, c as ProofingIgnoreStore } from './types-qxwhho3e.js';
|
|
13
13
|
import { D as DictationControl, b as SpeechInputCapability } from './types-Bi4ZVKvN.js';
|
|
@@ -832,6 +832,7 @@ interface EditorContextValue extends EditorState, EditorActions {
|
|
|
832
832
|
* path link. When unset, the dialog falls back to URL-only.
|
|
833
833
|
*/
|
|
834
834
|
documentLinkProvider: DocumentLinkProvider | null;
|
|
835
|
+
wikiLinks: WikiLinkSupport | null;
|
|
835
836
|
/**
|
|
836
837
|
* Extra link schemes the host intercepts itself (e.g. an app-internal
|
|
837
838
|
* navigation protocol). The link dialog validates against core's
|
|
@@ -948,6 +949,7 @@ interface EditorProviderProps {
|
|
|
948
949
|
* Omit to fall back to URL-only link insertion.
|
|
949
950
|
*/
|
|
950
951
|
documentLinkProvider?: DocumentLinkProvider | null;
|
|
952
|
+
wikiLinks?: WikiLinkSupport | null;
|
|
951
953
|
/**
|
|
952
954
|
* Host fence-renderer registry (`@bendyline/squisq/fence`). Omit to
|
|
953
955
|
* leave every explicit-language fence to the built-in families.
|
|
@@ -1082,7 +1084,7 @@ interface ViewPreferences {
|
|
|
1082
1084
|
/** Document vs. block-at-a-time layout. */
|
|
1083
1085
|
layoutMode?: LayoutMode;
|
|
1084
1086
|
}
|
|
1085
|
-
declare function EditorProvider({ initialMarkdown, initialView, articleId, colorScheme: initialColorScheme, workspaceContainer, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, mediaProvider, mediaEditRenders, imageDisplayMode, mentionProvider, proofing, proofingDefaultEnabled, proofingSpellingEnabled, proofingGrammarEnabled, proofingIgnoreStore, speechInput, documentLinkProvider, fenceRenderers, onCopyCode, linkSchemes, allowRecording, allowNarrate, preserveSourceWrapping, fileName, saveCoverImageOutput, saveDashboardImageOutput, language, findMode: controlledFindMode, onFindModeChange, findRequest, inlinePreview, showStatusBar, outline, blockTags, blockTagVisibility: initialBlockTagVisibility, themeInheritance, layoutMode, viewPreferences, onViewPreferencesChange, children, }: EditorProviderProps): react.JSX.Element;
|
|
1087
|
+
declare function EditorProvider({ initialMarkdown, initialView, articleId, colorScheme: initialColorScheme, workspaceContainer, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, mediaProvider, mediaEditRenders, imageDisplayMode, mentionProvider, proofing, proofingDefaultEnabled, proofingSpellingEnabled, proofingGrammarEnabled, proofingIgnoreStore, speechInput, documentLinkProvider, wikiLinks, fenceRenderers, onCopyCode, linkSchemes, allowRecording, allowNarrate, preserveSourceWrapping, fileName, saveCoverImageOutput, saveDashboardImageOutput, language, findMode: controlledFindMode, onFindModeChange, findRequest, inlinePreview, showStatusBar, outline, blockTags, blockTagVisibility: initialBlockTagVisibility, themeInheritance, layoutMode, viewPreferences, onViewPreferencesChange, children, }: EditorProviderProps): react.JSX.Element;
|
|
1086
1088
|
|
|
1087
1089
|
/**
|
|
1088
1090
|
* Host-supplied context sections rendered INSIDE the Monaco (raw/code)
|
|
@@ -1572,6 +1574,9 @@ interface EditorShellProps {
|
|
|
1572
1574
|
* remote API, …) implement this; the editor stays agnostic.
|
|
1573
1575
|
*/
|
|
1574
1576
|
documentLinkProvider?: DocumentLinkProvider | null;
|
|
1577
|
+
/** Optional workspace article access. Separate from the media/history container.
|
|
1578
|
+
* Hosts must validate paths, exclusively create files, and flush before opening. */
|
|
1579
|
+
wikiLinks?: WikiLinkSupport | null;
|
|
1575
1580
|
/**
|
|
1576
1581
|
* Host fence-renderer registry (`@bendyline/squisq/fence`). Claimed
|
|
1577
1582
|
* fence languages mount as interactive host widgets in the WYSIWYG
|
|
@@ -1759,7 +1764,7 @@ interface EditorShellProps {
|
|
|
1759
1764
|
* Complete markdown editor shell with toolbar, view switcher, and three
|
|
1760
1765
|
* editing modes: Raw (Monaco), WYSIWYG (Tiptap), and Preview.
|
|
1761
1766
|
*/
|
|
1762
|
-
declare function EditorShell({ ariaLabel, 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, findRequest, findShortcut, 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.Element;
|
|
1767
|
+
declare function EditorShell({ ariaLabel, 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, findRequest, findShortcut, mentionProvider, proofing, proofingDefaultEnabled, proofingSpellingEnabled, proofingGrammarEnabled, proofingIgnoreStore, speechInput, documentLinkProvider, wikiLinks, 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.Element;
|
|
1763
1768
|
|
|
1764
1769
|
/**
|
|
1765
1770
|
* Shared editor context menu.
|
package/dist/styles/index.css
CHANGED
|
@@ -8550,10 +8550,7 @@
|
|
|
8550
8550
|
.squisq-toolbar-button:active {
|
|
8551
8551
|
background: var(--squisq-surface-raised);
|
|
8552
8552
|
}
|
|
8553
|
-
.squisq-toolbar-button--active
|
|
8554
|
-
background: var(--squisq-accent-soft);
|
|
8555
|
-
color: var(--squisq-accent);
|
|
8556
|
-
}
|
|
8553
|
+
.squisq-toolbar-button--active,
|
|
8557
8554
|
.squisq-toolbar-button--active:hover {
|
|
8558
8555
|
background: var(--squisq-accent-soft);
|
|
8559
8556
|
color: var(--squisq-accent-strong);
|
|
@@ -10962,12 +10959,9 @@
|
|
|
10962
10959
|
.squisq-editor-shell[data-theme=dark] .squisq-toolbar-button:active {
|
|
10963
10960
|
background: var(--squisq-surface-raised);
|
|
10964
10961
|
}
|
|
10965
|
-
.squisq-editor-shell[data-theme=dark] .squisq-toolbar-button--active
|
|
10966
|
-
background: var(--squisq-accent-soft);
|
|
10967
|
-
color: var(--squisq-accent);
|
|
10968
|
-
}
|
|
10962
|
+
.squisq-editor-shell[data-theme=dark] .squisq-toolbar-button--active,
|
|
10969
10963
|
.squisq-editor-shell[data-theme=dark] .squisq-toolbar-button--active:hover {
|
|
10970
|
-
background: var(--squisq-accent-
|
|
10964
|
+
background: var(--squisq-accent-soft);
|
|
10971
10965
|
color: var(--squisq-accent-strong);
|
|
10972
10966
|
}
|
|
10973
10967
|
.squisq-editor-shell[data-theme=dark] .squisq-toolbar-files-badge {
|
|
@@ -11367,24 +11361,36 @@
|
|
|
11367
11361
|
letter-spacing: 0.05em;
|
|
11368
11362
|
}
|
|
11369
11363
|
.squisq-media-bin-actions {
|
|
11370
|
-
display:
|
|
11371
|
-
|
|
11364
|
+
display: grid;
|
|
11365
|
+
grid-auto-flow: column;
|
|
11366
|
+
grid-auto-columns: 1fr;
|
|
11372
11367
|
gap: 5px;
|
|
11373
11368
|
}
|
|
11374
11369
|
.squisq-media-bin-record,
|
|
11375
11370
|
.squisq-media-bin-upload {
|
|
11376
11371
|
display: inline-flex;
|
|
11372
|
+
flex-direction: column;
|
|
11377
11373
|
align-items: center;
|
|
11378
11374
|
justify-content: center;
|
|
11379
|
-
gap:
|
|
11375
|
+
gap: 2px;
|
|
11376
|
+
min-width: 50px;
|
|
11380
11377
|
font-size: 11px;
|
|
11381
|
-
|
|
11378
|
+
line-height: 14px;
|
|
11379
|
+
padding: 2px 6px;
|
|
11382
11380
|
cursor: pointer;
|
|
11383
11381
|
background: var(--squisq-surface-raised);
|
|
11384
11382
|
color: var(--squisq-text-soft);
|
|
11385
11383
|
border: 1px solid var(--squisq-border);
|
|
11386
11384
|
border-radius: 4px;
|
|
11387
11385
|
}
|
|
11386
|
+
.squisq-media-bin-action-icon {
|
|
11387
|
+
display: flex;
|
|
11388
|
+
align-items: center;
|
|
11389
|
+
justify-content: center;
|
|
11390
|
+
width: 14px;
|
|
11391
|
+
height: 14px;
|
|
11392
|
+
flex: 0 0 auto;
|
|
11393
|
+
}
|
|
11388
11394
|
.squisq-media-bin-record-dot {
|
|
11389
11395
|
width: 7px;
|
|
11390
11396
|
height: 7px;
|
|
@@ -14951,6 +14957,67 @@ button.squisq-view-menu-radio-row:focus-visible {
|
|
|
14951
14957
|
color: var(--squisq-text-soft);
|
|
14952
14958
|
}
|
|
14953
14959
|
|
|
14960
|
+
/* src/styles/wiki-links.css */
|
|
14961
|
+
.squisq-wiki-link button {
|
|
14962
|
+
font: inherit;
|
|
14963
|
+
color: var(--squisq-accent);
|
|
14964
|
+
background: transparent;
|
|
14965
|
+
border: 0;
|
|
14966
|
+
padding: 0;
|
|
14967
|
+
text-decoration: underline;
|
|
14968
|
+
cursor: pointer;
|
|
14969
|
+
}
|
|
14970
|
+
.squisq-wiki-link button[data-wiki-missing] {
|
|
14971
|
+
text-decoration-style: dashed;
|
|
14972
|
+
}
|
|
14973
|
+
.squisq-wiki-link button:disabled {
|
|
14974
|
+
color: inherit;
|
|
14975
|
+
cursor: default;
|
|
14976
|
+
text-decoration: none;
|
|
14977
|
+
}
|
|
14978
|
+
.squisq-wiki-link button:focus-visible {
|
|
14979
|
+
outline: 2px solid var(--squisq-accent);
|
|
14980
|
+
outline-offset: 2px;
|
|
14981
|
+
}
|
|
14982
|
+
.squisq-wiki-error {
|
|
14983
|
+
color: var(--squisq-danger);
|
|
14984
|
+
font-size: 0.85em;
|
|
14985
|
+
}
|
|
14986
|
+
.squisq-wiki-suggestions {
|
|
14987
|
+
position: fixed;
|
|
14988
|
+
z-index: 10000;
|
|
14989
|
+
min-width: 200px;
|
|
14990
|
+
max-width: min(360px, calc(100vw - 16px));
|
|
14991
|
+
max-height: 240px;
|
|
14992
|
+
overflow-y: auto;
|
|
14993
|
+
padding: 4px;
|
|
14994
|
+
border: 1px solid var(--squisq-border);
|
|
14995
|
+
border-radius: 6px;
|
|
14996
|
+
background: var(--squisq-surface);
|
|
14997
|
+
color: var(--squisq-text);
|
|
14998
|
+
font-family: var(--squisq-ux-font);
|
|
14999
|
+
box-shadow: var(--squisq-shadow-md);
|
|
15000
|
+
}
|
|
15001
|
+
.squisq-wiki-suggestions button {
|
|
15002
|
+
display: block;
|
|
15003
|
+
width: 100%;
|
|
15004
|
+
border: 0;
|
|
15005
|
+
padding: 8px 12px;
|
|
15006
|
+
text-align: left;
|
|
15007
|
+
background: transparent;
|
|
15008
|
+
color: inherit;
|
|
15009
|
+
font: inherit;
|
|
15010
|
+
cursor: pointer;
|
|
15011
|
+
overflow-wrap: anywhere;
|
|
15012
|
+
}
|
|
15013
|
+
.squisq-wiki-suggestions button[aria-selected=true],
|
|
15014
|
+
.squisq-wiki-suggestions button:hover {
|
|
15015
|
+
background: var(--squisq-row-hover);
|
|
15016
|
+
}
|
|
15017
|
+
.squisq-wiki-suggestions button[data-kind=folder] {
|
|
15018
|
+
font-weight: 600;
|
|
15019
|
+
}
|
|
15020
|
+
|
|
14954
15021
|
/* src/styles/document-tray.css */
|
|
14955
15022
|
.squisq-wysiwyg-editor .squisq-document-tray-source {
|
|
14956
15023
|
display: none !important;
|
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.9",
|
|
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.5",
|
|
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.6",
|
|
108
|
+
"@bendyline/squisq-grid-react": "2.11.28",
|
|
109
|
+
"@bendyline/squisq-react": "2.12.6",
|
|
110
|
+
"@bendyline/squisq-video-react": "2.5.7",
|
|
111
111
|
"@fortawesome/fontawesome-free": "7.3.1",
|
|
112
112
|
"@tiptap/core": "2.27.3",
|
|
113
113
|
"@tiptap/extension-heading": "2.27.3",
|