candleview 1.0.6 → 1.0.8

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.
@@ -49763,11 +49763,6 @@ class Si {
49763
49763
  static loadData(t) {
49764
49764
  if (t.data && t.data.length > 0)
49765
49765
  return this.validateAndFormatData(t.data);
49766
- if (t.jsonFilePath) {
49767
- const e = this.loadFromLocalFile(t.jsonFilePath);
49768
- if (e.length > 0)
49769
- return e;
49770
- }
49771
49766
  if (t.url) {
49772
49767
  const e = this.loadFromUrl(t.url);
49773
49768
  if (e.length > 0)
@@ -49825,12 +49820,11 @@ class Si {
49825
49820
  static validateConfig(t) {
49826
49821
  return [
49827
49822
  t.data && t.data.length > 0,
49828
- !!t.jsonFilePath,
49829
49823
  !!t.url
49830
49824
  ].filter(Boolean).length !== 0;
49831
49825
  }
49832
49826
  static getActiveDataSource(t) {
49833
- return t.data && t.data.length > 0 ? "data" : t.jsonFilePath ? "jsonFilePath" : t.url ? "url" : "none";
49827
+ return t.data && t.data.length > 0 ? "data" : t.url ? "url" : "none";
49834
49828
  }
49835
49829
  }
49836
49830
  const qo = {
@@ -49961,7 +49955,6 @@ class Zo extends $.Component {
49961
49955
  try {
49962
49956
  this.setState({ dataLoadProgress: 10 });
49963
49957
  const r = Si.loadData({
49964
- jsonFilePath: this.props.jsonFilePath,
49965
49958
  data: this.props.data,
49966
49959
  url: this.props.url
49967
49960
  });
@@ -50303,7 +50296,7 @@ class Zo extends $.Component {
50303
50296
  }), this.updateChartTheme();
50304
50297
  return;
50305
50298
  }
50306
- if (t.data !== this.props.data || t.jsonFilePath !== this.props.jsonFilePath || t.url !== this.props.url) {
50299
+ if (t.data !== this.props.data || t.url !== this.props.url) {
50307
50300
  this.setState({
50308
50301
  isDataLoading: !0,
50309
50302
  dataLoadProgress: 0
@@ -50354,7 +50347,6 @@ class Zo extends $.Component {
50354
50347
  }
50355
50348
  refreshExternalData(t) {
50356
50349
  const e = Si.loadData({
50357
- jsonFilePath: this.props.jsonFilePath,
50358
50350
  data: this.props.data,
50359
50351
  url: this.props.url
50360
50352
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "candleview",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Chart engine in the financial field.",
5
5
  "keywords": [
6
6
  "Finance",
@@ -16,10 +16,17 @@
16
16
  "url": "https://github.com/0xhappyboy/candleview/issues"
17
17
  },
18
18
  "homepage": "https://github.com/0xhappyboy/candleview#readme",
19
- "main": "dist/index.cjs.js",
20
- "module": "dist/index.esm.js",
19
+ "main": "dist/index.js",
20
+ "module": "dist/index.mjs",
21
21
  "types": "dist/index.d.ts",
22
22
  "source": "src/index.tsx",
23
+ "exports": {
24
+ ".": {
25
+ "import": "./dist/index.mjs",
26
+ "require": "./dist/index.js",
27
+ "types": "./dist/index.d.ts"
28
+ }
29
+ },
23
30
  "engines": {
24
31
  "node": ">=16"
25
32
  },
@@ -40,13 +47,13 @@
40
47
  "deploy": "gh-pages -d example/build"
41
48
  },
42
49
  "peerDependencies": {
50
+ "lightweight-charts": "^5.0.9",
43
51
  "react": "^18.0.0 || ^19.0.0",
44
52
  "react-dom": "^18.0.0 || ^19.0.0"
45
53
  },
46
54
  "dependencies": {
47
55
  "lightweight-charts": "^5.0.9",
48
- "resize-observer-polyfill": "^1.5.1",
49
- "vite-plugin-dts": "^4.5.4"
56
+ "resize-observer-polyfill": "^1.5.1"
50
57
  },
51
58
  "devDependencies": {
52
59
  "@types/react": "^19.2.0",
@@ -63,7 +70,8 @@
63
70
  "react-dom": "^19.2.0",
64
71
  "react-scripts": "^5.0.1",
65
72
  "typescript": "^5.7.3",
66
- "vite": "^7.2.6"
73
+ "vite": "^7.2.6",
74
+ "vite-plugin-dts": "^4.5.4"
67
75
  },
68
76
  "files": [
69
77
  "dist"