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.
Files changed (32) hide show
  1. package/dist/DefaultInputs-7fXlu0uL.js +1734 -0
  2. package/dist/{ThemeContext-O482h1XZ.js → ThemeContext-CNsS53ku.js} +274 -217
  3. package/dist/editor/constants/nodeTypes.d.ts +1 -1
  4. package/dist/editor/features/TreegeEditor/nodes/components/NodeGroupBadge.d.ts +5 -0
  5. package/dist/editor/features/TreegeEditor/nodes/layout/NodeWrapper.d.ts +1 -2
  6. package/dist/editor/utils/dagreLayout.d.ts +5 -2
  7. package/dist/editor/utils/groupColor.d.ts +14 -0
  8. package/dist/{editor-DBCMmZtt.js → editor-DLKg7ri7.js} +1550 -1488
  9. package/dist/editor.js +2 -2
  10. package/dist/main.js +4 -4
  11. package/dist/renderer/features/TreegeRenderer/native/components/DefaultStep.d.ts +3 -0
  12. package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +12 -4
  13. package/dist/renderer/features/TreegeRenderer/web/components/DefaultStep.d.ts +3 -0
  14. package/dist/renderer/hooks/useRenderNode.d.ts +1 -3
  15. package/dist/renderer/index.d.ts +1 -1
  16. package/dist/renderer/index.native.d.ts +1 -1
  17. package/dist/renderer/types/renderer.d.ts +43 -5
  18. package/dist/renderer/utils/step.d.ts +27 -0
  19. package/dist/renderer-native.js +757 -685
  20. package/dist/renderer.js +3 -3
  21. package/dist/shared/locales/ar.json.d.ts +6 -1
  22. package/dist/shared/locales/de.json.d.ts +6 -1
  23. package/dist/shared/locales/en.json.d.ts +6 -1
  24. package/dist/shared/locales/es.json.d.ts +6 -1
  25. package/dist/shared/locales/fr.json.d.ts +6 -1
  26. package/dist/shared/locales/it.json.d.ts +6 -1
  27. package/dist/shared/locales/pt.json.d.ts +6 -1
  28. package/package.json +1 -1
  29. package/dist/DefaultInputs-DYKtphqY.js +0 -1701
  30. package/dist/editor/features/TreegeEditor/nodes/GroupNode.d.ts +0 -6
  31. package/dist/renderer/features/TreegeRenderer/native/components/DefaultGroup.d.ts +0 -7
  32. 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: import('react').MemoExoticComponent<({ data, id }: import('../features/TreegeEditor/nodes/GroupNode').GroupNodeProps) => import("react/jsx-runtime").JSX.Element>;
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
  };
@@ -0,0 +1,5 @@
1
+ interface NodeGroupBadgeProps {
2
+ groupId?: string;
3
+ }
4
+ declare const NodeGroupBadge: ({ groupId }: NodeGroupBadgeProps) => import("react/jsx-runtime").JSX.Element | null;
5
+ export default NodeGroupBadge;
@@ -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, inGroup, isSubmit }: NodeWrapperProps) => import("react/jsx-runtime").JSX.Element;
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
- * Respects group hierarchy: top-level nodes are laid out together, and
14
- * each group's children are laid out independently using parent-relative
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;