treege 3.0.0-beta.29 → 3.0.0-beta.30
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/ThemeContext-D49eu_oE.js +1472 -0
- package/dist/editor/constants/nodeTypes.d.ts +4 -4
- package/dist/editor/context/TreegeEditorContext.d.ts +9 -1
- package/dist/editor/features/TreegeEditor/inputs/OptionImageField.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/GroupNode.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/nodes/TreegeNode.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/BottomHandleDropdown.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeLabelInput.d.ts +9 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeTypeBadge.d.ts +8 -0
- package/dist/editor/features/TreegeEditor/nodes/components/OpenSheetButton.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/SubTypeBadge.d.ts +8 -0
- package/dist/editor/hooks/useFlowActions.d.ts +1 -0
- package/dist/editor/hooks/useFlowConnections.d.ts +4 -1
- package/dist/editor/utils/image.d.ts +7 -0
- package/dist/{editor-iWcSAxOr.js → editor-DnrJgSrC.js} +1246 -1035
- package/dist/editor.js +2 -2
- package/dist/main.js +4 -4
- package/dist/{renderer-DZD267lH.js → renderer-MCPhNlp1.js} +20 -12
- package/dist/renderer-native.js +644 -631
- package/dist/renderer.js +3 -3
- package/dist/{separator-DzU4sadU.js → separator-gO82kpxa.js} +1 -1
- package/dist/shared/locales/ar.json.d.ts +12 -0
- package/dist/shared/locales/de.json.d.ts +12 -0
- package/dist/shared/locales/en.json.d.ts +12 -0
- package/dist/shared/locales/es.json.d.ts +12 -0
- package/dist/shared/locales/fr.json.d.ts +12 -0
- package/dist/shared/locales/it.json.d.ts +12 -0
- package/dist/shared/locales/pt.json.d.ts +12 -0
- package/dist/shared/types/node.d.ts +5 -0
- package/dist/{useRenderNode-Huckx5bu.js → useRenderNode-B_GPMTPf.js} +1 -1
- package/package.json +1 -1
- package/dist/ThemeContext-cNnjiSPY.js +0 -2152
- package/dist/editor/features/TreegeEditor/nodes/FlowNode.d.ts +0 -6
- package/dist/editor/features/TreegeEditor/nodes/InputNode.d.ts +0 -6
- package/dist/editor/features/TreegeEditor/nodes/UINode.d.ts +0 -6
- package/dist/editor/features/TreegeEditor/nodes/hooks/useBottomHandleClick.d.ts +0 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const NODE_TYPES: {
|
|
2
|
-
flow: import('react').MemoExoticComponent<({ data, isConnectable,
|
|
3
|
-
group: import('react').MemoExoticComponent<({ data }: import('../features/TreegeEditor/nodes/GroupNode').GroupNodeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
4
|
-
input: import('react').MemoExoticComponent<({ data, isConnectable, parentId, id }: import('../features/TreegeEditor/nodes/
|
|
5
|
-
ui: import('react').MemoExoticComponent<({ data, isConnectable,
|
|
2
|
+
flow: import('react').MemoExoticComponent<({ data, isConnectable, parentId, type, id }: import('../features/TreegeEditor/nodes/TreegeNode').TreegeNodeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
3
|
+
group: import('react').MemoExoticComponent<({ data, id }: import('../features/TreegeEditor/nodes/GroupNode').GroupNodeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
4
|
+
input: import('react').MemoExoticComponent<({ data, isConnectable, parentId, type, id }: import('../features/TreegeEditor/nodes/TreegeNode').TreegeNodeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
5
|
+
ui: import('react').MemoExoticComponent<({ data, isConnectable, parentId, type, id }: import('../features/TreegeEditor/nodes/TreegeNode').TreegeNodeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
6
6
|
};
|
|
@@ -18,9 +18,17 @@ export interface TreegeEditorContextValue {
|
|
|
18
18
|
* AI configuration for tree generation
|
|
19
19
|
*/
|
|
20
20
|
aiConfig?: AIConfig;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the node actions sheet is open
|
|
23
|
+
*/
|
|
24
|
+
isNodeSheetOpen: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Function to open or close the node actions sheet
|
|
27
|
+
*/
|
|
28
|
+
setIsNodeSheetOpen: (open: boolean) => void;
|
|
21
29
|
}
|
|
22
30
|
export interface TreegeEditorProviderProps extends PropsWithChildren {
|
|
23
|
-
value: TreegeEditorContextValue
|
|
31
|
+
value: Omit<TreegeEditorContextValue, "isNodeSheetOpen" | "setIsNodeSheetOpen">;
|
|
24
32
|
}
|
|
25
33
|
export declare const TreegeEditorContext: import('react').Context<TreegeEditorContextValue | null>;
|
|
26
34
|
export declare const TreegeEditorProvider: ({ children, value }: TreegeEditorProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,5 +2,5 @@ import { Node, NodeProps } from '@xyflow/react';
|
|
|
2
2
|
import { GroupNodeData } from '../../../../shared/types/node';
|
|
3
3
|
export type GroupNodeType = Node<GroupNodeData, "group">;
|
|
4
4
|
export type GroupNodeProps = NodeProps<GroupNodeType>;
|
|
5
|
-
declare const _default: import('react').MemoExoticComponent<({ data }: GroupNodeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
5
|
+
declare const _default: import('react').MemoExoticComponent<({ data, id }: GroupNodeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
6
6
|
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Node, NodeProps } from '@xyflow/react';
|
|
2
|
+
import { FlowNodeData, InputNodeData, UINodeData } from '../../../../shared/types/node';
|
|
3
|
+
export type TreegeNodeType = Node<FlowNodeData, "flow"> | Node<InputNodeData, "input"> | Node<UINodeData, "ui">;
|
|
4
|
+
export type TreegeNodeProps = NodeProps<TreegeNodeType>;
|
|
5
|
+
declare const _default: import('react').MemoExoticComponent<({ data, isConnectable, parentId, type, id }: TreegeNodeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Translatable } from '../../../../../shared/types/translate';
|
|
2
|
+
interface NodeLabelInputProps {
|
|
3
|
+
nodeId: string;
|
|
4
|
+
label?: Translatable;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const NodeLabelInput: ({ nodeId, label, placeholder, className }: NodeLabelInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default NodeLabelInput;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NODE_TYPES } from '../../../../constants/nodeTypes';
|
|
2
|
+
type NodeTypeKey = keyof typeof NODE_TYPES;
|
|
3
|
+
interface NodeTypeBadgeProps {
|
|
4
|
+
nodeId: string;
|
|
5
|
+
type: NodeTypeKey;
|
|
6
|
+
}
|
|
7
|
+
declare const NodeTypeBadge: ({ nodeId, type }: NodeTypeBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default NodeTypeBadge;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type SubTypeOwnerType = "input" | "ui";
|
|
2
|
+
interface SubTypeBadgeProps {
|
|
3
|
+
nodeId: string;
|
|
4
|
+
type: SubTypeOwnerType;
|
|
5
|
+
subType?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const SubTypeBadge: ({ nodeId, type, subType }: SubTypeBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default SubTypeBadge;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
declare const useFlowActions: () => {
|
|
6
6
|
clearSelection: () => void;
|
|
7
7
|
deleteSelectedNode: () => void;
|
|
8
|
+
selectNode: (id: string) => void;
|
|
8
9
|
updateNodeData: <T extends Record<string, unknown>>(id: string, data: Partial<T>) => void;
|
|
9
10
|
updateNodeType: (id: string, type: string) => void;
|
|
10
11
|
updateSelectedNodeData: <T extends Record<string, unknown>>(data: Partial<T>) => void;
|
|
@@ -8,7 +8,10 @@ declare const useFlowConnections: () => {
|
|
|
8
8
|
source: string;
|
|
9
9
|
target: string;
|
|
10
10
|
}) => boolean;
|
|
11
|
-
onAddFromHandle: (sourceNodeId: string
|
|
11
|
+
onAddFromHandle: (sourceNodeId: string, nodeInit?: {
|
|
12
|
+
type: string;
|
|
13
|
+
data?: Record<string, unknown>;
|
|
14
|
+
}) => void;
|
|
12
15
|
onConnect: OnConnect;
|
|
13
16
|
onConnectEnd: OnConnectEnd;
|
|
14
17
|
onEdgesDelete: OnEdgesDelete;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const MAX_IMAGE_INPUT_BYTES: number;
|
|
2
|
+
/**
|
|
3
|
+
* Converts an image file to a resized JPEG base64 data URL.
|
|
4
|
+
* Rejects files that are not images or exceed MAX_IMAGE_INPUT_BYTES.
|
|
5
|
+
* Dimensions are capped at MAX_DIMENSION × MAX_DIMENSION to keep the JSON small.
|
|
6
|
+
*/
|
|
7
|
+
export declare const imageFileToOptimizedDataUrl: (file: File) => Promise<string>;
|