@bendyline/squisq-editor-react 2.12.4 → 2.12.6
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-KI5XQWRU.js → chunk-LRUBYTKW.js} +1 -1
- package/dist/{chunk-WMNL2WEI.js → chunk-MHG4KPMA.js} +16 -3
- package/dist/{chunk-CLO2AM6J.js → chunk-NESYESKT.js} +3 -3
- package/dist/{chunk-SKKA3YFF.js → chunk-XF2YCVZM.js} +1 -1
- package/dist/{chunk-PXO3D42N.js → chunk-ZA6VWQUQ.js} +2 -2
- package/dist/index.js +5 -5
- package/dist/json-editor/index.js +3 -3
- package/dist/review/index.js +2 -2
- package/dist/shell/index.js +4 -4
- package/dist/styles/index.css +72 -0
- package/package.json +6 -6
|
@@ -3,7 +3,10 @@ import { resolveIcon } from "@bendyline/squisq/icons";
|
|
|
3
3
|
import {
|
|
4
4
|
matchTrailingTemplateAnnotation,
|
|
5
5
|
matchTrailingPandocAttr,
|
|
6
|
-
tokenizeAttrTokens
|
|
6
|
+
tokenizeAttrTokens,
|
|
7
|
+
parseHtmlToNodes,
|
|
8
|
+
sanitizeHtmlNodes,
|
|
9
|
+
stringifyHtmlNodes
|
|
7
10
|
} from "@bendyline/squisq/markdown";
|
|
8
11
|
import { mediaEditHtmlAttribute as mediaEditHtmlAttribute2 } from "@bendyline/squisq/mediaEdit";
|
|
9
12
|
|
|
@@ -394,14 +397,14 @@ function markdownToTiptap(markdown) {
|
|
|
394
397
|
const thHtml = headerCells.map((cell, i) => {
|
|
395
398
|
const align = alignments[i];
|
|
396
399
|
const style = align ? ` style="text-align: ${align}"` : "";
|
|
397
|
-
return `<th${style}>${
|
|
400
|
+
return `<th${style}>${tableCellToHtml(cell)}</th>`;
|
|
398
401
|
}).join("");
|
|
399
402
|
const bodyHtml = tableLines.slice(2).map((rowLine) => {
|
|
400
403
|
const cells = parseTableCells(rowLine);
|
|
401
404
|
const tdHtml = cells.map((cell, i) => {
|
|
402
405
|
const align = alignments[i];
|
|
403
406
|
const style = align ? ` style="text-align: ${align}"` : "";
|
|
404
|
-
return `<td${style}>${
|
|
407
|
+
return `<td${style}>${tableCellToHtml(cell)}</td>`;
|
|
405
408
|
}).join("");
|
|
406
409
|
return `<tr>${tdHtml}</tr>`;
|
|
407
410
|
}).join("");
|
|
@@ -1314,7 +1317,17 @@ function htmlToInline(html) {
|
|
|
1314
1317
|
result = vault.restore(result);
|
|
1315
1318
|
return restoreLeadingSpaces(unescapeHtml(result));
|
|
1316
1319
|
}
|
|
1320
|
+
var RICH_TABLE_CELL = /^<div data-squisq-table-cell="">([\s\S]*)<\/div>$/;
|
|
1321
|
+
function tableCellToHtml(cell) {
|
|
1322
|
+
const rich = RICH_TABLE_CELL.exec(cell);
|
|
1323
|
+
return rich ? stringifyHtmlNodes(sanitizeHtmlNodes(parseHtmlToNodes(rich[1]))) : inlineToHtml(cell);
|
|
1324
|
+
}
|
|
1317
1325
|
function htmlToTableCell(html) {
|
|
1326
|
+
if (/<(?:ul|ol|blockquote|h[1-6]|pre|div)\b/i.test(html)) {
|
|
1327
|
+
const content = html.replace(/<label\b[^>]*>[\s\S]*?<\/label>/gi, "");
|
|
1328
|
+
const safe = stringifyHtmlNodes(sanitizeHtmlNodes(parseHtmlToNodes(content)));
|
|
1329
|
+
return `<div data-squisq-table-cell="">${safe.replace(/\|/g, "|").replace(/\r/g, " ").replace(/\n/g, " ")}</div>`;
|
|
1330
|
+
}
|
|
1318
1331
|
const withParagraphBreaks = html.replace(/<\/p>\s*<p(?:\s[^>]*)?>/gi, "<br>").replace(/^\s*<p(?:\s[^>]*)?>/i, "").replace(/<\/p>\s*$/i, "");
|
|
1319
1332
|
return htmlToInline(withParagraphBreaks).replace(/ {2}\n/g, "<br>");
|
|
1320
1333
|
}
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
useDictationState,
|
|
20
20
|
useEditorContext,
|
|
21
21
|
useEditorContextOptional
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XF2YCVZM.js";
|
|
23
23
|
import {
|
|
24
24
|
monacoLanguageRequestKey,
|
|
25
25
|
monacoLanguagesForDocument,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "./chunk-A2H3JOA5.js";
|
|
28
28
|
import {
|
|
29
29
|
MarkdownEscape
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-LRUBYTKW.js";
|
|
31
31
|
import {
|
|
32
32
|
escapeLinkLabel,
|
|
33
33
|
formatLinkDestination,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
mediaEditNodeAttributeName,
|
|
37
37
|
mediaEditNodeAttributes,
|
|
38
38
|
tiptapToMarkdown
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-MHG4KPMA.js";
|
|
40
40
|
import {
|
|
41
41
|
ImageEditor,
|
|
42
42
|
ImageViewer,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MarkdownEscape
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LRUBYTKW.js";
|
|
4
4
|
import {
|
|
5
5
|
markdownToTiptap,
|
|
6
6
|
tiptapToMarkdown
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MHG4KPMA.js";
|
|
8
8
|
|
|
9
9
|
// src/jsonEditor/JsonEditorContext.tsx
|
|
10
10
|
import { createContext, useContext, useEffect, useMemo } from "react";
|
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-NESYESKT.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-XF2YCVZM.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-ZA6VWQUQ.js";
|
|
277
277
|
import {
|
|
278
278
|
MarkdownEscape
|
|
279
|
-
} from "./chunk-
|
|
279
|
+
} from "./chunk-LRUBYTKW.js";
|
|
280
280
|
import {
|
|
281
281
|
markdownToTiptap,
|
|
282
282
|
tiptapToMarkdown
|
|
283
|
-
} from "./chunk-
|
|
283
|
+
} from "./chunk-MHG4KPMA.js";
|
|
284
284
|
import {
|
|
285
285
|
ImageEditor,
|
|
286
286
|
ImageViewer,
|
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-XF2YCVZM.js";
|
|
23
23
|
import "../chunk-DNEVUOBZ.js";
|
|
24
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-MHG4KPMA.js";
|
|
25
25
|
|
|
26
26
|
// src/review/proofingAdapter.ts
|
|
27
27
|
import {
|
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-NESYESKT.js";
|
|
9
9
|
import {
|
|
10
10
|
EditorProvider,
|
|
11
11
|
useEditorContext,
|
|
12
12
|
useEditorInsertMenuItems
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-XF2YCVZM.js";
|
|
14
14
|
import "../chunk-DNEVUOBZ.js";
|
|
15
15
|
import "../chunk-A2H3JOA5.js";
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-LRUBYTKW.js";
|
|
17
|
+
import "../chunk-MHG4KPMA.js";
|
|
18
18
|
import "../chunk-HLU6ZBS7.js";
|
|
19
19
|
import "../chunk-TCGWKYME.js";
|
|
20
20
|
import "../chunk-LRZJD5YD.js";
|
package/dist/styles/index.css
CHANGED
|
@@ -20895,6 +20895,78 @@ button.squisq-ascii-timeline-track-name:focus-visible {
|
|
|
20895
20895
|
min-width: 0;
|
|
20896
20896
|
display: flex;
|
|
20897
20897
|
}
|
|
20898
|
+
.squisq-layout-manager-panel {
|
|
20899
|
+
container-type: inline-size;
|
|
20900
|
+
container-name: layout-manager;
|
|
20901
|
+
max-width: 100%;
|
|
20902
|
+
}
|
|
20903
|
+
.squisq-template-designer-panel {
|
|
20904
|
+
min-width: 0;
|
|
20905
|
+
container-type: inline-size;
|
|
20906
|
+
container-name: layout-designer;
|
|
20907
|
+
}
|
|
20908
|
+
@container layout-manager (max-width: 760px) {
|
|
20909
|
+
.squisq-layout-manager-body {
|
|
20910
|
+
flex-direction: column;
|
|
20911
|
+
overflow-y: auto;
|
|
20912
|
+
}
|
|
20913
|
+
.squisq-layout-manager-sidebar {
|
|
20914
|
+
box-sizing: border-box;
|
|
20915
|
+
width: 100%;
|
|
20916
|
+
max-height: 180px;
|
|
20917
|
+
flex-shrink: 0;
|
|
20918
|
+
border-right: 0;
|
|
20919
|
+
border-bottom: 1px solid var(--squisq-layout-border);
|
|
20920
|
+
}
|
|
20921
|
+
.squisq-layout-manager-main {
|
|
20922
|
+
flex: 1 0 auto;
|
|
20923
|
+
min-height: 600px;
|
|
20924
|
+
}
|
|
20925
|
+
.squisq-template-designer-panel--embedded {
|
|
20926
|
+
height: auto;
|
|
20927
|
+
}
|
|
20928
|
+
}
|
|
20929
|
+
@container layout-designer (max-width: 680px) {
|
|
20930
|
+
.squisq-template-designer-meta {
|
|
20931
|
+
grid-template-columns: minmax(0, 1fr);
|
|
20932
|
+
padding: 12px;
|
|
20933
|
+
}
|
|
20934
|
+
.squisq-template-designer-field,
|
|
20935
|
+
.squisq-template-designer-field input {
|
|
20936
|
+
min-width: 0;
|
|
20937
|
+
}
|
|
20938
|
+
.squisq-template-designer-field input,
|
|
20939
|
+
.squisq-template-designer-btn {
|
|
20940
|
+
min-height: 44px;
|
|
20941
|
+
font-size: 16px;
|
|
20942
|
+
}
|
|
20943
|
+
.squisq-template-designer-body {
|
|
20944
|
+
flex-direction: column;
|
|
20945
|
+
flex: 1 0 auto;
|
|
20946
|
+
}
|
|
20947
|
+
.squisq-template-designer-palette {
|
|
20948
|
+
box-sizing: border-box;
|
|
20949
|
+
width: 100%;
|
|
20950
|
+
max-height: 160px;
|
|
20951
|
+
border-right: 0;
|
|
20952
|
+
border-bottom: 1px solid var(--squisq-layout-border);
|
|
20953
|
+
}
|
|
20954
|
+
.squisq-template-designer-stage {
|
|
20955
|
+
min-height: 260px;
|
|
20956
|
+
height: 320px;
|
|
20957
|
+
flex: none;
|
|
20958
|
+
box-sizing: border-box;
|
|
20959
|
+
}
|
|
20960
|
+
.squisq-template-designer-footer {
|
|
20961
|
+
flex-direction: column;
|
|
20962
|
+
align-items: stretch;
|
|
20963
|
+
padding: 12px;
|
|
20964
|
+
}
|
|
20965
|
+
.squisq-template-designer-footer-actions {
|
|
20966
|
+
flex-wrap: wrap;
|
|
20967
|
+
justify-content: flex-end;
|
|
20968
|
+
}
|
|
20969
|
+
}
|
|
20898
20970
|
|
|
20899
20971
|
/* src/styles/index.css */
|
|
20900
20972
|
/*! Bundled license information:
|
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.6",
|
|
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.4",
|
|
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.4",
|
|
108
|
+
"@bendyline/squisq-grid-react": "2.11.27",
|
|
109
|
+
"@bendyline/squisq-react": "2.12.5",
|
|
110
|
+
"@bendyline/squisq-video-react": "2.5.5",
|
|
111
111
|
"@fortawesome/fontawesome-free": "7.3.1",
|
|
112
112
|
"@tiptap/core": "2.27.3",
|
|
113
113
|
"@tiptap/extension-heading": "2.27.3",
|