@baron1996/kline-scene-schema 0.1.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/LICENSE +201 -0
- package/NOTICE +22 -0
- package/README.md +18 -0
- package/dist/canonical-json.d.ts +3 -0
- package/dist/canonical-json.d.ts.map +1 -0
- package/dist/canonical-json.js +15 -0
- package/dist/canonicalize.d.ts +3 -0
- package/dist/canonicalize.d.ts.map +1 -0
- package/dist/canonicalize.js +19 -0
- package/dist/errors.d.ts +13 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +12 -0
- package/dist/generated/chart-scene.d.ts +219 -0
- package/dist/generated/chart-scene.d.ts.map +1 -0
- package/dist/generated/chart-scene.js +2 -0
- package/dist/generated/schemas.d.ts +777 -0
- package/dist/generated/schemas.d.ts.map +1 -0
- package/dist/generated/schemas.js +1043 -0
- package/dist/generated/validate-chart-scene.d.ts +15 -0
- package/dist/generated/validate-chart-scene.d.ts.map +1 -0
- package/dist/generated/validate-chart-scene.js +5916 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/semantic-validator.d.ts +5 -0
- package/dist/semantic-validator.d.ts.map +1 -0
- package/dist/semantic-validator.js +264 -0
- package/dist/validator.d.ts +4 -0
- package/dist/validator.d.ts.map +1 -0
- package/dist/validator.js +49 -0
- package/dist/version.d.ts +5 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +4 -0
- package/licenses/KLineCharts-LICENSE +201 -0
- package/licenses/KLineCharts-NOTICE +5 -0
- package/licenses/Noto-Sans-SC-OFL-1.1 +93 -0
- package/licenses/Tabler-Icons-LICENSE +21 -0
- package/licenses/TradingView-Lightweight-Charts-LICENSE +201 -0
- package/licenses/fflate-LICENSE +21 -0
- package/package.json +53 -0
- package/schema/chart-config.schema.json +177 -0
- package/schema/chart-scene.schema.json +198 -0
- package/schema/common.schema.json +156 -0
- package/schema/indicator.schema.json +146 -0
- package/schema/market-data.schema.json +37 -0
- package/schema/overlay.schema.json +188 -0
- package/schema/pane.schema.json +117 -0
- package/schema/runtime.schema.json +23 -0
|
@@ -0,0 +1,777 @@
|
|
|
1
|
+
export declare const CommonSchema: {
|
|
2
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
3
|
+
readonly $id: "https://baron.dev/kline-scene/common.schema.json";
|
|
4
|
+
readonly title: "ChartScene Common Types";
|
|
5
|
+
readonly $defs: {
|
|
6
|
+
readonly stableId: {
|
|
7
|
+
readonly type: "string";
|
|
8
|
+
readonly minLength: 1;
|
|
9
|
+
readonly maxLength: 128;
|
|
10
|
+
readonly pattern: "^[A-Za-z][A-Za-z0-9._:-]*$";
|
|
11
|
+
};
|
|
12
|
+
readonly finiteNumber: {
|
|
13
|
+
readonly type: "number";
|
|
14
|
+
readonly minimum: -1.7976931348623157e+308;
|
|
15
|
+
readonly maximum: 1.7976931348623157e+308;
|
|
16
|
+
};
|
|
17
|
+
readonly safeInteger: {
|
|
18
|
+
readonly type: "integer";
|
|
19
|
+
readonly minimum: -9007199254740991;
|
|
20
|
+
readonly maximum: 9007199254740991;
|
|
21
|
+
};
|
|
22
|
+
readonly nonNegativeNumber: {
|
|
23
|
+
readonly type: "number";
|
|
24
|
+
readonly minimum: 0;
|
|
25
|
+
readonly maximum: 1.7976931348623157e+308;
|
|
26
|
+
};
|
|
27
|
+
readonly rgbaColor: {
|
|
28
|
+
readonly type: "string";
|
|
29
|
+
readonly pattern: "^rgba\\(\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?)\\s*\\)$";
|
|
30
|
+
};
|
|
31
|
+
readonly lineStyle: {
|
|
32
|
+
readonly type: "object";
|
|
33
|
+
readonly additionalProperties: false;
|
|
34
|
+
readonly required: readonly ["color", "size", "style"];
|
|
35
|
+
readonly properties: {
|
|
36
|
+
readonly color: {
|
|
37
|
+
readonly $ref: "#/$defs/rgbaColor";
|
|
38
|
+
};
|
|
39
|
+
readonly size: {
|
|
40
|
+
readonly type: "number";
|
|
41
|
+
readonly exclusiveMinimum: 0;
|
|
42
|
+
readonly maximum: 20;
|
|
43
|
+
};
|
|
44
|
+
readonly style: {
|
|
45
|
+
readonly enum: readonly ["solid", "dashed", "dotted"];
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
readonly fillStyle: {
|
|
50
|
+
readonly type: "object";
|
|
51
|
+
readonly additionalProperties: false;
|
|
52
|
+
readonly required: readonly ["color"];
|
|
53
|
+
readonly properties: {
|
|
54
|
+
readonly color: {
|
|
55
|
+
readonly $ref: "#/$defs/rgbaColor";
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
readonly textStyle: {
|
|
60
|
+
readonly type: "object";
|
|
61
|
+
readonly additionalProperties: false;
|
|
62
|
+
readonly required: readonly ["color", "size", "family", "weight", "backgroundColor", "borderColor"];
|
|
63
|
+
readonly properties: {
|
|
64
|
+
readonly color: {
|
|
65
|
+
readonly $ref: "#/$defs/rgbaColor";
|
|
66
|
+
};
|
|
67
|
+
readonly size: {
|
|
68
|
+
readonly type: "number";
|
|
69
|
+
readonly minimum: 8;
|
|
70
|
+
readonly maximum: 72;
|
|
71
|
+
};
|
|
72
|
+
readonly family: {
|
|
73
|
+
readonly type: "string";
|
|
74
|
+
readonly minLength: 1;
|
|
75
|
+
readonly maxLength: 128;
|
|
76
|
+
};
|
|
77
|
+
readonly weight: {
|
|
78
|
+
readonly oneOf: readonly [{
|
|
79
|
+
readonly type: "integer";
|
|
80
|
+
readonly minimum: 100;
|
|
81
|
+
readonly maximum: 900;
|
|
82
|
+
readonly multipleOf: 100;
|
|
83
|
+
}, {
|
|
84
|
+
readonly enum: readonly ["normal", "bold"];
|
|
85
|
+
}];
|
|
86
|
+
};
|
|
87
|
+
readonly backgroundColor: {
|
|
88
|
+
readonly $ref: "#/$defs/rgbaColor";
|
|
89
|
+
};
|
|
90
|
+
readonly borderColor: {
|
|
91
|
+
readonly $ref: "#/$defs/rgbaColor";
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
readonly jsonValue: {
|
|
96
|
+
readonly oneOf: readonly [{
|
|
97
|
+
readonly type: "null";
|
|
98
|
+
}, {
|
|
99
|
+
readonly type: "boolean";
|
|
100
|
+
}, {
|
|
101
|
+
readonly $ref: "#/$defs/finiteNumber";
|
|
102
|
+
}, {
|
|
103
|
+
readonly type: "string";
|
|
104
|
+
}, {
|
|
105
|
+
readonly type: "array";
|
|
106
|
+
readonly maxItems: 1000;
|
|
107
|
+
readonly items: {
|
|
108
|
+
readonly $ref: "#/$defs/jsonValue";
|
|
109
|
+
};
|
|
110
|
+
}, {
|
|
111
|
+
readonly type: "object";
|
|
112
|
+
readonly maxProperties: 1000;
|
|
113
|
+
readonly additionalProperties: {
|
|
114
|
+
readonly $ref: "#/$defs/jsonValue";
|
|
115
|
+
};
|
|
116
|
+
}];
|
|
117
|
+
};
|
|
118
|
+
readonly metadata: {
|
|
119
|
+
readonly type: "object";
|
|
120
|
+
readonly maxProperties: 1000;
|
|
121
|
+
readonly additionalProperties: {
|
|
122
|
+
readonly $ref: "#/$defs/jsonValue";
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
export declare const RuntimeSchema: {
|
|
128
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
129
|
+
readonly $id: "https://baron.dev/kline-scene/runtime.schema.json";
|
|
130
|
+
readonly title: "RuntimeIdentity";
|
|
131
|
+
readonly type: "object";
|
|
132
|
+
readonly additionalProperties: false;
|
|
133
|
+
readonly required: readonly ["engine", "engineVersion", "runtimeVersion"];
|
|
134
|
+
readonly properties: {
|
|
135
|
+
readonly engine: {
|
|
136
|
+
readonly const: "klinecharts";
|
|
137
|
+
};
|
|
138
|
+
readonly engineVersion: {
|
|
139
|
+
readonly const: "10.0.0";
|
|
140
|
+
};
|
|
141
|
+
readonly runtimeVersion: {
|
|
142
|
+
readonly const: "0.1.0";
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
export declare const MarketDataSchema: {
|
|
147
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
148
|
+
readonly $id: "https://baron.dev/kline-scene/market-data.schema.json";
|
|
149
|
+
readonly title: "MarketData";
|
|
150
|
+
readonly type: "object";
|
|
151
|
+
readonly additionalProperties: false;
|
|
152
|
+
readonly required: readonly ["timestamp", "open", "high", "low", "close"];
|
|
153
|
+
readonly properties: {
|
|
154
|
+
readonly timestamp: {
|
|
155
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/safeInteger";
|
|
156
|
+
};
|
|
157
|
+
readonly open: {
|
|
158
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber";
|
|
159
|
+
};
|
|
160
|
+
readonly high: {
|
|
161
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber";
|
|
162
|
+
};
|
|
163
|
+
readonly low: {
|
|
164
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber";
|
|
165
|
+
};
|
|
166
|
+
readonly close: {
|
|
167
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber";
|
|
168
|
+
};
|
|
169
|
+
readonly volume: {
|
|
170
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/nonNegativeNumber";
|
|
171
|
+
};
|
|
172
|
+
readonly turnover: {
|
|
173
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/nonNegativeNumber";
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
export declare const ChartConfigSchema: {
|
|
178
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
179
|
+
readonly $id: "https://baron.dev/kline-scene/chart-config.schema.json";
|
|
180
|
+
readonly title: "ChartConfig";
|
|
181
|
+
readonly type: "object";
|
|
182
|
+
readonly additionalProperties: false;
|
|
183
|
+
readonly required: readonly ["locale", "timezone", "layout", "candle", "grid", "thousandsSeparator", "decimalFold", "zoomAnchor", "dateFormat", "largeNumberFormat"];
|
|
184
|
+
readonly properties: {
|
|
185
|
+
readonly locale: {
|
|
186
|
+
readonly type: "string";
|
|
187
|
+
readonly minLength: 2;
|
|
188
|
+
readonly maxLength: 64;
|
|
189
|
+
readonly pattern: "^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$";
|
|
190
|
+
};
|
|
191
|
+
readonly timezone: {
|
|
192
|
+
readonly type: "string";
|
|
193
|
+
readonly minLength: 1;
|
|
194
|
+
readonly maxLength: 128;
|
|
195
|
+
readonly pattern: "^[A-Za-z_+-]+(?:/[A-Za-z0-9_+-]+)*$";
|
|
196
|
+
};
|
|
197
|
+
readonly layout: {
|
|
198
|
+
readonly type: "object";
|
|
199
|
+
readonly additionalProperties: false;
|
|
200
|
+
readonly required: readonly ["backgroundColor", "textColor", "fontFamily", "fontSize"];
|
|
201
|
+
readonly properties: {
|
|
202
|
+
readonly backgroundColor: {
|
|
203
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
204
|
+
};
|
|
205
|
+
readonly textColor: {
|
|
206
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
207
|
+
};
|
|
208
|
+
readonly fontFamily: {
|
|
209
|
+
readonly type: "string";
|
|
210
|
+
readonly minLength: 1;
|
|
211
|
+
readonly maxLength: 128;
|
|
212
|
+
};
|
|
213
|
+
readonly fontSize: {
|
|
214
|
+
readonly type: "number";
|
|
215
|
+
readonly minimum: 8;
|
|
216
|
+
readonly maximum: 32;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
readonly candle: {
|
|
221
|
+
readonly type: "object";
|
|
222
|
+
readonly additionalProperties: false;
|
|
223
|
+
readonly required: readonly ["type", "upColor", "downColor", "noChangeColor", "upBorderColor", "downBorderColor", "noChangeBorderColor", "upWickColor", "downWickColor", "noChangeWickColor"];
|
|
224
|
+
readonly properties: {
|
|
225
|
+
readonly type: {
|
|
226
|
+
readonly enum: readonly ["candle_solid", "candle_stroke", "candle_up_stroke", "candle_down_stroke", "ohlc"];
|
|
227
|
+
};
|
|
228
|
+
readonly upColor: {
|
|
229
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
230
|
+
};
|
|
231
|
+
readonly downColor: {
|
|
232
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
233
|
+
};
|
|
234
|
+
readonly noChangeColor: {
|
|
235
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
236
|
+
};
|
|
237
|
+
readonly upBorderColor: {
|
|
238
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
239
|
+
};
|
|
240
|
+
readonly downBorderColor: {
|
|
241
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
242
|
+
};
|
|
243
|
+
readonly noChangeBorderColor: {
|
|
244
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
245
|
+
};
|
|
246
|
+
readonly upWickColor: {
|
|
247
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
248
|
+
};
|
|
249
|
+
readonly downWickColor: {
|
|
250
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
251
|
+
};
|
|
252
|
+
readonly noChangeWickColor: {
|
|
253
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
readonly grid: {
|
|
258
|
+
readonly type: "object";
|
|
259
|
+
readonly additionalProperties: false;
|
|
260
|
+
readonly required: readonly ["horizontalColor", "verticalColor"];
|
|
261
|
+
readonly properties: {
|
|
262
|
+
readonly horizontalColor: {
|
|
263
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
264
|
+
};
|
|
265
|
+
readonly verticalColor: {
|
|
266
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
readonly thousandsSeparator: {
|
|
271
|
+
readonly enum: readonly ["", ",", " ", "_"];
|
|
272
|
+
};
|
|
273
|
+
readonly decimalFold: {
|
|
274
|
+
readonly type: "object";
|
|
275
|
+
readonly additionalProperties: false;
|
|
276
|
+
readonly required: readonly ["enabled", "threshold"];
|
|
277
|
+
readonly properties: {
|
|
278
|
+
readonly enabled: {
|
|
279
|
+
readonly type: "boolean";
|
|
280
|
+
};
|
|
281
|
+
readonly threshold: {
|
|
282
|
+
readonly type: "integer";
|
|
283
|
+
readonly minimum: 1;
|
|
284
|
+
readonly maximum: 16;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
readonly zoomAnchor: {
|
|
289
|
+
readonly enum: readonly ["cursor", "right"];
|
|
290
|
+
};
|
|
291
|
+
readonly dateFormat: {
|
|
292
|
+
readonly enum: readonly ["yyyy-MM-dd", "yyyy-MM-dd HH:mm", "yyyy-MM-dd HH:mm:ss"];
|
|
293
|
+
};
|
|
294
|
+
readonly largeNumberFormat: {
|
|
295
|
+
readonly enum: readonly ["western", "chinese", "plain"];
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
export declare const IndicatorSchema: {
|
|
300
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
301
|
+
readonly $id: "https://baron.dev/kline-scene/indicator.schema.json";
|
|
302
|
+
readonly title: "SceneIndicator";
|
|
303
|
+
readonly type: "object";
|
|
304
|
+
readonly additionalProperties: false;
|
|
305
|
+
readonly required: readonly ["id", "name", "paneId", "yAxisId", "calcParams", "precision", "visible", "zLevel", "styles"];
|
|
306
|
+
readonly properties: {
|
|
307
|
+
readonly id: {
|
|
308
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/stableId";
|
|
309
|
+
};
|
|
310
|
+
readonly name: {
|
|
311
|
+
readonly enum: readonly ["MA", "EMA", "SMA", "BBI", "VOL", "MACD", "BOLL", "KDJ", "RSI", "BIAS", "BRAR", "CCI", "DMI", "CR", "PSY", "DMA", "TRIX", "OBV", "VR", "WR", "MTM", "EMV", "SAR", "AO", "ROC", "PVT", "AVP"];
|
|
312
|
+
};
|
|
313
|
+
readonly paneId: {
|
|
314
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/stableId";
|
|
315
|
+
};
|
|
316
|
+
readonly yAxisId: {
|
|
317
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/stableId";
|
|
318
|
+
};
|
|
319
|
+
readonly calcParams: {
|
|
320
|
+
readonly type: "array";
|
|
321
|
+
readonly maxItems: 8;
|
|
322
|
+
readonly items: {
|
|
323
|
+
readonly type: "number";
|
|
324
|
+
readonly exclusiveMinimum: 0;
|
|
325
|
+
readonly maximum: 100000;
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
readonly precision: {
|
|
329
|
+
readonly type: "integer";
|
|
330
|
+
readonly minimum: 0;
|
|
331
|
+
readonly maximum: 16;
|
|
332
|
+
};
|
|
333
|
+
readonly visible: {
|
|
334
|
+
readonly type: "boolean";
|
|
335
|
+
};
|
|
336
|
+
readonly zLevel: {
|
|
337
|
+
readonly type: "integer";
|
|
338
|
+
readonly minimum: -1000;
|
|
339
|
+
readonly maximum: 1000;
|
|
340
|
+
};
|
|
341
|
+
readonly styles: {
|
|
342
|
+
readonly type: "object";
|
|
343
|
+
readonly additionalProperties: false;
|
|
344
|
+
readonly required: readonly ["lines", "bars", "circles"];
|
|
345
|
+
readonly properties: {
|
|
346
|
+
readonly lines: {
|
|
347
|
+
readonly type: "array";
|
|
348
|
+
readonly maxItems: 16;
|
|
349
|
+
readonly items: {
|
|
350
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/lineStyle";
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
readonly bars: {
|
|
354
|
+
readonly type: "array";
|
|
355
|
+
readonly maxItems: 16;
|
|
356
|
+
readonly items: {
|
|
357
|
+
readonly type: "object";
|
|
358
|
+
readonly additionalProperties: false;
|
|
359
|
+
readonly required: readonly ["upColor", "downColor", "noChangeColor"];
|
|
360
|
+
readonly properties: {
|
|
361
|
+
readonly upColor: {
|
|
362
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
363
|
+
};
|
|
364
|
+
readonly downColor: {
|
|
365
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
366
|
+
};
|
|
367
|
+
readonly noChangeColor: {
|
|
368
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
readonly circles: {
|
|
374
|
+
readonly type: "array";
|
|
375
|
+
readonly maxItems: 16;
|
|
376
|
+
readonly items: {
|
|
377
|
+
readonly type: "object";
|
|
378
|
+
readonly additionalProperties: false;
|
|
379
|
+
readonly required: readonly ["color", "radius"];
|
|
380
|
+
readonly properties: {
|
|
381
|
+
readonly color: {
|
|
382
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
383
|
+
};
|
|
384
|
+
readonly radius: {
|
|
385
|
+
readonly type: "number";
|
|
386
|
+
readonly exclusiveMinimum: 0;
|
|
387
|
+
readonly maximum: 20;
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
export declare const PaneSchema: {
|
|
397
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
398
|
+
readonly $id: "https://baron.dev/kline-scene/pane.schema.json";
|
|
399
|
+
readonly title: "ScenePane";
|
|
400
|
+
readonly type: "object";
|
|
401
|
+
readonly additionalProperties: false;
|
|
402
|
+
readonly required: readonly ["id", "kind", "order", "height", "minHeight", "state", "yAxes", "indicators"];
|
|
403
|
+
readonly properties: {
|
|
404
|
+
readonly id: {
|
|
405
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/stableId";
|
|
406
|
+
};
|
|
407
|
+
readonly kind: {
|
|
408
|
+
readonly enum: readonly ["candle", "indicator"];
|
|
409
|
+
};
|
|
410
|
+
readonly order: {
|
|
411
|
+
readonly type: "integer";
|
|
412
|
+
readonly minimum: 0;
|
|
413
|
+
readonly maximum: 128;
|
|
414
|
+
};
|
|
415
|
+
readonly height: {
|
|
416
|
+
readonly type: "integer";
|
|
417
|
+
readonly minimum: 1;
|
|
418
|
+
readonly maximum: 10000;
|
|
419
|
+
};
|
|
420
|
+
readonly minHeight: {
|
|
421
|
+
readonly type: "integer";
|
|
422
|
+
readonly minimum: 1;
|
|
423
|
+
readonly maximum: 10000;
|
|
424
|
+
};
|
|
425
|
+
readonly state: {
|
|
426
|
+
readonly enum: readonly ["normal", "maximize", "minimize"];
|
|
427
|
+
};
|
|
428
|
+
readonly yAxes: {
|
|
429
|
+
readonly type: "array";
|
|
430
|
+
readonly minItems: 1;
|
|
431
|
+
readonly maxItems: 16;
|
|
432
|
+
readonly items: {
|
|
433
|
+
readonly $ref: "#/$defs/yAxis";
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
readonly indicators: {
|
|
437
|
+
readonly type: "array";
|
|
438
|
+
readonly maxItems: 128;
|
|
439
|
+
readonly items: {
|
|
440
|
+
readonly $ref: "https://baron.dev/kline-scene/indicator.schema.json";
|
|
441
|
+
};
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
readonly $defs: {
|
|
445
|
+
readonly yAxis: {
|
|
446
|
+
readonly type: "object";
|
|
447
|
+
readonly additionalProperties: false;
|
|
448
|
+
readonly required: readonly ["id", "role", "position", "reverse", "inside", "scrollZoomEnabled", "topGap", "bottomGap"];
|
|
449
|
+
readonly properties: {
|
|
450
|
+
readonly id: {
|
|
451
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/stableId";
|
|
452
|
+
};
|
|
453
|
+
readonly role: {
|
|
454
|
+
readonly enum: readonly ["primary", "additional"];
|
|
455
|
+
};
|
|
456
|
+
readonly position: {
|
|
457
|
+
readonly enum: readonly ["left", "right"];
|
|
458
|
+
};
|
|
459
|
+
readonly reverse: {
|
|
460
|
+
readonly type: "boolean";
|
|
461
|
+
};
|
|
462
|
+
readonly inside: {
|
|
463
|
+
readonly type: "boolean";
|
|
464
|
+
};
|
|
465
|
+
readonly scrollZoomEnabled: {
|
|
466
|
+
readonly type: "boolean";
|
|
467
|
+
};
|
|
468
|
+
readonly topGap: {
|
|
469
|
+
readonly type: "number";
|
|
470
|
+
readonly minimum: 0;
|
|
471
|
+
readonly maximum: 0.9;
|
|
472
|
+
};
|
|
473
|
+
readonly bottomGap: {
|
|
474
|
+
readonly type: "number";
|
|
475
|
+
readonly minimum: 0;
|
|
476
|
+
readonly maximum: 0.9;
|
|
477
|
+
};
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
export declare const OverlaySchema: {
|
|
483
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
484
|
+
readonly $id: "https://baron.dev/kline-scene/overlay.schema.json";
|
|
485
|
+
readonly title: "SceneOverlay";
|
|
486
|
+
readonly type: "object";
|
|
487
|
+
readonly additionalProperties: false;
|
|
488
|
+
readonly required: readonly ["id", "type", "paneId", "visible", "locked", "zLevel", "mode", "styles"];
|
|
489
|
+
readonly properties: {
|
|
490
|
+
readonly id: {
|
|
491
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/stableId";
|
|
492
|
+
};
|
|
493
|
+
readonly type: {
|
|
494
|
+
readonly enum: readonly ["horizontalRayLine", "horizontalSegment", "horizontalStraightLine", "verticalRayLine", "verticalSegment", "verticalStraightLine", "rayLine", "segment", "straightLine", "priceLine", "priceChannelLine", "parallelStraightLine", "fibonacciLine", "brush", "simpleAnnotation", "simpleTag", "rectangle", "arrow", "crossLine", "callout", "text"];
|
|
495
|
+
};
|
|
496
|
+
readonly paneId: {
|
|
497
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/stableId";
|
|
498
|
+
};
|
|
499
|
+
readonly groupId: {
|
|
500
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/stableId";
|
|
501
|
+
};
|
|
502
|
+
readonly visible: {
|
|
503
|
+
readonly type: "boolean";
|
|
504
|
+
};
|
|
505
|
+
readonly locked: {
|
|
506
|
+
readonly type: "boolean";
|
|
507
|
+
};
|
|
508
|
+
readonly zLevel: {
|
|
509
|
+
readonly type: "integer";
|
|
510
|
+
readonly minimum: -1000;
|
|
511
|
+
readonly maximum: 1000;
|
|
512
|
+
};
|
|
513
|
+
readonly mode: {
|
|
514
|
+
readonly enum: readonly ["normal", "weak_magnet", "strong_magnet"];
|
|
515
|
+
};
|
|
516
|
+
readonly anchor: {
|
|
517
|
+
readonly oneOf: readonly [{
|
|
518
|
+
readonly $ref: "#/$defs/timeAnchor";
|
|
519
|
+
}, {
|
|
520
|
+
readonly $ref: "#/$defs/valueAnchor";
|
|
521
|
+
}, {
|
|
522
|
+
readonly $ref: "#/$defs/timeValueAnchor";
|
|
523
|
+
}];
|
|
524
|
+
};
|
|
525
|
+
readonly value: {
|
|
526
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber";
|
|
527
|
+
};
|
|
528
|
+
readonly startTimestamp: {
|
|
529
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/safeInteger";
|
|
530
|
+
};
|
|
531
|
+
readonly endTimestamp: {
|
|
532
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/safeInteger";
|
|
533
|
+
};
|
|
534
|
+
readonly timestamp: {
|
|
535
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/safeInteger";
|
|
536
|
+
};
|
|
537
|
+
readonly startValue: {
|
|
538
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber";
|
|
539
|
+
};
|
|
540
|
+
readonly endValue: {
|
|
541
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber";
|
|
542
|
+
};
|
|
543
|
+
readonly point: {
|
|
544
|
+
readonly $ref: "#/$defs/timeValueAnchor";
|
|
545
|
+
};
|
|
546
|
+
readonly start: {
|
|
547
|
+
readonly $ref: "#/$defs/timeValueAnchor";
|
|
548
|
+
};
|
|
549
|
+
readonly end: {
|
|
550
|
+
readonly $ref: "#/$defs/timeValueAnchor";
|
|
551
|
+
};
|
|
552
|
+
readonly points: {
|
|
553
|
+
readonly type: "array";
|
|
554
|
+
readonly minItems: 1;
|
|
555
|
+
readonly maxItems: 256;
|
|
556
|
+
readonly items: {
|
|
557
|
+
readonly $ref: "#/$defs/timeValueAnchor";
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
readonly text: {
|
|
561
|
+
readonly type: "string";
|
|
562
|
+
readonly maxLength: 4096;
|
|
563
|
+
};
|
|
564
|
+
readonly styles: {
|
|
565
|
+
readonly type: "object";
|
|
566
|
+
readonly additionalProperties: false;
|
|
567
|
+
readonly required: readonly ["line", "fill", "text"];
|
|
568
|
+
readonly properties: {
|
|
569
|
+
readonly line: {
|
|
570
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/lineStyle";
|
|
571
|
+
};
|
|
572
|
+
readonly fill: {
|
|
573
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/fillStyle";
|
|
574
|
+
};
|
|
575
|
+
readonly text: {
|
|
576
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/textStyle";
|
|
577
|
+
};
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
readonly metadata: {
|
|
581
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/metadata";
|
|
582
|
+
};
|
|
583
|
+
};
|
|
584
|
+
readonly $defs: {
|
|
585
|
+
readonly timeAnchor: {
|
|
586
|
+
readonly type: "object";
|
|
587
|
+
readonly additionalProperties: false;
|
|
588
|
+
readonly required: readonly ["timestamp"];
|
|
589
|
+
readonly properties: {
|
|
590
|
+
readonly timestamp: {
|
|
591
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/safeInteger";
|
|
592
|
+
};
|
|
593
|
+
};
|
|
594
|
+
};
|
|
595
|
+
readonly valueAnchor: {
|
|
596
|
+
readonly type: "object";
|
|
597
|
+
readonly additionalProperties: false;
|
|
598
|
+
readonly required: readonly ["value"];
|
|
599
|
+
readonly properties: {
|
|
600
|
+
readonly value: {
|
|
601
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber";
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
readonly timeValueAnchor: {
|
|
606
|
+
readonly type: "object";
|
|
607
|
+
readonly additionalProperties: false;
|
|
608
|
+
readonly required: readonly ["timestamp", "value"];
|
|
609
|
+
readonly properties: {
|
|
610
|
+
readonly timestamp: {
|
|
611
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/safeInteger";
|
|
612
|
+
};
|
|
613
|
+
readonly value: {
|
|
614
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber";
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
};
|
|
620
|
+
export declare const ChartSceneSchema: {
|
|
621
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
622
|
+
readonly $id: "https://baron.dev/kline-scene/chart-scene.schema.json";
|
|
623
|
+
readonly title: "ChartScene";
|
|
624
|
+
readonly type: "object";
|
|
625
|
+
readonly additionalProperties: false;
|
|
626
|
+
readonly required: readonly ["schema", "version", "runtime", "symbol", "period", "data", "chart", "panes", "overlays", "viewport", "render", "metadata"];
|
|
627
|
+
readonly properties: {
|
|
628
|
+
readonly schema: {
|
|
629
|
+
readonly const: "@baron1996/kline-scene";
|
|
630
|
+
};
|
|
631
|
+
readonly version: {
|
|
632
|
+
readonly const: 1;
|
|
633
|
+
};
|
|
634
|
+
readonly runtime: {
|
|
635
|
+
readonly $ref: "https://baron.dev/kline-scene/runtime.schema.json";
|
|
636
|
+
};
|
|
637
|
+
readonly symbol: {
|
|
638
|
+
readonly $ref: "#/$defs/symbol";
|
|
639
|
+
};
|
|
640
|
+
readonly period: {
|
|
641
|
+
readonly $ref: "#/$defs/period";
|
|
642
|
+
};
|
|
643
|
+
readonly data: {
|
|
644
|
+
readonly type: "array";
|
|
645
|
+
readonly minItems: 1;
|
|
646
|
+
readonly maxItems: 1000000;
|
|
647
|
+
readonly items: {
|
|
648
|
+
readonly $ref: "https://baron.dev/kline-scene/market-data.schema.json";
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
readonly chart: {
|
|
652
|
+
readonly $ref: "https://baron.dev/kline-scene/chart-config.schema.json";
|
|
653
|
+
};
|
|
654
|
+
readonly panes: {
|
|
655
|
+
readonly type: "array";
|
|
656
|
+
readonly minItems: 1;
|
|
657
|
+
readonly maxItems: 32;
|
|
658
|
+
readonly items: {
|
|
659
|
+
readonly $ref: "https://baron.dev/kline-scene/pane.schema.json";
|
|
660
|
+
};
|
|
661
|
+
};
|
|
662
|
+
readonly overlays: {
|
|
663
|
+
readonly type: "array";
|
|
664
|
+
readonly maxItems: 10000;
|
|
665
|
+
readonly items: {
|
|
666
|
+
readonly $ref: "https://baron.dev/kline-scene/overlay.schema.json";
|
|
667
|
+
};
|
|
668
|
+
};
|
|
669
|
+
readonly viewport: {
|
|
670
|
+
readonly $ref: "#/$defs/viewport";
|
|
671
|
+
};
|
|
672
|
+
readonly render: {
|
|
673
|
+
readonly $ref: "#/$defs/render";
|
|
674
|
+
};
|
|
675
|
+
readonly metadata: {
|
|
676
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/metadata";
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
readonly $defs: {
|
|
680
|
+
readonly symbol: {
|
|
681
|
+
readonly type: "object";
|
|
682
|
+
readonly additionalProperties: false;
|
|
683
|
+
readonly required: readonly ["ticker", "pricePrecision", "volumePrecision"];
|
|
684
|
+
readonly properties: {
|
|
685
|
+
readonly ticker: {
|
|
686
|
+
readonly type: "string";
|
|
687
|
+
readonly minLength: 1;
|
|
688
|
+
readonly maxLength: 128;
|
|
689
|
+
};
|
|
690
|
+
readonly name: {
|
|
691
|
+
readonly type: "string";
|
|
692
|
+
readonly minLength: 1;
|
|
693
|
+
readonly maxLength: 256;
|
|
694
|
+
};
|
|
695
|
+
readonly pricePrecision: {
|
|
696
|
+
readonly type: "integer";
|
|
697
|
+
readonly minimum: 0;
|
|
698
|
+
readonly maximum: 16;
|
|
699
|
+
};
|
|
700
|
+
readonly volumePrecision: {
|
|
701
|
+
readonly type: "integer";
|
|
702
|
+
readonly minimum: 0;
|
|
703
|
+
readonly maximum: 16;
|
|
704
|
+
};
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
readonly period: {
|
|
708
|
+
readonly type: "object";
|
|
709
|
+
readonly additionalProperties: false;
|
|
710
|
+
readonly required: readonly ["span", "type"];
|
|
711
|
+
readonly properties: {
|
|
712
|
+
readonly span: {
|
|
713
|
+
readonly type: "integer";
|
|
714
|
+
readonly minimum: 1;
|
|
715
|
+
readonly maximum: 100000;
|
|
716
|
+
};
|
|
717
|
+
readonly type: {
|
|
718
|
+
readonly enum: readonly ["second", "minute", "hour", "day", "week", "month", "year"];
|
|
719
|
+
};
|
|
720
|
+
};
|
|
721
|
+
};
|
|
722
|
+
readonly viewport: {
|
|
723
|
+
readonly type: "object";
|
|
724
|
+
readonly additionalProperties: false;
|
|
725
|
+
readonly required: readonly ["barSpace", "rightOffsetDistance", "anchorTimestamp"];
|
|
726
|
+
readonly properties: {
|
|
727
|
+
readonly barSpace: {
|
|
728
|
+
readonly type: "number";
|
|
729
|
+
readonly minimum: 1;
|
|
730
|
+
readonly maximum: 100;
|
|
731
|
+
};
|
|
732
|
+
readonly rightOffsetDistance: {
|
|
733
|
+
readonly type: "number";
|
|
734
|
+
readonly minimum: 0;
|
|
735
|
+
readonly maximum: 10000;
|
|
736
|
+
};
|
|
737
|
+
readonly anchorTimestamp: {
|
|
738
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/safeInteger";
|
|
739
|
+
};
|
|
740
|
+
};
|
|
741
|
+
};
|
|
742
|
+
readonly render: {
|
|
743
|
+
readonly type: "object";
|
|
744
|
+
readonly additionalProperties: false;
|
|
745
|
+
readonly required: readonly ["width", "height", "deviceScaleFactor", "background", "fontFamily", "timeoutMs"];
|
|
746
|
+
readonly properties: {
|
|
747
|
+
readonly width: {
|
|
748
|
+
readonly type: "integer";
|
|
749
|
+
readonly minimum: 320;
|
|
750
|
+
readonly maximum: 8192;
|
|
751
|
+
};
|
|
752
|
+
readonly height: {
|
|
753
|
+
readonly type: "integer";
|
|
754
|
+
readonly minimum: 240;
|
|
755
|
+
readonly maximum: 8192;
|
|
756
|
+
};
|
|
757
|
+
readonly deviceScaleFactor: {
|
|
758
|
+
readonly type: "number";
|
|
759
|
+
readonly minimum: 0.5;
|
|
760
|
+
readonly maximum: 4;
|
|
761
|
+
};
|
|
762
|
+
readonly background: {
|
|
763
|
+
readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
|
|
764
|
+
};
|
|
765
|
+
readonly fontFamily: {
|
|
766
|
+
readonly enum: readonly ["Baron Sans"];
|
|
767
|
+
};
|
|
768
|
+
readonly timeoutMs: {
|
|
769
|
+
readonly type: "integer";
|
|
770
|
+
readonly minimum: 100;
|
|
771
|
+
readonly maximum: 120000;
|
|
772
|
+
};
|
|
773
|
+
};
|
|
774
|
+
};
|
|
775
|
+
};
|
|
776
|
+
};
|
|
777
|
+
//# sourceMappingURL=schemas.d.ts.map
|