treege 3.0.0-beta.40 → 3.0.0-beta.42
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/DefaultInputs-Cr6wTVNE.js +1558 -0
- package/dist/{ThemeContext-Ejgu9Mwr.js → ThemeContext-CUHjGVUf.js} +87 -87
- package/dist/editor/features/TreegeEditor/TreegeEditor.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/controls/MiniMapControl.d.ts +6 -0
- package/dist/editor/{hooks/useAutoLayout.d.ts → features/TreegeEditor/layout/AutoLayout.d.ts} +3 -3
- package/dist/editor/features/TreegeEditor/panel/ActionsPanel.d.ts +3 -1
- package/dist/editor/types/editor.d.ts +23 -0
- package/dist/{editor-DWJ95r4g.js → editor-CE8g1o72.js} +1381 -1345
- package/dist/editor.js +2 -2
- package/dist/main.js +3 -3
- package/dist/renderer-native.js +413 -413
- package/dist/renderer.js +2 -2
- package/dist/shared/hooks/useMediaQuery.d.ts +12 -0
- package/package.json +7 -8
- package/dist/DefaultInputs-8yJMEyMh.js +0 -1557
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TreegeEditorProps } from '../../types/editor';
|
|
2
|
-
declare const TreegeEditor: ({ flow, onExportJson, onSave, theme, language, aiConfig }: TreegeEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const TreegeEditor: ({ flow, onExportJson, onSave, theme, language, aiConfig, extraMenuItems }: TreegeEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default TreegeEditor;
|
package/dist/editor/{hooks/useAutoLayout.d.ts → features/TreegeEditor/layout/AutoLayout.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LayoutOptions } from '
|
|
1
|
+
import { LayoutOptions } from '../../../utils/dagreLayout';
|
|
2
2
|
/**
|
|
3
3
|
* Keeps the flow laid out automatically using Dagre.
|
|
4
4
|
*
|
|
@@ -11,5 +11,5 @@ import { LayoutOptions } from '../utils/dagreLayout';
|
|
|
11
11
|
* Group children are laid out independently within their parent, preserving
|
|
12
12
|
* React Flow's parent-relative coordinate system.
|
|
13
13
|
*/
|
|
14
|
-
declare const
|
|
15
|
-
export default
|
|
14
|
+
declare const AutoLayout: ({ direction, horizontalSpacing, verticalSpacing }?: LayoutOptions) => null;
|
|
15
|
+
export default AutoLayout;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ExtraMenuItem } from '../../../types/editor';
|
|
1
2
|
import { Flow } from '../../../../shared/types/node';
|
|
2
3
|
export interface ActionsPanelProps {
|
|
3
4
|
onExportJson?: (data: Flow) => void;
|
|
4
5
|
onSave?: (data: Flow) => void;
|
|
6
|
+
extraMenuItems?: ExtraMenuItem[];
|
|
5
7
|
}
|
|
6
|
-
declare const ActionsPanel: ({ onExportJson, onSave }: ActionsPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const ActionsPanel: ({ onExportJson, onSave, extraMenuItems }: ActionsPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export default ActionsPanel;
|
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
import { Edge, Node } from '@xyflow/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
import { AIConfig } from './ai';
|
|
3
4
|
import { Flow } from '../../shared/types/node';
|
|
5
|
+
export interface ExtraMenuItem {
|
|
6
|
+
/**
|
|
7
|
+
* Label displayed in the menu item.
|
|
8
|
+
*/
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Optional icon rendered before the label.
|
|
12
|
+
*/
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Callback triggered when the menu item is clicked.
|
|
16
|
+
*/
|
|
17
|
+
onClick?: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* When true, styles the item as destructive.
|
|
20
|
+
*/
|
|
21
|
+
destructive?: boolean;
|
|
22
|
+
}
|
|
4
23
|
export interface TreegeEditorProps {
|
|
5
24
|
/**
|
|
6
25
|
* Default flow structure containing combined nodes and edges.
|
|
@@ -35,4 +54,8 @@ export interface TreegeEditorProps {
|
|
|
35
54
|
* Additional CSS class names for custom styling.
|
|
36
55
|
*/
|
|
37
56
|
className?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Extra menu items to append to the "more" dropdown of the actions panel.
|
|
59
|
+
*/
|
|
60
|
+
extraMenuItems?: ExtraMenuItem[];
|
|
38
61
|
}
|