binbot-charts 0.5.4 → 0.5.6
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/src/App.js +5 -3
- package/dist/src/components/index.js +1 -2
- package/dist/src/index.js +7 -4
- package/package.json +3 -3
package/dist/src/App.js
CHANGED
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.App = void 0;
|
|
6
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
8
|
const react_1 = require("react");
|
|
8
9
|
const use_immer_1 = require("use-immer");
|
|
@@ -19,7 +20,7 @@ function roundTime(ts) {
|
|
|
19
20
|
const roundFloor = time.getTime();
|
|
20
21
|
return roundFloor / 1000;
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
+
const App = () => {
|
|
23
24
|
const [currentPrice, setCurrentPrice] = (0, react_1.useState)(null);
|
|
24
25
|
const [orderLines, setOrderLines] = (0, use_immer_1.useImmer)([]);
|
|
25
26
|
const [symbolState, setSymbolState] = (0, react_1.useState)("BTCUSDT");
|
|
@@ -75,5 +76,6 @@ function App() {
|
|
|
75
76
|
}
|
|
76
77
|
};
|
|
77
78
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("h1", Object.assign({ style: { textAlign: "center" } }, { children: "Test chart" })), (0, jsx_runtime_1.jsx)("label", Object.assign({ htmlFor: "symbol" }, { children: "Type symbol" })), (0, jsx_runtime_1.jsx)("input", { name: "symbol", type: "text", onChange: handleChange }), (0, jsx_runtime_1.jsx)(TVChartContainer_1.default, { symbol: symbolState, interval: "1h", timescaleMarks: testTimeMarks, orderLines: orderLines, onTick: handleTick, getLatestBar: getLatestBar })] }));
|
|
78
|
-
}
|
|
79
|
-
exports.
|
|
79
|
+
};
|
|
80
|
+
exports.App = App;
|
|
81
|
+
exports.default = exports.App;
|
|
@@ -3,6 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.TVChartContainer = void 0;
|
|
7
6
|
const TVChartContainer_1 = __importDefault(require("./TVChartContainer"));
|
|
8
|
-
exports.
|
|
7
|
+
exports.default = TVChartContainer_1.default;
|
package/dist/src/index.js
CHANGED
|
@@ -4,8 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const App_tsx_1 = __importDefault(require("./App.tsx"));
|
|
7
|
+
const client_1 = require("react-dom/client");
|
|
8
|
+
const App_1 = __importDefault(require("./App")); // Ensure App is a default export from "./App"
|
|
10
9
|
require("./index.css");
|
|
11
|
-
|
|
10
|
+
const rootElement = document.getElementById("root");
|
|
11
|
+
if (rootElement) {
|
|
12
|
+
const root = (0, client_1.createRoot)(rootElement);
|
|
13
|
+
root.render((0, jsx_runtime_1.jsx)(App_1.default, {}));
|
|
14
|
+
}
|
package/package.json
CHANGED