@bendyline/squisq-editor-react 2.12.11 → 2.13.0
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.
|
@@ -23900,6 +23900,7 @@ import { useCallback as useCallback35, useMemo as useMemo28, useRef as useRef39,
|
|
|
23900
23900
|
|
|
23901
23901
|
// src/asciiDiagram/asciiDiagramCommands.ts
|
|
23902
23902
|
import {
|
|
23903
|
+
arrangeAsciiDiagram,
|
|
23903
23904
|
canvasToAsciiCell,
|
|
23904
23905
|
ASCII_CHAR_H,
|
|
23905
23906
|
ASCII_CHAR_W,
|
|
@@ -24127,6 +24128,8 @@ function applyAsciiDiagramCommand(editor, blockId, cmd, options = {}) {
|
|
|
24127
24128
|
}
|
|
24128
24129
|
case "removeNode":
|
|
24129
24130
|
return apply((d) => removeNodeOp(d, cmd.nodeId));
|
|
24131
|
+
case "autoArrange":
|
|
24132
|
+
return apply((d) => arrangeAsciiDiagram(d, { direction: cmd.direction }));
|
|
24130
24133
|
}
|
|
24131
24134
|
const _exhaustive = cmd;
|
|
24132
24135
|
void _exhaustive;
|
|
@@ -24230,6 +24233,14 @@ function AsciiDiagramWidget({
|
|
|
24230
24233
|
disabled: selectedNodeIds.length === 0,
|
|
24231
24234
|
onClick: () => selectedNodeIds.forEach((id) => dispatch({ kind: "removeNode", nodeId: id }))
|
|
24232
24235
|
},
|
|
24236
|
+
{
|
|
24237
|
+
id: "auto-arrange",
|
|
24238
|
+
label: "Arrange",
|
|
24239
|
+
icon: /* @__PURE__ */ jsx53(Icon, { icon: "fa-solid fa-diagram-project" }),
|
|
24240
|
+
title: "Arrange nodes so connections flow top to bottom",
|
|
24241
|
+
disabled: view.diagram.nodes.length < 2,
|
|
24242
|
+
onClick: () => dispatch({ kind: "autoArrange" })
|
|
24243
|
+
},
|
|
24233
24244
|
{
|
|
24234
24245
|
id: "ascii-source",
|
|
24235
24246
|
label: "Source",
|
package/dist/index.d.ts
CHANGED
|
@@ -1751,6 +1751,11 @@ type DiagramCommand = {
|
|
|
1751
1751
|
} | {
|
|
1752
1752
|
kind: 'removeNode';
|
|
1753
1753
|
nodeId: string;
|
|
1754
|
+
}
|
|
1755
|
+
/** Re-place every node so connections flow one way (`down` unless told otherwise). */
|
|
1756
|
+
| {
|
|
1757
|
+
kind: 'autoArrange';
|
|
1758
|
+
direction?: 'down' | 'right';
|
|
1754
1759
|
};
|
|
1755
1760
|
interface DiagramCanvasProps {
|
|
1756
1761
|
nodes: DiagramNode[];
|
package/dist/index.js
CHANGED
package/dist/shell/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/squisq-editor-react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
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.
|
|
105
|
+
"@bendyline/squisq": "2.13.0",
|
|
106
106
|
"@bendyline/squisq-calc": "2.11.2",
|
|
107
|
-
"@bendyline/squisq-formats": "2.
|
|
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.8.0",
|
|
108
|
+
"@bendyline/squisq-grid-react": "2.11.29",
|
|
109
|
+
"@bendyline/squisq-react": "2.12.8",
|
|
110
|
+
"@bendyline/squisq-video-react": "2.5.9",
|
|
111
111
|
"@fortawesome/fontawesome-free": "7.3.1",
|
|
112
112
|
"@tiptap/core": "2.27.3",
|
|
113
113
|
"@tiptap/extension-heading": "2.27.3",
|