treege 3.0.0-beta.45 → 3.0.0-beta.46
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-7fXlu0uL.js +1734 -0
- package/dist/{ThemeContext-O482h1XZ.js → ThemeContext-CNsS53ku.js} +274 -217
- package/dist/editor/constants/nodeTypes.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/nodes/components/NodeGroupBadge.d.ts +5 -0
- package/dist/editor/features/TreegeEditor/nodes/layout/NodeWrapper.d.ts +1 -2
- package/dist/editor/utils/dagreLayout.d.ts +5 -2
- package/dist/editor/utils/groupColor.d.ts +14 -0
- package/dist/{editor-DBCMmZtt.js → editor-DLKg7ri7.js} +1550 -1488
- package/dist/editor.js +2 -2
- package/dist/main.js +4 -4
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultStep.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +12 -4
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultStep.d.ts +3 -0
- package/dist/renderer/hooks/useRenderNode.d.ts +1 -3
- package/dist/renderer/index.d.ts +1 -1
- package/dist/renderer/index.native.d.ts +1 -1
- package/dist/renderer/types/renderer.d.ts +43 -5
- package/dist/renderer/utils/step.d.ts +27 -0
- package/dist/renderer-native.js +757 -685
- package/dist/renderer.js +3 -3
- package/dist/shared/locales/ar.json.d.ts +6 -1
- package/dist/shared/locales/de.json.d.ts +6 -1
- package/dist/shared/locales/en.json.d.ts +6 -1
- package/dist/shared/locales/es.json.d.ts +6 -1
- package/dist/shared/locales/fr.json.d.ts +6 -1
- package/dist/shared/locales/it.json.d.ts +6 -1
- package/dist/shared/locales/pt.json.d.ts +6 -1
- package/package.json +1 -1
- package/dist/DefaultInputs-DYKtphqY.js +0 -1701
- package/dist/editor/features/TreegeEditor/nodes/GroupNode.d.ts +0 -6
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultGroup.d.ts +0 -7
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultGroup.d.ts +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const NODE_TYPES: {
|
|
2
2
|
flow: import('react').MemoExoticComponent<(props: import('../features/TreegeEditor/nodes/TreegeNode').TreegeNodeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
3
|
-
group:
|
|
3
|
+
group: () => null;
|
|
4
4
|
input: import('react').MemoExoticComponent<(props: import('../features/TreegeEditor/nodes/TreegeNode').TreegeNodeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
5
5
|
ui: import('react').MemoExoticComponent<(props: import('../features/TreegeEditor/nodes/TreegeNode').TreegeNodeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
6
6
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
interface NodeWrapperProps extends PropsWithChildren {
|
|
3
|
-
inGroup: boolean;
|
|
4
3
|
isSubmit?: boolean;
|
|
5
4
|
}
|
|
6
|
-
declare const NodeWrapper: ({ children,
|
|
5
|
+
declare const NodeWrapper: ({ children, isSubmit }: NodeWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default NodeWrapper;
|
|
@@ -10,8 +10,11 @@ export interface LayoutOptions {
|
|
|
10
10
|
* `nodes` array with updated `position` fields. Nodes not yet measured by
|
|
11
11
|
* React Flow keep their current position.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* Groups are metadata only (rendered as colored badges on each child) and
|
|
14
|
+
* do not influence the layout. They are anchored at the origin (0, 0) and
|
|
15
|
+
* never moved, which means a child's `position` (parent-relative in React
|
|
16
|
+
* Flow) is numerically equal to its absolute canvas position — so we can
|
|
17
|
+
* lay out every non-group node in a single Dagre pass without converting
|
|
15
18
|
* coordinates.
|
|
16
19
|
*/
|
|
17
20
|
export declare const getLayoutedElements: (nodes: Node[], edges: Edge[], options?: LayoutOptions) => Node[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deterministic color for a group, derived from its id.
|
|
3
|
+
*
|
|
4
|
+
* Why HSL + inline style (rather than a Tailwind class):
|
|
5
|
+
* Tailwind purges classes at build time and can't synthesize `bg-{color}`
|
|
6
|
+
* from a runtime hash. Picking from a fixed palette would cap the number of
|
|
7
|
+
* distinguishable groups; HSL with a hashed hue gives effectively unlimited
|
|
8
|
+
* distinct, stable colors with no Tailwind-side configuration.
|
|
9
|
+
*
|
|
10
|
+
* Saturation/lightness are fixed (65% / 45%) so every group lands in the
|
|
11
|
+
* same readable, mid-contrast band on both light and dark themes — only the
|
|
12
|
+
* hue varies between groups.
|
|
13
|
+
*/
|
|
14
|
+
export declare const getGroupColor: (groupId?: string) => string;
|