@candleview/core 2.9.8 → 3.0.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/index.mjs CHANGED
@@ -723,7 +723,7 @@ class ua {
723
723
  }
724
724
  class ga {
725
725
  constructor() {
726
- this.rootEl = null, this.chartContainerEl = null, this.topPanelContainer = null, this.leftPanelContainer = null;
726
+ this.rootEl = null, this.chartContainerEl = null, this.technologyPanelContainer = null, this.drawingPanelContainer = null;
727
727
  }
728
728
  create(t, e) {
729
729
  t.innerHTML = "", t.style.cssText = "position:relative;width:100%;height:100%;overflow:hidden;";
@@ -752,9 +752,9 @@ class ga {
752
752
  overflow:hidden;
753
753
  `, this.rootEl.addEventListener("contextmenu", (a) => {
754
754
  a.preventDefault();
755
- }), this.topPanelContainer = document.createElement("div"), this.topPanelContainer.className = "candleview-top-panel-container", this.topPanelContainer.style.cssText = "flex-shrink:0;position:relative;";
755
+ }), this.technologyPanelContainer = document.createElement("div"), this.technologyPanelContainer.className = "candleview-top-panel-container", this.technologyPanelContainer.style.cssText = "flex-shrink:0;position:relative;";
756
756
  const s = document.createElement("div");
757
- s.style.cssText = "display:flex;flex:1;min-height:0;overflow:hidden;", this.leftPanelContainer = document.createElement("div"), this.leftPanelContainer.className = "candleview-left-panel-container", this.leftPanelContainer.style.cssText = "flex-shrink:0;", this.chartContainerEl = document.createElement("div"), this.chartContainerEl.className = "candleview-chart-container", this.chartContainerEl.style.cssText = "flex:1;min-width:0;min-height:0;position:relative;", s.appendChild(this.leftPanelContainer), s.appendChild(this.chartContainerEl), this.rootEl.appendChild(this.topPanelContainer), this.rootEl.appendChild(s), t.appendChild(this.rootEl);
757
+ s.style.cssText = "display:flex;flex:1;min-height:0;overflow:hidden;", this.drawingPanelContainer = document.createElement("div"), this.drawingPanelContainer.className = "candleview-left-panel-container", this.drawingPanelContainer.style.cssText = "flex-shrink:0;", this.chartContainerEl = document.createElement("div"), this.chartContainerEl.className = "candleview-chart-container", this.chartContainerEl.style.cssText = "flex:1;min-width:0;min-height:0;position:relative;", s.appendChild(this.drawingPanelContainer), s.appendChild(this.chartContainerEl), this.rootEl.appendChild(this.technologyPanelContainer), this.rootEl.appendChild(s), t.appendChild(this.rootEl);
758
758
  }
759
759
  getRootEl() {
760
760
  return this.rootEl;
@@ -762,15 +762,15 @@ class ga {
762
762
  getChartContainerEl() {
763
763
  return this.chartContainerEl;
764
764
  }
765
- getTopPanelContainer() {
766
- return this.topPanelContainer;
765
+ getTechnologyPanelContainer() {
766
+ return this.technologyPanelContainer;
767
767
  }
768
- getLeftPanelContainer() {
769
- return this.leftPanelContainer;
768
+ getDrawingPanelContainer() {
769
+ return this.drawingPanelContainer;
770
770
  }
771
771
  destroy() {
772
772
  const t = document.getElementById("candleview-no-select");
773
- t && t.remove(), this.rootEl?.remove(), this.rootEl = null, this.chartContainerEl = null, this.topPanelContainer = null, this.leftPanelContainer = null;
773
+ t && t.remove(), this.rootEl?.remove(), this.rootEl = null, this.chartContainerEl = null, this.technologyPanelContainer = null, this.drawingPanelContainer = null;
774
774
  }
775
775
  }
776
776
  function pa(M, t) {
@@ -57386,8 +57386,8 @@ class zc {
57386
57386
  this.initTopPanel(), this.initLeftPanel();
57387
57387
  }
57388
57388
  initTopPanel() {
57389
- this.config.topPanelContainer && (this.topPanel = new Wc({
57390
- container: this.config.topPanelContainer,
57389
+ this.config.technologyPanelContainer && (this.topPanel = new Wc({
57390
+ container: this.config.technologyPanelContainer,
57391
57391
  rootContainer: this.config.rootContainer,
57392
57392
  theme: this.config.theme,
57393
57393
  i18n: this.config.i18n,
@@ -57416,14 +57416,14 @@ class zc {
57416
57416
  }));
57417
57417
  }
57418
57418
  initLeftPanel() {
57419
- if (!this.config.leftPanelContainer) return;
57419
+ if (!this.config.drawingPanelContainer) return;
57420
57420
  this.leftPanel = new jc({
57421
- container: this.config.leftPanelContainer,
57421
+ container: this.config.drawingPanelContainer,
57422
57422
  theme: this.config.theme,
57423
57423
  i18n: this.config.i18n,
57424
57424
  state: this.leftPanelState,
57425
57425
  onStateChange: (e) => {
57426
- this.updateLeftPanelState(e), e.isBrushActive !== void 0 && (e.isBrushActive && this.config.leftPanelContainer ? this.config.brushHint?.show(this.config.leftPanelContainer) : this.config.brushHint?.hide());
57426
+ this.updateLeftPanelState(e), e.isBrushActive !== void 0 && (e.isBrushActive && this.config.drawingPanelContainer ? this.config.brushHint?.show(this.config.drawingPanelContainer) : this.config.brushHint?.hide());
57427
57427
  },
57428
57428
  onToolSelect: (e) => this.config.onToolSelect(e),
57429
57429
  chart: this.config.chartManager?.getChart()
@@ -57616,8 +57616,8 @@ class Jc {
57616
57616
  }
57617
57617
  initPanels() {
57618
57618
  this.panels = new zc({
57619
- topPanelContainer: this.config.showTopPanel !== !1 ? this.dom.getTopPanelContainer() : null,
57620
- leftPanelContainer: this.config.showLeftPanel !== !1 ? this.dom.getLeftPanelContainer() : null,
57619
+ technologyPanelContainer: this.config.technologyPanel !== !1 ? this.dom.getTechnologyPanelContainer() : null,
57620
+ drawingPanelContainer: this.config.drawingPanel !== !1 ? this.dom.getDrawingPanelContainer() : null,
57621
57621
  rootContainer: this.dom.getRootEl(),
57622
57622
  theme: this.theme,
57623
57623
  i18n: this.i18n,
package/package.json CHANGED
@@ -1,75 +1,75 @@
1
- {
2
- "name": "@candleview/core",
3
- "version": "2.9.8",
4
- "description": "A time-series data visualization and charting engine designed specifically for the financial industry.",
5
- "keywords": [
6
- "Finance",
7
- "Financial Analysis",
8
- "Financial Charts",
9
- "Finance Trading",
10
- "Trading",
11
- "Chart",
12
- "Charts",
13
- "K-Line",
14
- "KLine"
15
- ],
16
- "author": "happyboy",
17
- "license": "AGPL-3.0-only",
18
- "repository": {
19
- "type": "git",
20
- "url": "git+https://github.com/0xhappyboy/candleview.git"
21
- },
22
- "bugs": {
23
- "url": "https://github.com/0xhappyboy/candleview/issues"
24
- },
25
- "homepage": "https://github.com/0xhappyboy/candleview",
26
- "main": "dist/index.js",
27
- "module": "dist/index.mjs",
28
- "types": "dist/index.d.ts",
29
- "source": "src/index.tsx",
30
- "exports": {
31
- ".": {
32
- "import": "./dist/index.mjs",
33
- "require": "./dist/index.js",
34
- "types": "./dist/index.d.ts"
35
- }
36
- },
37
- "engines": {
38
- "node": ">=16"
39
- },
40
- "scripts": {
41
- "clean": "rm -rf dist node_modules/.cache .tsbuildinfo",
42
- "build": "vite build",
43
- "build:fast": "vite build --mode development",
44
- "build:types": "tsc --emitDeclarationOnly --outDir dist",
45
- "start": "vite build --watch",
46
- "dev": "vite",
47
- "prepare": "npm run build",
48
- "test": "run-s test:unit test:lint",
49
- "test:build": "vite build",
50
- "test:lint": "eslint .",
51
- "test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
52
- "test:watch": "react-scripts test --env=jsdom",
53
- "predeploy": "cd example && yarn install && yarn run build",
54
- "deploy": "gh-pages -d example/build"
55
- },
56
- "peerDependencies": {},
57
- "dependencies": {
58
- "lightweight-charts": "^5.0.9"
59
- },
60
- "devDependencies": {
61
- "@types/node": "^24.10.1",
62
- "ts-node": "^10.9.2",
63
- "typescript": "^5.9.3",
64
- "cross-env": "^7.0.3",
65
- "eslint": "^9.17.0",
66
- "eslint-plugin-react": "^7.37.4",
67
- "gh-pages": "^6.3.0",
68
- "npm-run-all": "^4.1.5",
69
- "vite": "^7.2.6",
70
- "vite-plugin-dts": "^4.5.4"
71
- },
72
- "files": [
73
- "dist"
74
- ]
75
- }
1
+ {
2
+ "name": "@candleview/core",
3
+ "version": "3.0.0",
4
+ "description": "A time-series data visualization and charting engine designed specifically for the financial industry.",
5
+ "keywords": [
6
+ "Finance",
7
+ "Financial Analysis",
8
+ "Financial Charts",
9
+ "Finance Trading",
10
+ "Trading",
11
+ "Chart",
12
+ "Charts",
13
+ "K-Line",
14
+ "KLine"
15
+ ],
16
+ "author": "happyboy",
17
+ "license": "AGPL-3.0-only",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/0xhappyboy/candleview.git"
21
+ },
22
+ "bugs": {
23
+ "url": "https://github.com/0xhappyboy/candleview/issues"
24
+ },
25
+ "homepage": "https://github.com/0xhappyboy/candleview",
26
+ "main": "dist/index.js",
27
+ "module": "dist/index.mjs",
28
+ "types": "dist/index.d.ts",
29
+ "source": "src/index.ts",
30
+ "exports": {
31
+ ".": {
32
+ "import": "./dist/index.mjs",
33
+ "require": "./dist/index.js",
34
+ "types": "./dist/index.d.ts"
35
+ }
36
+ },
37
+ "engines": {
38
+ "node": ">=16"
39
+ },
40
+ "scripts": {
41
+ "clean": "rm -rf dist node_modules/.cache .tsbuildinfo",
42
+ "build": "vite build",
43
+ "build:fast": "vite build --mode development",
44
+ "build:types": "tsc --emitDeclarationOnly --outDir dist",
45
+ "start": "vite build --watch",
46
+ "dev": "vite",
47
+ "prepare": "npm run build",
48
+ "test": "run-s test:unit test:lint",
49
+ "test:build": "vite build",
50
+ "test:lint": "eslint .",
51
+ "test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
52
+ "test:watch": "react-scripts test --env=jsdom",
53
+ "predeploy": "cd example && yarn install && yarn run build",
54
+ "deploy": "gh-pages -d example/build"
55
+ },
56
+ "peerDependencies": {},
57
+ "dependencies": {
58
+ "lightweight-charts": "^5.0.9"
59
+ },
60
+ "devDependencies": {
61
+ "@types/node": "^24.10.1",
62
+ "ts-node": "^10.9.2",
63
+ "typescript": "^5.9.3",
64
+ "cross-env": "^7.0.3",
65
+ "eslint": "^9.17.0",
66
+ "eslint-plugin-react": "^7.37.4",
67
+ "gh-pages": "^6.3.0",
68
+ "npm-run-all": "^4.1.5",
69
+ "vite": "^7.2.6",
70
+ "vite-plugin-dts": "^4.5.4"
71
+ },
72
+ "files": [
73
+ "dist"
74
+ ]
75
+ }