@xyo-network/react-price-forecast-plugin 4.4.10 → 5.0.0-rc.1
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/types/Plugin.d.ts +3 -0
- package/dist/types/Plugin.d.ts.map +1 -0
- package/dist/types/components/DetailsBox.d.ts +9 -0
- package/dist/types/components/DetailsBox.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/lib/DataLineStyles.d.ts +5 -0
- package/dist/types/lib/DataLineStyles.d.ts.map +1 -0
- package/dist/types/lib/DataPointStyles.d.ts +8 -0
- package/dist/types/lib/DataPointStyles.d.ts.map +1 -0
- package/dist/types/lib/ForecastLineChartConfigBuilder.d.ts +40 -0
- package/dist/types/lib/ForecastLineChartConfigBuilder.d.ts.map +1 -0
- package/dist/types/lib/MockSourcePayloads.d.ts +18 -0
- package/dist/types/lib/MockSourcePayloads.d.ts.map +1 -0
- package/dist/types/lib/SourcePayloads.d.ts +28 -0
- package/dist/types/lib/SourcePayloads.d.ts.map +1 -0
- package/dist/types/lib/index.d.ts +4 -0
- package/dist/types/lib/index.d.ts.map +1 -0
- package/package.json +23 -21
- package/dist/browser/index.d.ts +0 -13
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAK5E,eAAO,MAAM,yBAAyB,EAAE,mBAMvC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import 'chartjs-adapter-luxon';
|
|
2
|
+
import type { FlexBoxProps } from '@xylabs/react-flexbox';
|
|
3
|
+
import type { Payload } from '@xyo-network/payload-model';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export interface PriceForecastDetailsBoxProps extends FlexBoxProps {
|
|
6
|
+
payload?: Payload;
|
|
7
|
+
}
|
|
8
|
+
export declare const PriceForecastDetailsBox: React.FC<PriceForecastDetailsBoxProps>;
|
|
9
|
+
//# sourceMappingURL=DetailsBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailsBox.d.ts","sourceRoot":"","sources":["../../../src/components/DetailsBox.tsx"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAA;AAI9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAgBzD,OAAO,KAAmB,MAAM,OAAO,CAAA;AAOvC,MAAM,WAAW,4BAA6B,SAAQ,YAAY;IAChE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAyB1E,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataLineStyles.d.ts","sourceRoot":"","sources":["../../../src/lib/DataLineStyles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM;;;CAG3C,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const DataPointStyles: (pointHoverBackgroundColor?: string) => {
|
|
2
|
+
pointHitRadius: number;
|
|
3
|
+
pointHoverBackgroundColor: string | undefined;
|
|
4
|
+
pointHoverRadius: number;
|
|
5
|
+
pointRadius: number;
|
|
6
|
+
pointStyle: string;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=DataPointStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataPointStyles.d.ts","sourceRoot":"","sources":["../../../src/lib/DataPointStyles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,GAAI,4BAA4B,MAAM;;;;;;CAMhE,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Theme } from '@mui/material';
|
|
2
|
+
import type { ForecastPayload } from '@xyo-network/diviner-forecasting-model';
|
|
3
|
+
import type { ChartData, ChartOptions, LegendOptions, ScaleChartOptions } from 'chart.js';
|
|
4
|
+
interface SourcePayloadConfig {
|
|
5
|
+
fetch: boolean;
|
|
6
|
+
sampleSize?: number;
|
|
7
|
+
}
|
|
8
|
+
interface ThemeColors {
|
|
9
|
+
dataSetColorPrimary: string;
|
|
10
|
+
dataSetColorSecondary: string;
|
|
11
|
+
gridColor: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class ForecastLineChartConfigBuilder {
|
|
14
|
+
private payload?;
|
|
15
|
+
data: ChartData<'line'>;
|
|
16
|
+
options: ChartOptions<'line'>;
|
|
17
|
+
themeColors: ThemeColors | undefined;
|
|
18
|
+
constructor(theme: Theme, payload?: ForecastPayload | undefined);
|
|
19
|
+
get forecastPayload(): ForecastPayload;
|
|
20
|
+
static create(theme: Theme, payload?: ForecastPayload, sourcePayloadConfig?: SourcePayloadConfig): Promise<ForecastLineChartConfigBuilder>;
|
|
21
|
+
build(includeSources?: boolean): Promise<this>;
|
|
22
|
+
buildData(includeSources?: boolean): Promise<this>;
|
|
23
|
+
buildOptions(): this;
|
|
24
|
+
refreshValues(): void;
|
|
25
|
+
protected generateLegend(): LegendOptions<"line">;
|
|
26
|
+
protected generateScales(): ScaleChartOptions<"line">["scales"];
|
|
27
|
+
protected generateTitle(): {
|
|
28
|
+
display: boolean;
|
|
29
|
+
text: string;
|
|
30
|
+
};
|
|
31
|
+
protected parseTheme(theme: Theme): {
|
|
32
|
+
dataSetColorPrimary: string;
|
|
33
|
+
dataSetColorSecondary: string;
|
|
34
|
+
gridColor: string;
|
|
35
|
+
};
|
|
36
|
+
private generateDataSetForecastData;
|
|
37
|
+
private generateDataSetSourcePayloads;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=ForecastLineChartConfigBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForecastLineChartConfigBuilder.d.ts","sourceRoot":"","sources":["../../../src/lib/ForecastLineChartConfigBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAC7E,OAAO,KAAK,EACV,SAAS,EAAgB,YAAY,EAAE,aAAa,EAAS,iBAAiB,EAC/E,MAAM,UAAU,CAAA;AAMjB,UAAU,mBAAmB;IAC3B,KAAK,EAAE,OAAO,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,UAAU,WAAW;IACnB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,qBAAqB,EAAE,MAAM,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB;AAOD,qBAAa,8BAA8B;IAQvC,OAAO,CAAC,OAAO,CAAC;IAPlB,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAmB;IAE1C,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,CAAmB;IAChD,WAAW,EAAE,WAAW,GAAG,SAAS,CAAA;gBAGlC,KAAK,EAAE,KAAK,EACJ,OAAO,CAAC,EAAE,eAAe,YAAA;IAKnC,IAAI,eAAe,oBAMlB;WAEY,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,eAAe,EAAE,mBAAmB,CAAC,EAAE,mBAAmB;IAUhG,KAAK,CAAC,cAAc,CAAC,EAAE,OAAO;IAM9B,SAAS,CAAC,cAAc,CAAC,EAAE,OAAO;IAoBxC,YAAY;IAUZ,aAAa;IAKb,SAAS,CAAC,cAAc,IAMjB,aAAa,CAAC,MAAM,CAAC;IAG5B,SAAS,CAAC,cAAc,IAQN,iBAAiB,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC;IAGrD,SAAS,CAAC,aAAa;;;;IASvB,SAAS,CAAC,UAAU,CAAC,KAAK,EAAE,KAAK;;;;;IASjC,OAAO,CAAC,2BAA2B;YAWrB,6BAA6B;CAS5C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const MockSourcePayloads: () => {
|
|
2
|
+
baseFee: number;
|
|
3
|
+
feePerGas: {
|
|
4
|
+
high: number;
|
|
5
|
+
low: number;
|
|
6
|
+
medium: number;
|
|
7
|
+
veryHigh: number;
|
|
8
|
+
};
|
|
9
|
+
priorityFeePerGas: {
|
|
10
|
+
high: number;
|
|
11
|
+
low: number;
|
|
12
|
+
medium: number;
|
|
13
|
+
veryHigh: number;
|
|
14
|
+
};
|
|
15
|
+
schema: string;
|
|
16
|
+
timestamp: number;
|
|
17
|
+
}[];
|
|
18
|
+
//# sourceMappingURL=MockSourcePayloads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MockSourcePayloads.d.ts","sourceRoot":"","sources":["../../../src/lib/MockSourcePayloads.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;GA0B9B,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Payload } from '@xyo-network/payload-model';
|
|
2
|
+
import type { Point } from 'chart.js';
|
|
3
|
+
export declare class SourcePayloads {
|
|
4
|
+
sourcePayloads: Payload[];
|
|
5
|
+
sourcePrices: Point[];
|
|
6
|
+
constructor(sourcePayloads: Payload[]);
|
|
7
|
+
get payloads(): Payload[];
|
|
8
|
+
static build(jsonPath: string): Promise<SourcePayloads>;
|
|
9
|
+
static fetchSourcePayloads(): Promise<{
|
|
10
|
+
baseFee: number;
|
|
11
|
+
feePerGas: {
|
|
12
|
+
high: number;
|
|
13
|
+
low: number;
|
|
14
|
+
medium: number;
|
|
15
|
+
veryHigh: number;
|
|
16
|
+
};
|
|
17
|
+
priorityFeePerGas: {
|
|
18
|
+
high: number;
|
|
19
|
+
low: number;
|
|
20
|
+
medium: number;
|
|
21
|
+
veryHigh: number;
|
|
22
|
+
};
|
|
23
|
+
schema: string;
|
|
24
|
+
timestamp: number;
|
|
25
|
+
}[]>;
|
|
26
|
+
jsonPathTraverser(obj: Payload, path: string[]): any;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=SourcePayloads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SourcePayloads.d.ts","sourceRoot":"","sources":["../../../src/lib/SourcePayloads.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAIrC,qBAAa,cAAc;IAGN,cAAc,EAAE,OAAO,EAAE;IAF5C,YAAY,EAAE,KAAK,EAAE,CAAK;gBAEP,cAAc,EAAE,OAAO,EAAE;IAE5C,IAAI,QAAQ,cAEX;WAEY,KAAK,CAAC,QAAQ,EAAE,MAAM;WAYtB,mBAAmB;;;;;;;;;;;;;;;;;IAKhC,iBAAiB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE;CAe/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAA;AACnD,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-price-forecast-plugin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-rc.1",
|
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
30
30
|
"browser": {
|
|
31
|
-
"types": "./dist/
|
|
31
|
+
"types": "./dist/types/index.d.ts",
|
|
32
32
|
"default": "./dist/browser/index.mjs"
|
|
33
33
|
},
|
|
34
|
-
"types": "./dist/
|
|
34
|
+
"types": "./dist/types/index.d.ts",
|
|
35
35
|
"default": "./dist/browser/index.mjs"
|
|
36
36
|
},
|
|
37
37
|
"./package.json": "./package.json"
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"lint-pkg": "npmPkgJsonLint ."
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@xylabs/react-async-effect": "^
|
|
47
|
-
"@xylabs/react-flexbox": "^
|
|
48
|
-
"@xyo-network/diviner-forecasting-model": "^3.9.
|
|
49
|
-
"@xyo-network/payload-model": "^3.9.
|
|
50
|
-
"@xyo-network/react-payload-plugin": "^
|
|
46
|
+
"@xylabs/react-async-effect": "^6.0.0-rc.2",
|
|
47
|
+
"@xylabs/react-flexbox": "^6.0.0-rc.2",
|
|
48
|
+
"@xyo-network/diviner-forecasting-model": "^3.9.35",
|
|
49
|
+
"@xyo-network/payload-model": "^3.9.35",
|
|
50
|
+
"@xyo-network/react-payload-plugin": "^5.0.0-rc.1",
|
|
51
51
|
"chart.js": "^4.4.8",
|
|
52
52
|
"chartjs-adapter-luxon": "^1.3.1",
|
|
53
53
|
"luxon": "^3.5.0",
|
|
@@ -56,16 +56,17 @@
|
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@emotion/react": "^11.14.0",
|
|
58
58
|
"@emotion/styled": "^11.14.0",
|
|
59
|
-
"@mui/icons-material": "^6.4.
|
|
60
|
-
"@mui/material": "^6.4.
|
|
61
|
-
"@mui/styles": "^6.4.
|
|
62
|
-
"@storybook/react": "^8.6.
|
|
63
|
-
"@
|
|
64
|
-
"@xylabs/
|
|
65
|
-
"react": "^
|
|
66
|
-
"react
|
|
67
|
-
"
|
|
68
|
-
"
|
|
59
|
+
"@mui/icons-material": "^6.4.7",
|
|
60
|
+
"@mui/material": "^6.4.7",
|
|
61
|
+
"@mui/styles": "^6.4.7",
|
|
62
|
+
"@storybook/react": "^8.6.4",
|
|
63
|
+
"@types/react": "^19.0.10",
|
|
64
|
+
"@xylabs/ts-scripts-yarn3": "^6.0.3",
|
|
65
|
+
"@xylabs/tsconfig-react": "^6.0.3",
|
|
66
|
+
"react": "^19.0.0",
|
|
67
|
+
"react-dom": "^19.0.0",
|
|
68
|
+
"storybook": "^8.6.4",
|
|
69
|
+
"typescript": "^5.8.2"
|
|
69
70
|
},
|
|
70
71
|
"peerDependencies": {
|
|
71
72
|
"@emotion/react": "^11",
|
|
@@ -73,11 +74,12 @@
|
|
|
73
74
|
"@mui/icons-material": "^6",
|
|
74
75
|
"@mui/material": "^6",
|
|
75
76
|
"@mui/styles": "^6",
|
|
76
|
-
"react": "^
|
|
77
|
-
"react-dom": "^
|
|
77
|
+
"react": "^19",
|
|
78
|
+
"react-dom": "^19"
|
|
78
79
|
},
|
|
79
80
|
"publishConfig": {
|
|
80
81
|
"access": "public"
|
|
81
82
|
},
|
|
82
|
-
"docs": "dist/docs.json"
|
|
83
|
+
"docs": "dist/docs.json",
|
|
84
|
+
"stableVersion": "4.4.11"
|
|
83
85
|
}
|
package/dist/browser/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FlexBoxProps } from '@xylabs/react-flexbox';
|
|
2
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { PayloadRenderPlugin } from '@xyo-network/react-payload-plugin';
|
|
5
|
-
|
|
6
|
-
interface PriceForecastDetailsBoxProps extends FlexBoxProps {
|
|
7
|
-
payload?: Payload;
|
|
8
|
-
}
|
|
9
|
-
declare const PriceForecastDetailsBox: React.FC<PriceForecastDetailsBoxProps>;
|
|
10
|
-
|
|
11
|
-
declare const PriceForecastRenderPlugin: PayloadRenderPlugin;
|
|
12
|
-
|
|
13
|
-
export { PriceForecastDetailsBox, type PriceForecastDetailsBoxProps, PriceForecastRenderPlugin };
|