@01.software/sdk 0.4.3-dev.1774339118317 → 0.4.3-dev.1774342104625
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/ui/flow.cjs +141 -88
- package/dist/ui/flow.cjs.map +1 -1
- package/dist/ui/flow.js +143 -95
- package/dist/ui/flow.js.map +1 -1
- package/package.json +3 -3
package/dist/ui/flow.js
CHANGED
|
@@ -39,19 +39,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
// src/ui/Flow/index.tsx
|
|
43
|
-
import React2 from "react";
|
|
44
|
-
import {
|
|
45
|
-
ReactFlow,
|
|
46
|
-
ReactFlowProvider,
|
|
47
|
-
Background,
|
|
48
|
-
Controls,
|
|
49
|
-
MiniMap,
|
|
50
|
-
MarkerType,
|
|
51
|
-
useReactFlow,
|
|
52
|
-
useStoreApi
|
|
53
|
-
} from "@xyflow/react";
|
|
54
|
-
|
|
55
42
|
// src/ui/Flow/types.ts
|
|
56
43
|
function isDynamicNode(node) {
|
|
57
44
|
return node.type === "dynamic";
|
|
@@ -444,7 +431,21 @@ function clearTemplateCache() {
|
|
|
444
431
|
componentCache.clear();
|
|
445
432
|
}
|
|
446
433
|
|
|
447
|
-
// src/ui/Flow/
|
|
434
|
+
// src/ui/Flow/FlowRenderer.tsx
|
|
435
|
+
import React5 from "react";
|
|
436
|
+
import {
|
|
437
|
+
ReactFlow,
|
|
438
|
+
ReactFlowProvider,
|
|
439
|
+
Background,
|
|
440
|
+
Controls,
|
|
441
|
+
MiniMap
|
|
442
|
+
} from "@xyflow/react";
|
|
443
|
+
|
|
444
|
+
// src/ui/Flow/node-types-factory.tsx
|
|
445
|
+
import React3 from "react";
|
|
446
|
+
|
|
447
|
+
// src/ui/Flow/node-renderers.tsx
|
|
448
|
+
import React2 from "react";
|
|
448
449
|
function sanitizeUrl(url) {
|
|
449
450
|
if (!url) return url;
|
|
450
451
|
try {
|
|
@@ -455,11 +456,6 @@ function sanitizeUrl(url) {
|
|
|
455
456
|
return void 0;
|
|
456
457
|
}
|
|
457
458
|
}
|
|
458
|
-
function toMarkerType(value) {
|
|
459
|
-
if (value === "arrow") return MarkerType.Arrow;
|
|
460
|
-
if (value === "arrowclosed") return MarkerType.ArrowClosed;
|
|
461
|
-
return void 0;
|
|
462
|
-
}
|
|
463
459
|
function renderFieldValue(key, val, fieldDef) {
|
|
464
460
|
if (val == null || val === "") return null;
|
|
465
461
|
const fieldType = fieldDef == null ? void 0 : fieldDef.fieldType;
|
|
@@ -611,13 +607,15 @@ function DefaultFrameNode({ data }) {
|
|
|
611
607
|
)
|
|
612
608
|
);
|
|
613
609
|
}
|
|
610
|
+
|
|
611
|
+
// src/ui/Flow/node-types-factory.tsx
|
|
614
612
|
function createNodeTypes(nodeRenderers, nodeTypeDefsMap, frameRenderer, nodeWrapper, renderNode) {
|
|
615
613
|
const types = {};
|
|
616
614
|
types.dynamic = ((props) => {
|
|
617
615
|
const d = props.data;
|
|
618
616
|
const typeDef = nodeTypeDefsMap == null ? void 0 : nodeTypeDefsMap.get(d.nodeTypeSlug);
|
|
619
617
|
const CustomRenderer = nodeRenderers == null ? void 0 : nodeRenderers[d.nodeTypeSlug];
|
|
620
|
-
const defaultRender = typeDef ? /* @__PURE__ */
|
|
618
|
+
const defaultRender = typeDef ? /* @__PURE__ */ React3.createElement(
|
|
621
619
|
EnhancedDynamicNode,
|
|
622
620
|
{
|
|
623
621
|
data: d,
|
|
@@ -625,7 +623,7 @@ function createNodeTypes(nodeRenderers, nodeTypeDefsMap, frameRenderer, nodeWrap
|
|
|
625
623
|
width: props.width,
|
|
626
624
|
height: props.height
|
|
627
625
|
}
|
|
628
|
-
) : /* @__PURE__ */
|
|
626
|
+
) : /* @__PURE__ */ React3.createElement(DefaultDynamicNode, __spreadValues({}, props));
|
|
629
627
|
const slotProps = {
|
|
630
628
|
id: props.id,
|
|
631
629
|
nodeTypeSlug: d.nodeTypeSlug,
|
|
@@ -637,14 +635,14 @@ function createNodeTypes(nodeRenderers, nodeTypeDefsMap, frameRenderer, nodeWrap
|
|
|
637
635
|
height: props.height,
|
|
638
636
|
defaultRender
|
|
639
637
|
};
|
|
640
|
-
let content = CustomRenderer ? /* @__PURE__ */
|
|
638
|
+
let content = CustomRenderer ? /* @__PURE__ */ React3.createElement(CustomRenderer, __spreadValues({}, slotProps)) : defaultRender;
|
|
641
639
|
if (renderNode) {
|
|
642
640
|
const result = renderNode(slotProps, content);
|
|
643
641
|
if (result !== null) content = result;
|
|
644
642
|
}
|
|
645
643
|
if (nodeWrapper) {
|
|
646
644
|
const Wrapper = nodeWrapper;
|
|
647
|
-
content = /* @__PURE__ */
|
|
645
|
+
content = /* @__PURE__ */ React3.createElement(
|
|
648
646
|
Wrapper,
|
|
649
647
|
{
|
|
650
648
|
id: props.id,
|
|
@@ -661,7 +659,7 @@ function createNodeTypes(nodeRenderers, nodeTypeDefsMap, frameRenderer, nodeWrap
|
|
|
661
659
|
types.frame = frameRenderer ? ((props) => {
|
|
662
660
|
const d = props.data;
|
|
663
661
|
const Renderer = frameRenderer;
|
|
664
|
-
return /* @__PURE__ */
|
|
662
|
+
return /* @__PURE__ */ React3.createElement(
|
|
665
663
|
Renderer,
|
|
666
664
|
{
|
|
667
665
|
id: props.id,
|
|
@@ -685,7 +683,7 @@ function createEdgeTypes(edgeRenderers, edgeTypeDefsMap) {
|
|
|
685
683
|
types[slug] = ((props) => {
|
|
686
684
|
var _a;
|
|
687
685
|
const def = edgeTypeDefsMap == null ? void 0 : edgeTypeDefsMap.get(slug);
|
|
688
|
-
return /* @__PURE__ */
|
|
686
|
+
return /* @__PURE__ */ React3.createElement(
|
|
689
687
|
Renderer,
|
|
690
688
|
{
|
|
691
689
|
id: props.id,
|
|
@@ -702,6 +700,57 @@ function createEdgeTypes(edgeRenderers, edgeTypeDefsMap) {
|
|
|
702
700
|
}
|
|
703
701
|
return types;
|
|
704
702
|
}
|
|
703
|
+
|
|
704
|
+
// src/ui/Flow/edge-styles.ts
|
|
705
|
+
import { MarkerType } from "@xyflow/react";
|
|
706
|
+
function toMarkerType(value) {
|
|
707
|
+
if (value === "arrow") return MarkerType.Arrow;
|
|
708
|
+
if (value === "arrowclosed") return MarkerType.ArrowClosed;
|
|
709
|
+
return void 0;
|
|
710
|
+
}
|
|
711
|
+
var EDGE_TYPE_MAP = {
|
|
712
|
+
step: "step",
|
|
713
|
+
smoothstep: "smoothstep",
|
|
714
|
+
bezier: "default",
|
|
715
|
+
default: "default"
|
|
716
|
+
};
|
|
717
|
+
function applyEdgeStyles(edges, edgeTypeDefsMap) {
|
|
718
|
+
if (!(edgeTypeDefsMap == null ? void 0 : edgeTypeDefsMap.size)) return edges;
|
|
719
|
+
return edges.map((edge) => {
|
|
720
|
+
var _a;
|
|
721
|
+
const slug = edge.edgeTypeSlug;
|
|
722
|
+
if (!slug) return edge;
|
|
723
|
+
const def = edgeTypeDefsMap.get(slug);
|
|
724
|
+
if (!def) return edge;
|
|
725
|
+
const styled = __spreadValues({}, edge);
|
|
726
|
+
if (!styled.type && def.lineStyle) {
|
|
727
|
+
styled.type = (_a = EDGE_TYPE_MAP[def.lineStyle]) != null ? _a : "default";
|
|
728
|
+
}
|
|
729
|
+
styled.style = __spreadValues(__spreadValues(__spreadValues({}, def.color ? { stroke: def.color } : void 0), def.strokeWidth ? { strokeWidth: def.strokeWidth } : void 0), edge.style);
|
|
730
|
+
if (styled.animated == null && def.animated) styled.animated = true;
|
|
731
|
+
if (!styled.markerStart) {
|
|
732
|
+
const startType = toMarkerType(def.markerStart);
|
|
733
|
+
if (startType) {
|
|
734
|
+
styled.markerStart = __spreadValues({
|
|
735
|
+
type: startType
|
|
736
|
+
}, def.color ? { color: def.color } : void 0);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
if (!styled.markerEnd) {
|
|
740
|
+
const endType = toMarkerType(def.markerEnd);
|
|
741
|
+
if (endType) {
|
|
742
|
+
styled.markerEnd = __spreadValues({
|
|
743
|
+
type: endType
|
|
744
|
+
}, def.color ? { color: def.color } : void 0);
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
return styled;
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
// src/ui/Flow/focus-handler.tsx
|
|
752
|
+
import React4 from "react";
|
|
753
|
+
import { useReactFlow, useStoreApi } from "@xyflow/react";
|
|
705
754
|
function clampViewport(vp, cw, ch, extent) {
|
|
706
755
|
const left = -vp.x / vp.zoom;
|
|
707
756
|
const right = (cw - vp.x) / vp.zoom;
|
|
@@ -724,18 +773,19 @@ function FocusHandler({
|
|
|
724
773
|
responsive,
|
|
725
774
|
extent,
|
|
726
775
|
clampBounds,
|
|
727
|
-
minZoomProp
|
|
776
|
+
minZoomProp,
|
|
777
|
+
onInitialFit
|
|
728
778
|
}) {
|
|
729
779
|
const { setViewport } = useReactFlow();
|
|
730
780
|
const store = useStoreApi();
|
|
731
|
-
const containerRef =
|
|
781
|
+
const containerRef = React4.useRef(null);
|
|
732
782
|
const boundsKey = `${bounds.x},${bounds.y},${bounds.width},${bounds.height}`;
|
|
733
|
-
const boundsRef =
|
|
783
|
+
const boundsRef = React4.useRef(bounds);
|
|
734
784
|
boundsRef.current = bounds;
|
|
735
|
-
const [containerSize, setContainerSize] =
|
|
736
|
-
const prevBoundsKeyRef =
|
|
737
|
-
const prevSizeRef =
|
|
738
|
-
|
|
785
|
+
const [containerSize, setContainerSize] = React4.useState({ w: 0, h: 0 });
|
|
786
|
+
const prevBoundsKeyRef = React4.useRef(null);
|
|
787
|
+
const prevSizeRef = React4.useRef({ w: 0, h: 0 });
|
|
788
|
+
React4.useEffect(() => {
|
|
739
789
|
const el = containerRef.current;
|
|
740
790
|
if (!el) return;
|
|
741
791
|
const observer = new ResizeObserver((entries) => {
|
|
@@ -747,7 +797,7 @@ function FocusHandler({
|
|
|
747
797
|
observer.observe(el);
|
|
748
798
|
return () => observer.disconnect();
|
|
749
799
|
}, []);
|
|
750
|
-
|
|
800
|
+
React4.useEffect(() => {
|
|
751
801
|
if (containerSize.w === 0 || containerSize.h === 0) return;
|
|
752
802
|
const prevKey = prevBoundsKeyRef.current;
|
|
753
803
|
const prevSize = prevSizeRef.current;
|
|
@@ -780,10 +830,24 @@ function FocusHandler({
|
|
|
780
830
|
store.getState().setMinZoom(minZoomProp != null ? minZoomProp : 0.5);
|
|
781
831
|
}
|
|
782
832
|
let vp = { x, y, zoom };
|
|
783
|
-
if (
|
|
784
|
-
|
|
833
|
+
if (isInitial || isBoundsChange) {
|
|
834
|
+
setViewport(vp, { duration: isInitial ? 0 : duration });
|
|
835
|
+
if (extent) {
|
|
836
|
+
const visW = containerSize.w / zoom;
|
|
837
|
+
const visH = containerSize.h / zoom;
|
|
838
|
+
onInitialFit == null ? void 0 : onInitialFit([
|
|
839
|
+
[Math.min(extent[0][0], cx - visW / 2), Math.min(extent[0][1], cy - visH / 2)],
|
|
840
|
+
[Math.max(extent[1][0], cx + visW / 2), Math.max(extent[1][1], cy + visH / 2)]
|
|
841
|
+
]);
|
|
842
|
+
} else {
|
|
843
|
+
onInitialFit == null ? void 0 : onInitialFit();
|
|
844
|
+
}
|
|
845
|
+
} else {
|
|
846
|
+
if (extent) {
|
|
847
|
+
vp = clampViewport(vp, containerSize.w, containerSize.h, extent);
|
|
848
|
+
}
|
|
849
|
+
setViewport(vp, { duration });
|
|
785
850
|
}
|
|
786
|
-
setViewport(vp, { duration });
|
|
787
851
|
}, [
|
|
788
852
|
boundsKey,
|
|
789
853
|
padding,
|
|
@@ -796,9 +860,10 @@ function FocusHandler({
|
|
|
796
860
|
setViewport,
|
|
797
861
|
clampBounds,
|
|
798
862
|
minZoomProp,
|
|
799
|
-
store
|
|
863
|
+
store,
|
|
864
|
+
onInitialFit
|
|
800
865
|
]);
|
|
801
|
-
return /* @__PURE__ */
|
|
866
|
+
return /* @__PURE__ */ React4.createElement(
|
|
802
867
|
"div",
|
|
803
868
|
{
|
|
804
869
|
ref: containerRef,
|
|
@@ -811,45 +876,8 @@ function FocusHandler({
|
|
|
811
876
|
}
|
|
812
877
|
);
|
|
813
878
|
}
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
smoothstep: "smoothstep",
|
|
817
|
-
bezier: "default",
|
|
818
|
-
default: "default"
|
|
819
|
-
};
|
|
820
|
-
function applyEdgeStyles(edges, edgeTypeDefsMap) {
|
|
821
|
-
if (!(edgeTypeDefsMap == null ? void 0 : edgeTypeDefsMap.size)) return edges;
|
|
822
|
-
return edges.map((edge) => {
|
|
823
|
-
var _a;
|
|
824
|
-
const slug = edge.edgeTypeSlug;
|
|
825
|
-
if (!slug) return edge;
|
|
826
|
-
const def = edgeTypeDefsMap.get(slug);
|
|
827
|
-
if (!def) return edge;
|
|
828
|
-
const styled = __spreadValues({}, edge);
|
|
829
|
-
if (!styled.type && def.lineStyle) {
|
|
830
|
-
styled.type = (_a = EDGE_TYPE_MAP[def.lineStyle]) != null ? _a : "default";
|
|
831
|
-
}
|
|
832
|
-
styled.style = __spreadValues(__spreadValues(__spreadValues({}, def.color ? { stroke: def.color } : void 0), def.strokeWidth ? { strokeWidth: def.strokeWidth } : void 0), edge.style);
|
|
833
|
-
if (styled.animated == null && def.animated) styled.animated = true;
|
|
834
|
-
if (!styled.markerStart) {
|
|
835
|
-
const startType = toMarkerType(def.markerStart);
|
|
836
|
-
if (startType) {
|
|
837
|
-
styled.markerStart = __spreadValues({
|
|
838
|
-
type: startType
|
|
839
|
-
}, def.color ? { color: def.color } : void 0);
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
if (!styled.markerEnd) {
|
|
843
|
-
const endType = toMarkerType(def.markerEnd);
|
|
844
|
-
if (endType) {
|
|
845
|
-
styled.markerEnd = __spreadValues({
|
|
846
|
-
type: endType
|
|
847
|
-
}, def.color ? { color: def.color } : void 0);
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
return styled;
|
|
851
|
-
});
|
|
852
|
-
}
|
|
879
|
+
|
|
880
|
+
// src/ui/Flow/FlowRenderer.tsx
|
|
853
881
|
function FlowRenderer({
|
|
854
882
|
data,
|
|
855
883
|
className,
|
|
@@ -886,16 +914,16 @@ function FlowRenderer({
|
|
|
886
914
|
minZoom: minZoomProp,
|
|
887
915
|
maxZoom: maxZoomProp
|
|
888
916
|
}) {
|
|
889
|
-
var _a;
|
|
890
|
-
const nodeTypeDefsMap =
|
|
917
|
+
var _a, _b;
|
|
918
|
+
const nodeTypeDefsMap = React5.useMemo(() => {
|
|
891
919
|
if (!(nodeTypeDefs == null ? void 0 : nodeTypeDefs.length)) return void 0;
|
|
892
920
|
return new Map(nodeTypeDefs.map((d) => [d.slug, d]));
|
|
893
921
|
}, [nodeTypeDefs]);
|
|
894
|
-
const edgeTypeDefsMap =
|
|
922
|
+
const edgeTypeDefsMap = React5.useMemo(() => {
|
|
895
923
|
if (!(edgeTypeDefs == null ? void 0 : edgeTypeDefs.length)) return void 0;
|
|
896
924
|
return new Map(edgeTypeDefs.map((d) => [d.slug, d]));
|
|
897
925
|
}, [edgeTypeDefs]);
|
|
898
|
-
const nodeTypes =
|
|
926
|
+
const nodeTypes = React5.useMemo(
|
|
899
927
|
() => createNodeTypes(
|
|
900
928
|
nodeRenderers,
|
|
901
929
|
nodeTypeDefsMap,
|
|
@@ -905,15 +933,15 @@ function FlowRenderer({
|
|
|
905
933
|
),
|
|
906
934
|
[nodeRenderers, nodeTypeDefsMap, frameRenderer, nodeWrapper, renderNode]
|
|
907
935
|
);
|
|
908
|
-
const customEdgeTypes =
|
|
936
|
+
const customEdgeTypes = React5.useMemo(
|
|
909
937
|
() => createEdgeTypes(edgeRenderers, edgeTypeDefsMap),
|
|
910
938
|
[edgeRenderers, edgeTypeDefsMap]
|
|
911
939
|
);
|
|
912
|
-
const mergedCSS =
|
|
940
|
+
const mergedCSS = React5.useMemo(() => {
|
|
913
941
|
if (!(nodeTypeDefs == null ? void 0 : nodeTypeDefs.length)) return "";
|
|
914
942
|
return nodeTypeDefs.filter((d) => d.customCSS).map((d) => d.customCSS).join("\n");
|
|
915
943
|
}, [nodeTypeDefs]);
|
|
916
|
-
const styledEdges =
|
|
944
|
+
const styledEdges = React5.useMemo(() => {
|
|
917
945
|
var _a2;
|
|
918
946
|
let edges = applyEdgeStyles((_a2 = data == null ? void 0 : data.edges) != null ? _a2 : [], edgeTypeDefsMap);
|
|
919
947
|
if (edgeRenderers) {
|
|
@@ -927,7 +955,7 @@ function FlowRenderer({
|
|
|
927
955
|
}
|
|
928
956
|
return edges;
|
|
929
957
|
}, [data == null ? void 0 : data.edges, edgeTypeDefsMap, edgeRenderers]);
|
|
930
|
-
const translateExtent =
|
|
958
|
+
const translateExtent = React5.useMemo(() => {
|
|
931
959
|
if (translateExtentProp) return translateExtentProp;
|
|
932
960
|
const es = clampBounds != null ? clampBounds : bounds;
|
|
933
961
|
if (!es) return void 0;
|
|
@@ -937,9 +965,28 @@ function FlowRenderer({
|
|
|
937
965
|
[es.x + es.width * (1 + ep), es.y + es.height * (1 + ep)]
|
|
938
966
|
];
|
|
939
967
|
}, [translateExtentProp, clampBounds, bounds, focusPadding]);
|
|
968
|
+
const boundsKey = bounds ? `${bounds.x},${bounds.y},${bounds.width},${bounds.height}` : "";
|
|
969
|
+
const extentReadyRef = React5.useRef(false);
|
|
970
|
+
const expandedExtentRef = React5.useRef(void 0);
|
|
971
|
+
const prevBoundsKeyRef = React5.useRef(boundsKey);
|
|
972
|
+
if (prevBoundsKeyRef.current !== boundsKey) {
|
|
973
|
+
prevBoundsKeyRef.current = boundsKey;
|
|
974
|
+
extentReadyRef.current = false;
|
|
975
|
+
expandedExtentRef.current = void 0;
|
|
976
|
+
}
|
|
977
|
+
const [, rerender] = React5.useReducer((x) => x + 1, 0);
|
|
978
|
+
const handleInitialFit = React5.useCallback(
|
|
979
|
+
(expandedExtent) => {
|
|
980
|
+
extentReadyRef.current = true;
|
|
981
|
+
expandedExtentRef.current = expandedExtent;
|
|
982
|
+
rerender();
|
|
983
|
+
},
|
|
984
|
+
[]
|
|
985
|
+
);
|
|
986
|
+
const activeExtent = !bounds || extentReadyRef.current ? (_a = expandedExtentRef.current) != null ? _a : translateExtent : void 0;
|
|
940
987
|
if (!data) return null;
|
|
941
988
|
const resolvedDefaultViewport = defaultViewportProp != null ? defaultViewportProp : !fitView && data.viewport ? data.viewport : void 0;
|
|
942
|
-
return /* @__PURE__ */
|
|
989
|
+
return /* @__PURE__ */ React5.createElement(ReactFlowProvider, null, /* @__PURE__ */ React5.createElement(
|
|
943
990
|
"div",
|
|
944
991
|
{
|
|
945
992
|
className,
|
|
@@ -949,16 +996,16 @@ function FlowRenderer({
|
|
|
949
996
|
background: "transparent"
|
|
950
997
|
}, style)
|
|
951
998
|
},
|
|
952
|
-
/* @__PURE__ */
|
|
999
|
+
/* @__PURE__ */ React5.createElement(
|
|
953
1000
|
ReactFlow,
|
|
954
1001
|
{
|
|
955
|
-
nodes: (
|
|
1002
|
+
nodes: (_b = data.nodes) != null ? _b : [],
|
|
956
1003
|
edges: styledEdges,
|
|
957
1004
|
nodeTypes,
|
|
958
1005
|
edgeTypes: customEdgeTypes,
|
|
959
1006
|
defaultViewport: resolvedDefaultViewport,
|
|
960
1007
|
fitView: bounds ? false : fitView,
|
|
961
|
-
translateExtent,
|
|
1008
|
+
translateExtent: activeExtent,
|
|
962
1009
|
onNodeClick,
|
|
963
1010
|
onNodeDoubleClick,
|
|
964
1011
|
onNodeContextMenu,
|
|
@@ -979,16 +1026,16 @@ function FlowRenderer({
|
|
|
979
1026
|
maxZoom: maxZoomProp,
|
|
980
1027
|
proOptions: { hideAttribution: true }
|
|
981
1028
|
},
|
|
982
|
-
mergedCSS && /* @__PURE__ */
|
|
983
|
-
background && /* @__PURE__ */
|
|
984
|
-
controls && /* @__PURE__ */
|
|
985
|
-
minimap && /* @__PURE__ */
|
|
1029
|
+
mergedCSS && /* @__PURE__ */ React5.createElement("style", { dangerouslySetInnerHTML: { __html: mergedCSS } }),
|
|
1030
|
+
background && /* @__PURE__ */ React5.createElement(Background, null),
|
|
1031
|
+
controls && /* @__PURE__ */ React5.createElement(Controls, null),
|
|
1032
|
+
minimap && /* @__PURE__ */ React5.createElement(
|
|
986
1033
|
MiniMap,
|
|
987
1034
|
{
|
|
988
1035
|
nodeColor: minimapNodeColor
|
|
989
1036
|
}
|
|
990
1037
|
),
|
|
991
|
-
bounds && /* @__PURE__ */
|
|
1038
|
+
bounds && /* @__PURE__ */ React5.createElement(
|
|
992
1039
|
FocusHandler,
|
|
993
1040
|
{
|
|
994
1041
|
bounds,
|
|
@@ -998,7 +1045,8 @@ function FlowRenderer({
|
|
|
998
1045
|
responsive: responsiveFit != null ? responsiveFit : true,
|
|
999
1046
|
extent: translateExtent,
|
|
1000
1047
|
clampBounds,
|
|
1001
|
-
minZoomProp
|
|
1048
|
+
minZoomProp,
|
|
1049
|
+
onInitialFit: handleInitialFit
|
|
1002
1050
|
}
|
|
1003
1051
|
),
|
|
1004
1052
|
children
|