Project Init

This commit is contained in:
Muluhabt
2026-05-29 15:23:46 +03:00
commit 2fbc557aac
67387 changed files with 6063341 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
import * as React from 'react';
import { createContext, useContext, useState } from 'react';
import { uniqueId } from '../util/DataUtils';
import { usePlotArea } from '../hooks';
var ClipPathIdContext = /*#__PURE__*/createContext(undefined);
/**
* Generates a unique clip path ID for use in SVG elements,
* and puts it in a context provider.
*
* To read the clip path ID, use the `useClipPathId` hook,
* or render `<ClipPath>` component which will automatically use the ID from this context.
*
* @param props children - React children to be wrapped by the provider
* @returns React Context Provider
*/
export var ClipPathProvider = _ref => {
var {
children
} = _ref;
var [clipPathId] = useState("".concat(uniqueId('recharts'), "-clip"));
var plotArea = usePlotArea();
if (plotArea == null) {
return null;
}
var {
x,
y,
width,
height
} = plotArea;
return /*#__PURE__*/React.createElement(ClipPathIdContext.Provider, {
value: clipPathId
}, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
id: clipPathId
}, /*#__PURE__*/React.createElement("rect", {
x: x,
y: y,
height: height,
width: width
}))), children);
};
export var useClipPathId = () => {
return useContext(ClipPathIdContext);
};

28
node_modules/recharts/es6/container/Layer.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
var _excluded = ["children", "className"];
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
import * as React from 'react';
import { clsx } from 'clsx';
import { svgPropertiesAndEvents } from '../util/svgPropertiesAndEvents';
/**
* Creates an SVG group element to group other SVG elements.
*
* Useful if you want to apply transformations or styles to a set of elements
* without affecting other elements in the SVG.
*
* @link https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/g
*/
export var Layer = /*#__PURE__*/React.forwardRef((props, ref) => {
var {
children,
className
} = props,
others = _objectWithoutProperties(props, _excluded);
var layerClass = clsx('recharts-layer', className);
return /*#__PURE__*/React.createElement("g", _extends({
className: layerClass
}, svgPropertiesAndEvents(others), {
ref: ref
}), children);
});

103
node_modules/recharts/es6/container/RootSurface.js generated vendored Normal file
View File

@@ -0,0 +1,103 @@
var _excluded = ["children"];
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
import * as React from 'react';
import { forwardRef } from 'react';
import { useChartHeight, useChartWidth } from '../context/chartLayoutContext';
import { useAccessibilityLayer } from '../context/accessibilityContext';
import { useIsPanorama } from '../context/PanoramaContext';
import { Surface } from './Surface';
import { useAppSelector } from '../state/hooks';
import { selectBrushDimensions } from '../state/selectors/brushSelectors';
import { isPositiveNumber } from '../util/isWellBehavedNumber';
import { AllZIndexPortals } from '../zIndex/ZIndexPortal';
var FULL_WIDTH_AND_HEIGHT = {
width: '100%',
height: '100%',
/*
* display: block is necessary here because the default for an SVG is display: inline,
* which in some browsers (Chrome) adds a little bit of extra space above and below the SVG
* to make space for the descender of letters like "g" and "y". This throws off the height calculation
* and causes the container to grow indefinitely on each render with responsive=true.
* Display: block removes that extra space.
*
* Interestingly, Firefox does not have this problem, but it doesn't hurt to add the style anyway.
*/
display: 'block'
};
var MainChartSurface = /*#__PURE__*/forwardRef((props, ref) => {
var width = useChartWidth();
var height = useChartHeight();
var hasAccessibilityLayer = useAccessibilityLayer();
if (!isPositiveNumber(width) || !isPositiveNumber(height)) {
return null;
}
var {
children,
otherAttributes,
title,
desc
} = props;
var tabIndex, role;
if (otherAttributes != null) {
if (typeof otherAttributes.tabIndex === 'number') {
tabIndex = otherAttributes.tabIndex;
} else {
tabIndex = hasAccessibilityLayer ? 0 : undefined;
}
if (typeof otherAttributes.role === 'string') {
role = otherAttributes.role;
} else {
role = hasAccessibilityLayer ? 'application' : undefined;
}
}
return /*#__PURE__*/React.createElement(Surface, _extends({}, otherAttributes, {
title: title,
desc: desc,
role: role,
tabIndex: tabIndex,
width: width,
height: height,
style: FULL_WIDTH_AND_HEIGHT,
ref: ref
}), children);
});
var BrushPanoramaSurface = _ref => {
var {
children
} = _ref;
var brushDimensions = useAppSelector(selectBrushDimensions);
if (!brushDimensions) {
return null;
}
var {
width,
height,
y,
x
} = brushDimensions;
return /*#__PURE__*/React.createElement(Surface, {
width: width,
height: height,
x: x,
y: y
}, children);
};
export var RootSurface = /*#__PURE__*/forwardRef((_ref2, ref) => {
var {
children
} = _ref2,
rest = _objectWithoutProperties(_ref2, _excluded);
var isPanorama = useIsPanorama();
if (isPanorama) {
return /*#__PURE__*/React.createElement(BrushPanoramaSurface, null, /*#__PURE__*/React.createElement(AllZIndexPortals, {
isPanorama: true
}, children));
}
return /*#__PURE__*/React.createElement(MainChartSurface, _extends({
ref: ref
}, rest), /*#__PURE__*/React.createElement(AllZIndexPortals, {
isPanorama: false
}, children));
});

43
node_modules/recharts/es6/container/Surface.js generated vendored Normal file
View File

@@ -0,0 +1,43 @@
var _excluded = ["children", "width", "height", "viewBox", "className", "style", "title", "desc"];
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
import * as React from 'react';
import { forwardRef } from 'react';
import { clsx } from 'clsx';
import { svgPropertiesAndEvents } from '../util/svgPropertiesAndEvents';
/**
* Renders an SVG element.
*
* All charts already include a Surface component, so you would not normally use this directly.
*
* @link https://developer.mozilla.org/en-US/docs/Web/SVG/Element/svg
*/
export var Surface = /*#__PURE__*/forwardRef((props, ref) => {
var {
children,
width,
height,
viewBox,
className,
style,
title,
desc
} = props,
others = _objectWithoutProperties(props, _excluded);
var svgView = viewBox || {
width,
height,
x: 0,
y: 0
};
var layerClass = clsx('recharts-surface', className);
return /*#__PURE__*/React.createElement("svg", _extends({}, svgPropertiesAndEvents(others), {
className: layerClass,
width: width,
height: height,
style: style,
viewBox: "".concat(svgView.x, " ").concat(svgView.y, " ").concat(svgView.width, " ").concat(svgView.height),
ref: ref
}), /*#__PURE__*/React.createElement("title", null, title), /*#__PURE__*/React.createElement("desc", null, desc), children);
});