victory-canvas 36.9.2-next.1 → 36.9.2

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/CHANGELOG.md CHANGED
@@ -1,18 +1,6 @@
1
1
  # victory-canvas
2
2
 
3
- ## 36.9.2-next.1
4
-
5
- ### Patch Changes
6
-
7
- - Updated dependencies [7da790934]
8
- - Updated dependencies [3f2da66e3]
9
- - Updated dependencies [c13308624]
10
- - Updated dependencies [7efd582cc]
11
- - Updated dependencies [9cdaf2c08]
12
- - Updated dependencies [f6f7cc515]
13
- - Updated dependencies [6e34169a5]
14
- - victory-core@36.9.2-next.1
15
- - victory-bar@36.9.2-next.1
3
+ ## 36.9.2
16
4
 
17
5
  ## 36.9.1
18
6
 
package/README.md CHANGED
@@ -38,6 +38,6 @@ This package currently exports:
38
38
  - `CanvasBar`
39
39
 
40
40
  Please visit our documentation site to read more about these components
41
- https://formidable.com/open-source/victory
41
+ https://commerce.nearform.com/open-source/victory
42
42
 
43
43
  To suggest an addition or correction to this documentation please see https://github.com/FormidableLabs/victory/blob/main/docs/src/content/docs
@@ -2857,6 +2857,7 @@ __webpack_require__.r(__webpack_exports__);
2857
2857
  /* harmony export */ "getRadius": () => (/* binding */ getRadius),
2858
2858
  /* harmony export */ "getRange": () => (/* binding */ getRange),
2859
2859
  /* harmony export */ "getStyles": () => (/* binding */ getStyles),
2860
+ /* harmony export */ "invert": () => (/* binding */ invert),
2860
2861
  /* harmony export */ "isFunction": () => (/* binding */ isFunction),
2861
2862
  /* harmony export */ "isHorizontal": () => (/* binding */ isHorizontal),
2862
2863
  /* harmony export */ "isNil": () => (/* binding */ isNil),
@@ -2907,6 +2908,18 @@ function getPolarRange(props, axis) {
2907
2908
  return [props.innerRadius || 0, getRadius(props)];
2908
2909
  } // Exported Functions
2909
2910
 
2911
+ /**
2912
+ * Creates an object composed of the inverted keys and values of object.
2913
+ * If object contains duplicate values, subsequent values overwrite property assignments of previous values.
2914
+ */
2915
+
2916
+
2917
+ function invert(original) {
2918
+ return Object.entries(original).reduce(function (acc, current) {
2919
+ acc[current[1]] = current[0];
2920
+ return acc;
2921
+ }, {});
2922
+ }
2910
2923
  /**
2911
2924
  * creates an object with some keys excluded
2912
2925
  * replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
@@ -2915,7 +2928,6 @@ function getPolarRange(props, axis) {
2915
2928
  * @returns {Object} new object with same properties as originalObject
2916
2929
  */
2917
2930
 
