@multiplatform.one/node-graph 9.0.11 → 9.1.0
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/cjs/graphLayout/GraphDots.cjs +60 -0
- package/dist/cjs/graphLayout/GraphDots.native.js +66 -0
- package/dist/cjs/graphLayout/GraphDots.native.js.map +1 -0
- package/dist/cjs/graphLayout/GraphLayout.cjs +153 -0
- package/dist/cjs/graphLayout/GraphLayout.native.js +163 -0
- package/dist/cjs/graphLayout/GraphLayout.native.js.map +1 -0
- package/dist/cjs/graphLayout/GraphSvg.cjs +68 -0
- package/dist/cjs/graphLayout/GraphSvg.native.js +73 -0
- package/dist/cjs/graphLayout/GraphSvg.native.js.map +1 -0
- package/dist/cjs/graphLayout/GraphViewport.cjs +263 -0
- package/dist/cjs/graphLayout/GraphViewport.native.js +279 -0
- package/dist/cjs/graphLayout/GraphViewport.native.js.map +1 -0
- package/dist/cjs/graphLayout/index.cjs +51 -0
- package/dist/cjs/graphLayout/index.native.js +54 -0
- package/dist/cjs/graphLayout/index.native.js.map +1 -0
- package/dist/cjs/graphLayout/ogden.fixture.cjs +30 -0
- package/dist/cjs/graphLayout/ogden.fixture.native.js +33 -0
- package/dist/cjs/graphLayout/ogden.fixture.native.js.map +1 -0
- package/dist/cjs/graphLayout/plan.cjs +263 -0
- package/dist/cjs/graphLayout/plan.native.js +372 -0
- package/dist/cjs/graphLayout/plan.native.js.map +1 -0
- package/dist/cjs/graphLayout/viewMath.cjs +142 -0
- package/dist/cjs/graphLayout/viewMath.native.js +147 -0
- package/dist/cjs/graphLayout/viewMath.native.js.map +1 -0
- package/dist/esm/NodeGraph.native.js.map +1 -1
- package/dist/esm/bench/frameSampler.native.js.map +1 -1
- package/dist/esm/bench/generateGraph.native.js.map +1 -1
- package/dist/esm/diagnostics/GraphDiagnostics.native.js.map +1 -1
- package/dist/esm/diagnostics/LiveGraphDiagnostics.native.js.map +1 -1
- package/dist/esm/diagnostics/fromWire.native.js.map +1 -1
- package/dist/esm/diagnostics/lastError.native.js.map +1 -1
- package/dist/esm/diagnostics/types.native.js.map +1 -1
- package/dist/esm/diagnostics/useGraphDiagnostics.native.js.map +1 -1
- package/dist/esm/dom/GraphDomLayout.native.js.map +1 -1
- package/dist/esm/dom/boot.native.js.map +1 -1
- package/dist/esm/dom/wire.native.js.map +1 -1
- package/dist/esm/edges/GraphEdge.native.js.map +1 -1
- package/dist/esm/edges/edgeKinds.native.js.map +1 -1
- package/dist/esm/edges/edgePath.native.js.map +1 -1
- package/dist/esm/edges/edgeRoute.native.js.map +1 -1
- package/dist/esm/edges/edgeStyle.native.js.map +1 -1
- package/dist/esm/edges/useEdgeObstacles.native.js.map +1 -1
- package/dist/esm/graphLayout/GraphDots.mjs +35 -0
- package/dist/esm/graphLayout/GraphDots.mjs.map +1 -0
- package/dist/esm/graphLayout/GraphDots.native.js +38 -0
- package/dist/esm/graphLayout/GraphDots.native.js.map +1 -0
- package/dist/esm/graphLayout/GraphLayout.mjs +127 -0
- package/dist/esm/graphLayout/GraphLayout.mjs.map +1 -0
- package/dist/esm/graphLayout/GraphLayout.native.js +134 -0
- package/dist/esm/graphLayout/GraphLayout.native.js.map +1 -0
- package/dist/esm/graphLayout/GraphSvg.mjs +42 -0
- package/dist/esm/graphLayout/GraphSvg.mjs.map +1 -0
- package/dist/esm/graphLayout/GraphSvg.native.js +44 -0
- package/dist/esm/graphLayout/GraphSvg.native.js.map +1 -0
- package/dist/esm/graphLayout/GraphViewport.mjs +238 -0
- package/dist/esm/graphLayout/GraphViewport.mjs.map +1 -0
- package/dist/esm/graphLayout/GraphViewport.native.js +251 -0
- package/dist/esm/graphLayout/GraphViewport.native.js.map +1 -0
- package/dist/esm/graphLayout/index.mjs +7 -0
- package/dist/esm/graphLayout/index.mjs.map +1 -0
- package/dist/esm/graphLayout/index.native.js +7 -0
- package/dist/esm/graphLayout/index.native.js.map +1 -0
- package/dist/esm/graphLayout/ogden.fixture.mjs +4 -0
- package/dist/esm/graphLayout/ogden.fixture.mjs.map +1 -0
- package/dist/esm/graphLayout/ogden.fixture.native.js +4 -0
- package/dist/esm/graphLayout/ogden.fixture.native.js.map +1 -0
- package/dist/esm/graphLayout/plan.mjs +235 -0
- package/dist/esm/graphLayout/plan.mjs.map +1 -0
- package/dist/esm/graphLayout/plan.native.js +341 -0
- package/dist/esm/graphLayout/plan.native.js.map +1 -0
- package/dist/esm/graphLayout/viewMath.mjs +105 -0
- package/dist/esm/graphLayout/viewMath.mjs.map +1 -0
- package/dist/esm/graphLayout/viewMath.native.js +107 -0
- package/dist/esm/graphLayout/viewMath.native.js.map +1 -0
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/interaction/lassoIntercept.native.js.map +1 -1
- package/dist/esm/interaction/legalTargets.native.js.map +1 -1
- package/dist/esm/interaction/snapAlignment.native.js.map +1 -1
- package/dist/esm/interaction/snapChanges.native.js.map +1 -1
- package/dist/esm/interaction/spatialHash.native.js.map +1 -1
- package/dist/esm/interaction/useLassoSelect.native.js.map +1 -1
- package/dist/esm/knobs/KnobEnvelopeProvider.native.js.map +1 -1
- package/dist/esm/knobs/envelope.native.js.map +1 -1
- package/dist/esm/knobs/graphKnobs.native.js.map +1 -1
- package/dist/esm/knobs/useKnobEnvelope.native.js.map +1 -1
- package/dist/esm/layout/dagre.native.js.map +1 -1
- package/dist/esm/layout/layout.native.js.map +1 -1
- package/dist/esm/layout/runner.native.js.map +1 -1
- package/dist/esm/layout/structuredCloneShim.native.js.map +1 -1
- package/dist/esm/layout/types.native.js.map +1 -1
- package/dist/esm/layout/worker.entry.native.js.map +1 -1
- package/dist/esm/layout/worker.generated.native.js.map +1 -1
- package/dist/esm/model/commands.native.js.map +1 -1
- package/dist/esm/model/connect.native.js.map +1 -1
- package/dist/esm/model/document.native.js.map +1 -1
- package/dist/esm/model/history.native.js.map +1 -1
- package/dist/esm/model/index.native.js.map +1 -1
- package/dist/esm/model/schema.native.js.map +1 -1
- package/dist/esm/model/select.native.js.map +1 -1
- package/dist/esm/model/serialize.native.js.map +1 -1
- package/dist/esm/native/DomOnlyStory.native.js.map +1 -1
- package/dist/esm/native/GraphToolbar.native.js.map +1 -1
- package/dist/esm/native/domEntryRegistry.native.js.map +1 -1
- package/dist/esm/native/graphChildren.native.js.map +1 -1
- package/dist/esm/nodes/GraphNode.native.js.map +1 -1
- package/dist/esm/nodes/GraphPort.native.js.map +1 -1
- package/dist/esm/nodes/handleGeometry.native.js.map +1 -1
- package/dist/esm/nodes/lod.native.js.map +1 -1
- package/dist/esm/nodes/nodeMeasure.native.js.map +1 -1
- package/dist/esm/nodes/overviewNode.native.js.map +1 -1
- package/dist/esm/react-flow/ConnectionPuck.native.js.map +1 -1
- package/dist/esm/react-flow/GraphActions.native.js.map +1 -1
- package/dist/esm/react-flow/GraphCommandBridge.native.js.map +1 -1
- package/dist/esm/react-flow/GraphNodeHost.native.js.map +1 -1
- package/dist/esm/react-flow/GraphPaintProbe.native.js.map +1 -1
- package/dist/esm/react-flow/GraphZoomVar.native.js.map +1 -1
- package/dist/esm/react-flow/LassoOverlay.native.js.map +1 -1
- package/dist/esm/react-flow/NodeGraphWeb.native.js.map +1 -1
- package/dist/esm/react-flow/SnapGuides.native.js.map +1 -1
- package/dist/esm/react-flow/demoControlBody.native.js.map +1 -1
- package/dist/esm/react-flow/demoNodeBody.native.js.map +1 -1
- package/dist/esm/react-flow/fixtures.native.js.map +1 -1
- package/dist/esm/react-flow/flowAdapter.native.js.map +1 -1
- package/dist/esm/react-flow/graphHandle.native.js.map +1 -1
- package/dist/esm/react-flow/nodeCensus.native.js.map +1 -1
- package/dist/esm/react-flow/useGraphController.native.js.map +1 -1
- package/dist/esm/react-flow/xy.native.js.map +1 -1
- package/dist/esm/react-flow/xyPaths.native.js.map +1 -1
- package/dist/esm/theme/GraphFaces.native.js.map +1 -1
- package/dist/esm/theme/GraphVarsStyle.native.js.map +1 -1
- package/dist/esm/theme/faces.generated.native.js.map +1 -1
- package/dist/esm/theme/faces.native.js.map +1 -1
- package/dist/esm/theme/graphVars.native.js.map +1 -1
- package/dist/jsx/graphLayout/GraphDots.mjs +35 -0
- package/dist/jsx/graphLayout/GraphDots.mjs.map +1 -0
- package/dist/jsx/graphLayout/GraphDots.native.js +66 -0
- package/dist/jsx/graphLayout/GraphDots.native.js.map +1 -0
- package/dist/jsx/graphLayout/GraphLayout.mjs +127 -0
- package/dist/jsx/graphLayout/GraphLayout.mjs.map +1 -0
- package/dist/jsx/graphLayout/GraphLayout.native.js +163 -0
- package/dist/jsx/graphLayout/GraphLayout.native.js.map +1 -0
- package/dist/jsx/graphLayout/GraphSvg.mjs +42 -0
- package/dist/jsx/graphLayout/GraphSvg.mjs.map +1 -0
- package/dist/jsx/graphLayout/GraphSvg.native.js +73 -0
- package/dist/jsx/graphLayout/GraphSvg.native.js.map +1 -0
- package/dist/jsx/graphLayout/GraphViewport.mjs +238 -0
- package/dist/jsx/graphLayout/GraphViewport.mjs.map +1 -0
- package/dist/jsx/graphLayout/GraphViewport.native.js +279 -0
- package/dist/jsx/graphLayout/GraphViewport.native.js.map +1 -0
- package/dist/jsx/graphLayout/index.mjs +7 -0
- package/dist/jsx/graphLayout/index.mjs.map +1 -0
- package/dist/jsx/graphLayout/index.native.js +54 -0
- package/dist/jsx/graphLayout/index.native.js.map +1 -0
- package/dist/jsx/graphLayout/ogden.fixture.mjs +4 -0
- package/dist/jsx/graphLayout/ogden.fixture.mjs.map +1 -0
- package/dist/jsx/graphLayout/ogden.fixture.native.js +33 -0
- package/dist/jsx/graphLayout/ogden.fixture.native.js.map +1 -0
- package/dist/jsx/graphLayout/plan.mjs +235 -0
- package/dist/jsx/graphLayout/plan.mjs.map +1 -0
- package/dist/jsx/graphLayout/plan.native.js +372 -0
- package/dist/jsx/graphLayout/plan.native.js.map +1 -0
- package/dist/jsx/graphLayout/viewMath.mjs +105 -0
- package/dist/jsx/graphLayout/viewMath.mjs.map +1 -0
- package/dist/jsx/graphLayout/viewMath.native.js +147 -0
- package/dist/jsx/graphLayout/viewMath.native.js.map +1 -0
- package/graph-layout.ts +1 -0
- package/package.json +21 -6
- package/src/graphLayout/GraphDots.tsx +32 -0
- package/src/graphLayout/GraphLayout.stories.tsx +86 -0
- package/src/graphLayout/GraphLayout.tsx +152 -0
- package/src/graphLayout/GraphSvg.native.tsx +31 -0
- package/src/graphLayout/GraphSvg.tsx +45 -0
- package/src/graphLayout/GraphViewport.native.tsx +231 -0
- package/src/graphLayout/GraphViewport.tsx +246 -0
- package/src/graphLayout/index.ts +31 -0
- package/src/graphLayout/ogden.fixture.ts +120 -0
- package/src/graphLayout/plan.spec.ts +202 -0
- package/src/graphLayout/plan.ts +223 -0
- package/src/graphLayout/purity.spec.ts +67 -0
- package/src/graphLayout/viewMath.spec.ts +185 -0
- package/src/graphLayout/viewMath.ts +151 -0
- package/types/graphLayout/GraphDots.d.ts +9 -0
- package/types/graphLayout/GraphDots.d.ts.map +1 -0
- package/types/graphLayout/GraphLayout.d.ts +22 -0
- package/types/graphLayout/GraphLayout.d.ts.map +1 -0
- package/types/graphLayout/GraphSvg.d.ts +17 -0
- package/types/graphLayout/GraphSvg.d.ts.map +1 -0
- package/types/graphLayout/GraphSvg.native.d.ts +5 -0
- package/types/graphLayout/GraphSvg.native.d.ts.map +1 -0
- package/types/graphLayout/GraphViewport.d.ts +11 -0
- package/types/graphLayout/GraphViewport.d.ts.map +1 -0
- package/types/graphLayout/GraphViewport.native.d.ts +4 -0
- package/types/graphLayout/GraphViewport.native.d.ts.map +1 -0
- package/types/graphLayout/index.d.ts +11 -0
- package/types/graphLayout/index.d.ts.map +1 -0
- package/types/graphLayout/ogden.fixture.d.ts +3 -0
- package/types/graphLayout/ogden.fixture.d.ts.map +1 -0
- package/types/graphLayout/plan.d.ts +52 -0
- package/types/graphLayout/plan.d.ts.map +1 -0
- package/types/graphLayout/viewMath.d.ts +47 -0
- package/types/graphLayout/viewMath.d.ts.map +1 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var GraphDots_exports = {};
|
|
24
|
+
__export(GraphDots_exports, {
|
|
25
|
+
GraphDots: () => GraphDots
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(GraphDots_exports);
|
|
28
|
+
var import_react = require("react");
|
|
29
|
+
var import_tamagui = require("tamagui");
|
|
30
|
+
var import_GraphSvg = require("./GraphSvg.cjs");
|
|
31
|
+
var import_viewMath = require("./viewMath.cjs");
|
|
32
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
|
+
function GraphDots({
|
|
34
|
+
area,
|
|
35
|
+
pitch,
|
|
36
|
+
dot,
|
|
37
|
+
color
|
|
38
|
+
}) {
|
|
39
|
+
const path = (0, import_react.useMemo)(() => (0, import_viewMath.dotPath)(area, pitch), [area, pitch]);
|
|
40
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
41
|
+
position: "absolute",
|
|
42
|
+
left: area.x,
|
|
43
|
+
top: area.y,
|
|
44
|
+
width: area.width,
|
|
45
|
+
height: area.height,
|
|
46
|
+
pointerEvents: "none",
|
|
47
|
+
"aria-hidden": true,
|
|
48
|
+
testID: "graph-dots",
|
|
49
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_GraphSvg.GraphSvg, {
|
|
50
|
+
width: area.width,
|
|
51
|
+
height: area.height,
|
|
52
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_GraphSvg.GraphPath, {
|
|
53
|
+
d: path,
|
|
54
|
+
stroke: color,
|
|
55
|
+
strokeWidth: dot,
|
|
56
|
+
round: true
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var GraphDots_exports = {};
|
|
26
|
+
__export(GraphDots_exports, {
|
|
27
|
+
GraphDots: () => GraphDots
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(GraphDots_exports);
|
|
30
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
+
var import_react = require("react");
|
|
32
|
+
var import_tamagui = require("tamagui");
|
|
33
|
+
var import_GraphSvg = require("./GraphSvg.native.js");
|
|
34
|
+
var import_viewMath = require("./viewMath.native.js");
|
|
35
|
+
function GraphDots(param) {
|
|
36
|
+
var {
|
|
37
|
+
area,
|
|
38
|
+
pitch,
|
|
39
|
+
dot,
|
|
40
|
+
color
|
|
41
|
+
} = param;
|
|
42
|
+
var path = (0, import_react.useMemo)(function () {
|
|
43
|
+
return (0, import_viewMath.dotPath)(area, pitch);
|
|
44
|
+
}, [area, pitch]);
|
|
45
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
46
|
+
position: "absolute",
|
|
47
|
+
left: area.x,
|
|
48
|
+
top: area.y,
|
|
49
|
+
width: area.width,
|
|
50
|
+
height: area.height,
|
|
51
|
+
pointerEvents: "none",
|
|
52
|
+
"aria-hidden": true,
|
|
53
|
+
testID: "graph-dots",
|
|
54
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_GraphSvg.GraphSvg, {
|
|
55
|
+
width: area.width,
|
|
56
|
+
height: area.height,
|
|
57
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_GraphSvg.GraphPath, {
|
|
58
|
+
d: path,
|
|
59
|
+
stroke: color,
|
|
60
|
+
strokeWidth: dot,
|
|
61
|
+
round: true
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=GraphDots.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","GraphDots_exports","__export","GraphDots","module","exports","import_jsx_runtime","require","import_react","import_tamagui","import_GraphSvg","import_viewMath","param","area","pitch","dot","color","path","useMemo","dotPath","jsx","View","position","left","x","top","y","width","height","pointerEvents"],"sources":["../../../src/graphLayout/GraphDots.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,iBAAA;AAAAC,QAAA,CAAAD,iBAAA;EAAAE,SAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAwB,CAAAK,iBAAA;AACxB,IAAAK,kBAAqB,GAAAC,OAAA;AACrB,IAAAC,YAAA,GAAAD,OAAoC;AACpC,IAAAE,cAAA,GAAAF,OAAwB;AAwBhB,IAAAG,eAAA,GAAAH,OAAA;AAdD,IAAAI,eAAmB,GAAEJ,OAAM,uBAAY;AAC5C,SAAMJ,UAAOS,KAAA;EACb;IAAAC,IACE;IAAAC,KAAA;IAAAC,GAAA;IAAAC;EAAA,IAAAJ,KAAA;EAAA,IAACK,IAAA,OAAAT,YAAA,CAAAU,OAAA;IAAA,WAAAP,eAAA,CAAAQ,OAAA,EAAAN,IAAA,EAAAC,KAAA;EAAA,IACUD,IACT,EAAWC,KACX,CAAU;EACE,OACZ,eAAa,IAAAR,kBAAA,CAAAc,GAAA,EAAAX,cAAA,CAAAY,IAAA;IAAAC,QACb,YAAc;IAAAC,IACd,EAAAV,IAAA,CAAAW,CAAA;IAAWC,GACX,EAAAZ,IAAA,CAAOa,CAAA;IAAAC,KAEP,EAAAd,IAAA,CAAAc,KAAA;IAEAC,MAAA,EAAAf,IAAA,CAAAe,MAAA;IACFC,aAAA;IAEJ","ignoreList":[]}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var GraphLayout_exports = {};
|
|
24
|
+
__export(GraphLayout_exports, {
|
|
25
|
+
GraphLayout: () => GraphLayout,
|
|
26
|
+
resolveGraphDirection: () => resolveGraphDirection
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(GraphLayout_exports);
|
|
29
|
+
var import_theme = require("@multiplatform.one/theme");
|
|
30
|
+
var import_react = require("react");
|
|
31
|
+
var import_tamagui = require("tamagui");
|
|
32
|
+
var import_edgeStyle = require("../edges/edgeStyle.cjs");
|
|
33
|
+
var import_GraphSvg = require("./GraphSvg.cjs");
|
|
34
|
+
var import_GraphViewport = require("./GraphViewport.cjs");
|
|
35
|
+
var import_plan = require("./plan.cjs");
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
function resolveGraphDirection(direction, viewport) {
|
|
38
|
+
if (direction !== "auto") return direction;
|
|
39
|
+
return viewport.height > viewport.width ? "LR" : "TB";
|
|
40
|
+
}
|
|
41
|
+
function space(token) {
|
|
42
|
+
const value = (0, import_tamagui.getTokenValue)(token, "space");
|
|
43
|
+
return typeof value === "number" ? value : 0;
|
|
44
|
+
}
|
|
45
|
+
function useStrokeWidth() {
|
|
46
|
+
const preset = (0, import_theme.usePresetContext)();
|
|
47
|
+
const knobs = preset ? {
|
|
48
|
+
...preset.preset.knobs,
|
|
49
|
+
...preset.overrides
|
|
50
|
+
} : import_theme.defaultKnobs;
|
|
51
|
+
return (0, import_edgeStyle.edgeStrokeWidth)(knobs.borderWidth);
|
|
52
|
+
}
|
|
53
|
+
function useColour() {
|
|
54
|
+
const theme = (0, import_tamagui.useTheme)();
|
|
55
|
+
return token => {
|
|
56
|
+
const value = theme[(0, import_edgeStyle.themeTokenName)(token)]?.get?.();
|
|
57
|
+
return typeof value === "string" ? value : "currentColor";
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function GraphLayout({
|
|
61
|
+
nodes,
|
|
62
|
+
edges,
|
|
63
|
+
renderNode,
|
|
64
|
+
direction = "auto",
|
|
65
|
+
positions,
|
|
66
|
+
spacing,
|
|
67
|
+
dots = true,
|
|
68
|
+
frozen,
|
|
69
|
+
testID = "graph-layout"
|
|
70
|
+
}) {
|
|
71
|
+
const [viewport, setViewport] = (0, import_react.useState)({
|
|
72
|
+
width: 0,
|
|
73
|
+
height: 0
|
|
74
|
+
});
|
|
75
|
+
const strokeWidth = useStrokeWidth();
|
|
76
|
+
const colour = useColour();
|
|
77
|
+
const resolved = resolveGraphDirection(direction, viewport);
|
|
78
|
+
const nodeSpacing = space(spacing?.node ?? "$4");
|
|
79
|
+
const rankSpacing = space(spacing?.rank ?? "$8");
|
|
80
|
+
const margin = space("$4");
|
|
81
|
+
const pitch = space("$6");
|
|
82
|
+
const plan = (0, import_react.useMemo)(() => (0, import_plan.planGraphLayout)({
|
|
83
|
+
nodes,
|
|
84
|
+
edges,
|
|
85
|
+
direction: resolved,
|
|
86
|
+
nodeSpacing,
|
|
87
|
+
rankSpacing,
|
|
88
|
+
margin,
|
|
89
|
+
strokeWidth,
|
|
90
|
+
wrapWidth: viewport.width > 0 ? viewport.width - margin * 2 : void 0,
|
|
91
|
+
positions
|
|
92
|
+
}), [nodes, edges, resolved, nodeSpacing, rankSpacing, margin, strokeWidth, viewport.width, positions]);
|
|
93
|
+
const onLayout = event => {
|
|
94
|
+
const {
|
|
95
|
+
width,
|
|
96
|
+
height
|
|
97
|
+
} = event.nativeEvent.layout;
|
|
98
|
+
if (width !== viewport.width || height !== viewport.height) setViewport({
|
|
99
|
+
width,
|
|
100
|
+
height
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
const content = {
|
|
104
|
+
width: Math.max(plan.width, viewport.width),
|
|
105
|
+
height: Math.max(plan.height, viewport.height)
|
|
106
|
+
};
|
|
107
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
108
|
+
flex: 1,
|
|
109
|
+
onLayout,
|
|
110
|
+
testID,
|
|
111
|
+
"data-graph-direction": resolved,
|
|
112
|
+
children: viewport.width > 0 && viewport.height > 0 ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_GraphViewport.GraphViewport, {
|
|
113
|
+
content,
|
|
114
|
+
viewport,
|
|
115
|
+
dots: dots ? {
|
|
116
|
+
pitch,
|
|
117
|
+
dot: strokeWidth,
|
|
118
|
+
color: colour("$color6")
|
|
119
|
+
} : void 0,
|
|
120
|
+
frozen,
|
|
121
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.View, {
|
|
122
|
+
width: content.width,
|
|
123
|
+
height: content.height,
|
|
124
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_GraphSvg.GraphSvg, {
|
|
125
|
+
width: plan.width,
|
|
126
|
+
height: plan.height,
|
|
127
|
+
children: plan.edges.map(edge => {
|
|
128
|
+
const paint = colour(edge.stroke);
|
|
129
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_react.Fragment, {
|
|
130
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_GraphSvg.GraphPath, {
|
|
131
|
+
d: edge.d,
|
|
132
|
+
stroke: paint,
|
|
133
|
+
strokeWidth: edge.emphasis ? strokeWidth * 2 : strokeWidth,
|
|
134
|
+
dash: edge.dash
|
|
135
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_GraphSvg.GraphPath, {
|
|
136
|
+
d: edge.head,
|
|
137
|
+
fill: paint
|
|
138
|
+
})]
|
|
139
|
+
}, edge.id);
|
|
140
|
+
})
|
|
141
|
+
}), plan.nodes.map(node => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
142
|
+
position: "absolute",
|
|
143
|
+
left: node.x,
|
|
144
|
+
top: node.y,
|
|
145
|
+
width: node.width,
|
|
146
|
+
height: node.height,
|
|
147
|
+
testID: `graph-node-${node.id}`,
|
|
148
|
+
children: renderNode(node.id)
|
|
149
|
+
}, node.id))]
|
|
150
|
+
})
|
|
151
|
+
}) : null
|
|
152
|
+
});
|
|
153
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var GraphLayout_exports = {};
|
|
26
|
+
__export(GraphLayout_exports, {
|
|
27
|
+
GraphLayout: () => GraphLayout,
|
|
28
|
+
resolveGraphDirection: () => resolveGraphDirection
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(GraphLayout_exports);
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
+
var import_theme = require("@multiplatform.one/theme");
|
|
33
|
+
var import_react = require("react");
|
|
34
|
+
var import_tamagui = require("tamagui");
|
|
35
|
+
var import_edgeStyle = require("../edges/edgeStyle.native.js");
|
|
36
|
+
var import_GraphSvg = require("./GraphSvg.native.js");
|
|
37
|
+
var import_GraphViewport = require("./GraphViewport.native.js");
|
|
38
|
+
var import_plan = require("./plan.native.js");
|
|
39
|
+
function resolveGraphDirection(direction, viewport) {
|
|
40
|
+
if (direction !== "auto") return direction;
|
|
41
|
+
return viewport.height > viewport.width ? "LR" : "TB";
|
|
42
|
+
}
|
|
43
|
+
function space(token) {
|
|
44
|
+
var value = (0, import_tamagui.getTokenValue)(token, "space");
|
|
45
|
+
return typeof value === "number" ? value : 0;
|
|
46
|
+
}
|
|
47
|
+
function useStrokeWidth() {
|
|
48
|
+
var preset = (0, import_theme.usePresetContext)();
|
|
49
|
+
var knobs = preset ? {
|
|
50
|
+
...preset.preset.knobs,
|
|
51
|
+
...preset.overrides
|
|
52
|
+
} : import_theme.defaultKnobs;
|
|
53
|
+
return (0, import_edgeStyle.edgeStrokeWidth)(knobs.borderWidth);
|
|
54
|
+
}
|
|
55
|
+
function useColour() {
|
|
56
|
+
var theme = (0, import_tamagui.useTheme)();
|
|
57
|
+
return function (token) {
|
|
58
|
+
var _theme_themeTokenName_get, _theme_themeTokenName;
|
|
59
|
+
var value = (_theme_themeTokenName = theme[(0, import_edgeStyle.themeTokenName)(token)]) === null || _theme_themeTokenName === void 0 ? void 0 : (_theme_themeTokenName_get = _theme_themeTokenName.get) === null || _theme_themeTokenName_get === void 0 ? void 0 : _theme_themeTokenName_get.call(_theme_themeTokenName);
|
|
60
|
+
return typeof value === "string" ? value : "currentColor";
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function GraphLayout(param) {
|
|
64
|
+
var {
|
|
65
|
+
nodes,
|
|
66
|
+
edges,
|
|
67
|
+
renderNode,
|
|
68
|
+
direction = "auto",
|
|
69
|
+
positions,
|
|
70
|
+
spacing,
|
|
71
|
+
dots = true,
|
|
72
|
+
frozen,
|
|
73
|
+
testID = "graph-layout"
|
|
74
|
+
} = param;
|
|
75
|
+
var _ref, _ref1;
|
|
76
|
+
var [viewport, setViewport] = (0, import_react.useState)({
|
|
77
|
+
width: 0,
|
|
78
|
+
height: 0
|
|
79
|
+
});
|
|
80
|
+
var strokeWidth = useStrokeWidth();
|
|
81
|
+
var colour = useColour();
|
|
82
|
+
var resolved = resolveGraphDirection(direction, viewport);
|
|
83
|
+
var nodeSpacing = space((_ref = spacing === null || spacing === void 0 ? void 0 : spacing.node) !== null && _ref !== void 0 ? _ref : "$4");
|
|
84
|
+
var rankSpacing = space((_ref1 = spacing === null || spacing === void 0 ? void 0 : spacing.rank) !== null && _ref1 !== void 0 ? _ref1 : "$8");
|
|
85
|
+
var margin = space("$4");
|
|
86
|
+
var pitch = space("$6");
|
|
87
|
+
var plan = (0, import_react.useMemo)(function () {
|
|
88
|
+
return (0, import_plan.planGraphLayout)({
|
|
89
|
+
nodes,
|
|
90
|
+
edges,
|
|
91
|
+
direction: resolved,
|
|
92
|
+
nodeSpacing,
|
|
93
|
+
rankSpacing,
|
|
94
|
+
margin,
|
|
95
|
+
strokeWidth,
|
|
96
|
+
wrapWidth: viewport.width > 0 ? viewport.width - margin * 2 : void 0,
|
|
97
|
+
positions
|
|
98
|
+
});
|
|
99
|
+
}, [nodes, edges, resolved, nodeSpacing, rankSpacing, margin, strokeWidth, viewport.width, positions]);
|
|
100
|
+
var onLayout = function onLayout2(event) {
|
|
101
|
+
var {
|
|
102
|
+
width,
|
|
103
|
+
height
|
|
104
|
+
} = event.nativeEvent.layout;
|
|
105
|
+
if (width !== viewport.width || height !== viewport.height) setViewport({
|
|
106
|
+
width,
|
|
107
|
+
height
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
var content = {
|
|
111
|
+
width: Math.max(plan.width, viewport.width),
|
|
112
|
+
height: Math.max(plan.height, viewport.height)
|
|
113
|
+
};
|
|
114
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
115
|
+
flex: 1,
|
|
116
|
+
onLayout,
|
|
117
|
+
testID,
|
|
118
|
+
"data-graph-direction": resolved,
|
|
119
|
+
children: viewport.width > 0 && viewport.height > 0 ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_GraphViewport.GraphViewport, {
|
|
120
|
+
content,
|
|
121
|
+
viewport,
|
|
122
|
+
dots: dots ? {
|
|
123
|
+
pitch,
|
|
124
|
+
dot: strokeWidth,
|
|
125
|
+
color: colour("$color6")
|
|
126
|
+
} : void 0,
|
|
127
|
+
frozen,
|
|
128
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.View, {
|
|
129
|
+
width: content.width,
|
|
130
|
+
height: content.height,
|
|
131
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_GraphSvg.GraphSvg, {
|
|
132
|
+
width: plan.width,
|
|
133
|
+
height: plan.height,
|
|
134
|
+
children: plan.edges.map(function (edge) {
|
|
135
|
+
var paint = colour(edge.stroke);
|
|
136
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_react.Fragment, {
|
|
137
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_GraphSvg.GraphPath, {
|
|
138
|
+
d: edge.d,
|
|
139
|
+
stroke: paint,
|
|
140
|
+
strokeWidth: edge.emphasis ? strokeWidth * 2 : strokeWidth,
|
|
141
|
+
dash: edge.dash
|
|
142
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_GraphSvg.GraphPath, {
|
|
143
|
+
d: edge.head,
|
|
144
|
+
fill: paint
|
|
145
|
+
})]
|
|
146
|
+
}, edge.id);
|
|
147
|
+
})
|
|
148
|
+
}), plan.nodes.map(function (node) {
|
|
149
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
150
|
+
position: "absolute",
|
|
151
|
+
left: node.x,
|
|
152
|
+
top: node.y,
|
|
153
|
+
width: node.width,
|
|
154
|
+
height: node.height,
|
|
155
|
+
testID: `graph-node-${node.id}`,
|
|
156
|
+
children: renderNode(node.id)
|
|
157
|
+
}, node.id);
|
|
158
|
+
})]
|
|
159
|
+
})
|
|
160
|
+
}) : null
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=GraphLayout.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","GraphLayout_exports","__export","GraphLayout","resolveGraphDirection","module","exports","import_jsx_runtime","require","import_theme","import_react","import_tamagui","import_edgeStyle","import_GraphSvg","import_GraphViewport","import_plan","direction","viewport","height","width","space","token","getTokenValue","useStrokeWidth","preset","usePresetContext","knobs","overrides","defaultKnobs","edgeStrokeWidth","borderWidth","useColour","theme","useTheme","_theme_themeTokenName_get","_theme_themeTokenName","themeTokenName","get","call","param","nodes","edges","renderNode","positions","spacing","dots","frozen","testID","_ref","_ref1","setViewport","useState","strokeWidth","colour","resolved","nodeSpacing","node","rankSpacing","rank","margin","pitch","plan","useMemo","planGraphLayout","wrapWidth","onLayout","onLayout2","event","nativeEvent","layout","content","Math","max","jsx","View","flex","children","GraphViewport","dot","color","jsxs","GraphSvg","map","edge","paint","stroke","Fragment","GraphPath","d","emphasis","dash","head","fill","id"],"sources":["../../../src/graphLayout/GraphLayout.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AAA,EAAA1B,MAAA;MAAA,UACC;MAAQP,MAAA;MACA8B,QAAA,EACR,eAAa,EAAK,EAAArE,kBAAW,CAAAyE,IAAc,EAAArE,cAAI,CAAA+D,IAAA;QAAAvD,KAAA,EAAAmD,OACzC,CAAAnD,KAAK;QAAAD,MAAA,EAAAoD,OAAA,CAAApD,MAAA;QAAA0D,QACb,kBACA,IAAArE,kBAAA,CAAAkE,GAAA,EAAA5D,eAAC,CAAAoE,QAAA;UAAqC9D,KAPzB,EAAA0C,IAQf,CAAA1C,KAAA;UAGND,MAAA,EAAA2C,IAAA,CAAA3C,MAAA;UACC0D,QAAW,EAAAf,IAAK,CAAApB,KAAA,CACfyC,GAAA,WAAAC,IAAA;YAAC,IAAAC,KAAA,GAAA/B,MAAA,CAAA8B,IAAA,CAAAE,MAAA;YAAA,0BAAA9E,kBAAA,CAAAyE,IAAA,EAAAtE,YAAA,CAAA4E,QAAA;cAECV,QAAS,GACH,eAAK,IAAArE,kBAAA,CAAAkE,GAAA,EAAA5D,eAAA,CAAA0E,SAAA;gBACNC,CAAA,EAAKL,IAAA,CAAAK,CAAA;gBACHH,MAAK,EAAAD,KAAA;gBACJhC,WAAK,EAAA+B,IAAA,CAAAM,QAAA,GAAArC,WAAA,OAAAA,WAAA;gBACLsC,IAAA,EAAAP,IAAA,CAAAO;cAEP,IAAkB,mBAAAnF,kBAAA,CAAAkE,GAAA,EAAA5D,eAAA,CAAA0E,SAAA;gBARTC,CAAA,EAAAL,IAAA,CAAAQ,IAAA;gBAUbC,IAAA,EAAAR;cACH;YAGN,GAAAD,IAAA,CAAAU,EAAA;UAEJ","ignoreList":[]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var GraphSvg_exports = {};
|
|
24
|
+
__export(GraphSvg_exports, {
|
|
25
|
+
GraphPath: () => GraphPath,
|
|
26
|
+
GraphSvg: () => GraphSvg
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(GraphSvg_exports);
|
|
29
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
|
+
function GraphSvg({
|
|
31
|
+
width,
|
|
32
|
+
height,
|
|
33
|
+
children
|
|
34
|
+
}) {
|
|
35
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)("svg", {
|
|
36
|
+
width,
|
|
37
|
+
height,
|
|
38
|
+
"aria-hidden": true,
|
|
39
|
+
style: {
|
|
40
|
+
position: "absolute",
|
|
41
|
+
left: 0,
|
|
42
|
+
top: 0,
|
|
43
|
+
overflow: "visible",
|
|
44
|
+
pointerEvents: "none"
|
|
45
|
+
},
|
|
46
|
+
children
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function GraphPath({
|
|
50
|
+
d,
|
|
51
|
+
stroke,
|
|
52
|
+
strokeWidth,
|
|
53
|
+
dash,
|
|
54
|
+
fill,
|
|
55
|
+
round
|
|
56
|
+
}) {
|
|
57
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)("path", {
|
|
58
|
+
d,
|
|
59
|
+
style: {
|
|
60
|
+
fill: fill ?? "none",
|
|
61
|
+
stroke: stroke ?? "none",
|
|
62
|
+
strokeWidth,
|
|
63
|
+
strokeDasharray: dash,
|
|
64
|
+
strokeLinecap: round ? "round" : "butt",
|
|
65
|
+
strokeLinejoin: "round"
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var GraphSvg_exports = {};
|
|
26
|
+
__export(GraphSvg_exports, {
|
|
27
|
+
GraphPath: () => GraphPath,
|
|
28
|
+
GraphSvg: () => GraphSvg
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(GraphSvg_exports);
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
+
function GraphSvg(param) {
|
|
33
|
+
var {
|
|
34
|
+
width,
|
|
35
|
+
height,
|
|
36
|
+
children
|
|
37
|
+
} = param;
|
|
38
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)("svg", {
|
|
39
|
+
width,
|
|
40
|
+
height,
|
|
41
|
+
"aria-hidden": true,
|
|
42
|
+
style: {
|
|
43
|
+
position: "absolute",
|
|
44
|
+
left: 0,
|
|
45
|
+
top: 0,
|
|
46
|
+
overflow: "visible",
|
|
47
|
+
pointerEvents: "none"
|
|
48
|
+
},
|
|
49
|
+
children
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function GraphPath(param) {
|
|
53
|
+
var {
|
|
54
|
+
d,
|
|
55
|
+
stroke,
|
|
56
|
+
strokeWidth,
|
|
57
|
+
dash,
|
|
58
|
+
fill,
|
|
59
|
+
round
|
|
60
|
+
} = param;
|
|
61
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)("path", {
|
|
62
|
+
d,
|
|
63
|
+
style: {
|
|
64
|
+
fill: fill !== null && fill !== void 0 ? fill : "none",
|
|
65
|
+
stroke: stroke !== null && stroke !== void 0 ? stroke : "none",
|
|
66
|
+
strokeWidth,
|
|
67
|
+
strokeDasharray: dash,
|
|
68
|
+
strokeLinecap: round ? "round" : "butt",
|
|
69
|
+
strokeLinejoin: "round"
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=GraphSvg.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","GraphSvg_exports","__export","GraphPath","GraphSvg","module","exports","import_jsx_runtime","require","param","width","height","children","jsx","style","position","left","top","overflow","pointerEvents","d","stroke","strokeWidth","dash","fill","round","strokeDasharray","strokeLinecap","strokeLinejoin"],"sources":["../../../src/graphLayout/GraphSvg.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,gBAAA;AAAAC,QAAA,CAAAD,gBAAA;EAAAE,SAAA,EAAAA,CAAA,KAAAA,SAAA;EAAAC,QAAA,EAAAA,CAAA,KAAAA;AAAA;AAmBIC,MAAA,CAAAC,OAAA,GAAAV,YAAA,CAAAK,gBAAA;AAFG,IAAAM,kBAAoB,GAAAC,OAAO,oBAAmC;AACnE,SACEJ,SAAAK,KAAA;EAAA,IAAC;IAAAC,KAAA;IAAAC,MAAA;IAAAC;EAAA,IAAAH,KAAA;EAAA,0BAAAF,kBAAA,CAAAM,GAAA;IAAAH,KACC;IAAAC,MACA;IAAA,aACA,MAAW;IAAAG,KACX;MAECC,QAAA;MAAAC,IAAA;MACHC,GAAA;MAEJC,QAAA;MAEOC,aAAmB,EAAE;IAC1B;IACGP;EAAA;AAAA;AACC,SACAT,SAAOA,CAAAM,KAAA;EAAA;IACLW,CAAA;IAAAC,MAAM;IAAAC,WAAQ;IAAAC,IAAA;IAAAC,IAAA;IAAAC;EAAA,IAAAhB,KAAA;EAAA,OACd,eAAQ,CAAU,GAAAF,kBAAA,CAAAM,GAAA;IAAAO,CAAA;IAClBN,KACA;MAAiBU,IACjB,EAAAA,IAAA,SAAe,IAAAA,IAAQ,UAAU,IAAAA,IAAA;MAAAH,MACjC,EAAAA,MAAA,KAAgB,QAAAA,MAAA,cAAAA,MAAA;MAClBC,WAAA;MAAAI,eAAA,EAAAH,IAAA;MACFI,aAAA,EAAAF,KAAA;MAEJG,cAAA","ignoreList":[]}
|