2918
-
2919
2931
  function omit(originalObject) {
2920
2932
  var ks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
2921
2933
  // code based on babel's _objectWithoutProperties
@@ -1,18 +1,18 @@
1
- import { VictoryBarAlignmentType, VictoryBarCornerRadiusObject } from "victory-bar";
2
- import { NumberOrCallback, VictoryCommonPrimitiveProps } from "victory-core";
3
- export interface CanvasBarProps extends VictoryCommonPrimitiveProps {
4
- alignment?: VictoryBarAlignmentType;
5
- barOffset?: number[];
6
- barRatio?: number;
7
- barWidth?: NumberOrCallback;
8
- cornerRadius?: NumberOrCallback | VictoryBarCornerRadiusObject;
9
- datum?: any;
10
- getPath?: (props: CanvasBarProps) => string;
11
- horizontal?: boolean;
12
- width?: number;
13
- x?: number;
14
- y?: number;
15
- y0?: number;
16
- }
17
- export declare const CanvasBar: (props: CanvasBarProps) => null;
1
+ import { VictoryBarAlignmentType, VictoryBarCornerRadiusObject } from "victory-bar";
2
+ import { NumberOrCallback, VictoryCommonPrimitiveProps } from "victory-core";
3
+ export interface CanvasBarProps extends VictoryCommonPrimitiveProps {
4
+ alignment?: VictoryBarAlignmentType;
5
+ barOffset?: number[];
6
+ barRatio?: number;
7
+ barWidth?: NumberOrCallback;
8
+ cornerRadius?: NumberOrCallback | VictoryBarCornerRadiusObject;
9
+ datum?: any;
10
+ getPath?: (props: CanvasBarProps) => string;
11
+ horizontal?: boolean;
12
+ width?: number;
13
+ x?: number;
14
+ y?: number;
15
+ y0?: number;
16
+ }
17
+ export declare const CanvasBar: (props: CanvasBarProps) => null;
18
18
  //# sourceMappingURL=canvas-bar.d.ts.map
@@ -1,9 +1,9 @@
1
- import { NumberOrCallback, StringOrCallback, VictoryCommonPrimitiveProps } from "victory-core";
2
- export interface CanvasCurveProps extends VictoryCommonPrimitiveProps {
3
- ariaLabel?: StringOrCallback;
4
- interpolation?: string | Function;
5
- openCurve?: boolean;
6
- tabIndex?: NumberOrCallback;
7
- }
8
- export declare const CanvasCurve: (props: CanvasCurveProps) => null;
1
+ import { NumberOrCallback, StringOrCallback, VictoryCommonPrimitiveProps } from "victory-core";
2
+ export interface CanvasCurveProps extends VictoryCommonPrimitiveProps {
3
+ ariaLabel?: StringOrCallback;
4
+ interpolation?: string | Function;
5
+ openCurve?: boolean;
6
+ tabIndex?: NumberOrCallback;
7
+ }
8
+ export declare const CanvasCurve: (props: CanvasCurveProps) => null;
9
9
  //# sourceMappingURL=canvas-curve.d.ts.map
@@ -1,14 +1,14 @@
1
- import React from "react";
2
- import { PaddingProps } from "victory-core";
3
- export interface CanvasGroupProps {
4
- children?: React.ReactNode | React.ReactNode[];
5
- clipWidth?: number;
6
- height?: number;
7
- padding?: PaddingProps;
8
- width?: number;
9
- }
10
- export declare const CanvasGroup: {
11
- (props: CanvasGroupProps): JSX.Element;
12
- role: string;
13
- };
1
+ import React from "react";
2
+ import { PaddingProps } from "victory-core";
3
+ export interface CanvasGroupProps {
4
+ children?: React.ReactNode | React.ReactNode[];
5
+ clipWidth?: number;
6
+ height?: number;
7
+ padding?: PaddingProps;
8
+ width?: number;
9
+ }
10
+ export declare const CanvasGroup: {
11
+ (props: CanvasGroupProps): JSX.Element;
12
+ role: string;
13
+ };
14
14
  //# sourceMappingURL=canvas-group.d.ts.map
@@ -1,11 +1,11 @@
1
- import { ScatterSymbolType, VictoryCommonPrimitiveProps } from "victory-core";
2
- export interface CanvasPointProps extends VictoryCommonPrimitiveProps {
3
- datum?: any;
4
- getPath?: (x: number, y: number, size: number) => string;
5
- size?: number | Function;
6
- symbol?: ScatterSymbolType | Function;
7
- x?: number;
8
- y?: number;
9
- }
10
- export declare const CanvasPoint: (props: CanvasPointProps) => null;
1
+ import { ScatterSymbolType, VictoryCommonPrimitiveProps } from "victory-core";
2
+ export interface CanvasPointProps extends VictoryCommonPrimitiveProps {
3
+ datum?: any;
4
+ getPath?: (x: number, y: number, size: number) => string;
5
+ size?: number | Function;
6
+ symbol?: ScatterSymbolType | Function;
7
+ x?: number;
8
+ y?: number;
9
+ }
10
+ export declare const CanvasPoint: (props: CanvasPointProps) => null;
11
11
  //# sourceMappingURL=canvas-point.d.ts.map
@@ -1,9 +1,9 @@
1
- import React from "react";
2
- export declare type CanvasContextValue = {
3
- canvasRef: React.RefObject<HTMLCanvasElement>;
4
- clear: (ctx: CanvasRenderingContext2D) => void;
5
- clip: (ctx: CanvasRenderingContext2D) => void;
6
- };
7
- export declare const CanvasContext: React.Context<CanvasContextValue | undefined>;
8
- export declare const useCanvasContext: () => CanvasContextValue;
1
+ import React from "react";
2
+ export declare type CanvasContextValue = {
3
+ canvasRef: React.RefObject<HTMLCanvasElement>;
4
+ clear: (ctx: CanvasRenderingContext2D) => void;
5
+ clip: (ctx: CanvasRenderingContext2D) => void;
6
+ };
7
+ export declare const CanvasContext: React.Context<CanvasContextValue | undefined>;
8
+ export declare const useCanvasContext: () => CanvasContextValue;
9
9
  //# sourceMappingURL=use-canvas-context.d.ts.map
package/es/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export * from "./canvas-bar";
2
- export * from "./canvas-group";
3
- export * from "./canvas-curve";
4
- export * from "./canvas-point";
5
- export { useCanvasContext } from "./hooks/use-canvas-context";
1
+ export * from "./canvas-bar";
2
+ export * from "./canvas-group";
3
+ export * from "./canvas-curve";
4
+ export * from "./canvas-point";
5
+ export { useCanvasContext } from "./hooks/use-canvas-context";
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1,18 +1,18 @@
1
- import { VictoryBarAlignmentType, VictoryBarCornerRadiusObject } from "victory-bar";
2
- import { NumberOrCallback, VictoryCommonPrimitiveProps } from "victory-core";
3
- export interface CanvasBarProps extends VictoryCommonPrimitiveProps {
4
- alignment?: VictoryBarAlignmentType;
5
- barOffset?: number[];
6
- barRatio?: number;
7
- barWidth?: NumberOrCallback;
8
- cornerRadius?: NumberOrCallback | VictoryBarCornerRadiusObject;
9
- datum?: any;
10
- getPath?: (props: CanvasBarProps) => string;
11
- horizontal?: boolean;
12
- width?: number;
13
- x?: number;
14
- y?: number;
15
- y0?: number;
16
- }
17
- export declare const CanvasBar: (props: CanvasBarProps) => null;
1
+ import { VictoryBarAlignmentType, VictoryBarCornerRadiusObject } from "victory-bar";
2
+ import { NumberOrCallback, VictoryCommonPrimitiveProps } from "victory-core";
3
+ export interface CanvasBarProps extends VictoryCommonPrimitiveProps {
4
+ alignment?: VictoryBarAlignmentType;
5
+ barOffset?: number[];
6
+ barRatio?: number;
7
+ barWidth?: NumberOrCallback;
8
+ cornerRadius?: NumberOrCallback | VictoryBarCornerRadiusObject;
9
+ datum?: any;
10
+ getPath?: (props: CanvasBarProps) => string;
11
+ horizontal?: boolean;
12
+ width?: number;
13
+ x?: number;
14
+ y?: number;
15
+ y0?: number;
16
+ }
17
+ export declare const CanvasBar: (props: CanvasBarProps) => null;
18
18
  //# sourceMappingURL=canvas-bar.d.ts.map
@@ -1,9 +1,9 @@
1
- import { NumberOrCallback, StringOrCallback, VictoryCommonPrimitiveProps } from "victory-core";
2
- export interface CanvasCurveProps extends VictoryCommonPrimitiveProps {
3
- ariaLabel?: StringOrCallback;
4
- interpolation?: string | Function;
5
- openCurve?: boolean;
6
- tabIndex?: NumberOrCallback;
7
- }
8
- export declare const CanvasCurve: (props: CanvasCurveProps) => null;
1
+ import { NumberOrCallback, StringOrCallback, VictoryCommonPrimitiveProps } from "victory-core";
2
+ export interface CanvasCurveProps extends VictoryCommonPrimitiveProps {
3
+ ariaLabel?: StringOrCallback;
4
+ interpolation?: string | Function;
5
+ openCurve?: boolean;
6
+ tabIndex?: NumberOrCallback;
7
+ }
8
+ export declare const CanvasCurve: (props: CanvasCurveProps) => null;
9
9
  //# sourceMappingURL=canvas-curve.d.ts.map
@@ -1,14 +1,14 @@
1
- import React from "react";
2
- import { PaddingProps } from "victory-core";
3
- export interface CanvasGroupProps {
4
- children?: React.ReactNode | React.ReactNode[];
5
- clipWidth?: number;
6
- height?: number;
7
- padding?: PaddingProps;
8
- width?: number;
9
- }
10
- export declare const CanvasGroup: {
11
- (props: CanvasGroupProps): JSX.Element;
12
- role: string;
13
- };
1
+ import React from "react";
2
+ import { PaddingProps } from "victory-core";
3
+ export interface CanvasGroupProps {
4
+ children?: React.ReactNode | React.ReactNode[];
5
+ clipWidth?: number;
6
+ height?: number;
7
+ padding?: PaddingProps;
8
+ width?: number;
9
+ }
10
+ export declare const CanvasGroup: {
11
+ (props: CanvasGroupProps): JSX.Element;
12
+ role: string;
13
+ };
14
14
  //# sourceMappingURL=canvas-group.d.ts.map
@@ -1,11 +1,11 @@
1
- import { ScatterSymbolType, VictoryCommonPrimitiveProps } from "victory-core";
2
- export interface CanvasPointProps extends VictoryCommonPrimitiveProps {
3
- datum?: any;
4
- getPath?: (x: number, y: number, size: number) => string;
5
- size?: number | Function;
6
- symbol?: ScatterSymbolType | Function;
7
- x?: number;
8
- y?: number;
9
- }
10
- export declare const CanvasPoint: (props: CanvasPointProps) => null;
1
+ import { ScatterSymbolType, VictoryCommonPrimitiveProps } from "victory-core";
2
+ export interface CanvasPointProps extends VictoryCommonPrimitiveProps {
3
+ datum?: any;
4
+ getPath?: (x: number, y: number, size: number) => string;
5
+ size?: number | Function;
6
+ symbol?: ScatterSymbolType | Function;
7
+ x?: number;
8
+ y?: number;
9
+ }
10
+ export declare const CanvasPoint: (props: CanvasPointProps) => null;
11
11
  //# sourceMappingURL=canvas-point.d.ts.map
@@ -1,9 +1,9 @@
1
- import React from "react";
2
- export declare type CanvasContextValue = {
3
- canvasRef: React.RefObject<HTMLCanvasElement>;
4
- clear: (ctx: CanvasRenderingContext2D) => void;
5
- clip: (ctx: CanvasRenderingContext2D) => void;
6
- };
7
- export declare const CanvasContext: React.Context<CanvasContextValue | undefined>;
8
- export declare const useCanvasContext: () => CanvasContextValue;
1
+ import React from "react";
2
+ export declare type CanvasContextValue = {
3
+ canvasRef: React.RefObject<HTMLCanvasElement>;
4
+ clear: (ctx: CanvasRenderingContext2D) => void;
5
+ clip: (ctx: CanvasRenderingContext2D) => void;
6
+ };
7
+ export declare const CanvasContext: React.Context<CanvasContextValue | undefined>;
8
+ export declare const useCanvasContext: () => CanvasContextValue;
9
9
  //# sourceMappingURL=use-canvas-context.d.ts.map
package/lib/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export * from "./canvas-bar";
2
- export * from "./canvas-group";
3
- export * from "./canvas-curve";
4
- export * from "./canvas-point";
5
- export { useCanvasContext } from "./hooks/use-canvas-context";
1
+ export * from "./canvas-bar";
2
+ export * from "./canvas-group";
3
+ export * from "./canvas-curve";
4
+ export * from "./canvas-point";
5
+ export { useCanvasContext } from "./hooks/use-canvas-context";
6
6
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-canvas",
3
- "version": "36.9.2-next.1",
3
+ "version": "36.9.2",
4
4
  "description": "HTML5 Canvas Components for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -12,7 +12,7 @@
12
12
  "type": "git",
13
13
  "url": "https://github.com/FormidableLabs/victory"
14
14
  },
15
- "homepage": "https://formidable.com/open-source/victory",
15
+ "homepage": "https://commerce.nearform.com/open-source/victory",
16
16
  "sideEffects": false,
17
17
  "main": "lib/index.js",
18
18
  "module": "es/index.js",
@@ -21,12 +21,15 @@
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
23
  "lodash": "^4.17.19",
24
- "victory-bar": "^36.9.2-next.1",
25
- "victory-core": "^36.9.2-next.1"
24
+ "victory-bar": "^36.9.2",
25
+ "victory-core": "^36.9.2"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": ">=16.6.0"
29
29
  },
30
+ "publishConfig": {
31
+ "provenance": true
32
+ },
30
33
  "wireit": {
31
34
  "### THESE WIREIT CONFIGS ARE GENERATED ####": {},
32
35
  "### DO NOT MODIFY THESE MANUALLY ####": {},