@baron1996/kline-scene-schema 0.3.0 → 0.4.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.
Files changed (64) hide show
  1. package/dist/decimal-normalization.d.ts +6 -0
  2. package/dist/decimal-normalization.d.ts.map +1 -0
  3. package/dist/decimal-normalization.js +47 -0
  4. package/dist/drawable-workspace-canonical-json.d.ts +3 -0
  5. package/dist/drawable-workspace-canonical-json.d.ts.map +1 -0
  6. package/dist/drawable-workspace-canonical-json.js +15 -0
  7. package/dist/drawable-workspace-canonicalize.d.ts +3 -0
  8. package/dist/drawable-workspace-canonicalize.d.ts.map +1 -0
  9. package/dist/drawable-workspace-canonicalize.js +19 -0
  10. package/dist/drawable-workspace-errors.d.ts +14 -0
  11. package/dist/drawable-workspace-errors.d.ts.map +1 -0
  12. package/dist/drawable-workspace-errors.js +12 -0
  13. package/dist/drawable-workspace-semantic-validator.d.ts +5 -0
  14. package/dist/drawable-workspace-semantic-validator.d.ts.map +1 -0
  15. package/dist/drawable-workspace-semantic-validator.js +127 -0
  16. package/dist/drawable-workspace-validator.d.ts +4 -0
  17. package/dist/drawable-workspace-validator.d.ts.map +1 -0
  18. package/dist/drawable-workspace-validator.js +74 -0
  19. package/dist/drawing-canonical-json.d.ts +3 -0
  20. package/dist/drawing-canonical-json.d.ts.map +1 -0
  21. package/dist/drawing-canonical-json.js +15 -0
  22. package/dist/drawing-canonicalize.d.ts +3 -0
  23. package/dist/drawing-canonicalize.d.ts.map +1 -0
  24. package/dist/drawing-canonicalize.js +19 -0
  25. package/dist/drawing-errors.d.ts +13 -0
  26. package/dist/drawing-errors.d.ts.map +1 -0
  27. package/dist/drawing-errors.js +12 -0
  28. package/dist/drawing-semantic-validator.d.ts +6 -0
  29. package/dist/drawing-semantic-validator.d.ts.map +1 -0
  30. package/dist/drawing-semantic-validator.js +123 -0
  31. package/dist/drawing-validator.d.ts +4 -0
  32. package/dist/drawing-validator.d.ts.map +1 -0
  33. package/dist/drawing-validator.js +66 -0
  34. package/dist/generated/chart-scene.d.ts +11 -1
  35. package/dist/generated/chart-scene.d.ts.map +1 -1
  36. package/dist/generated/drawable-workspace.d.ts +526 -0
  37. package/dist/generated/drawable-workspace.d.ts.map +1 -0
  38. package/dist/generated/drawable-workspace.js +2 -0
  39. package/dist/generated/drawing-document.d.ts +216 -0
  40. package/dist/generated/drawing-document.d.ts.map +1 -0
  41. package/dist/generated/drawing-document.js +2 -0
  42. package/dist/generated/schemas.d.ts +770 -33
  43. package/dist/generated/schemas.d.ts.map +1 -1
  44. package/dist/generated/schemas.js +1113 -151
  45. package/dist/generated/validate-chart-scene.d.ts.map +1 -1
  46. package/dist/generated/validate-chart-scene.js +550 -237
  47. package/dist/generated/validate-drawable-workspace.d.ts +15 -0
  48. package/dist/generated/validate-drawable-workspace.d.ts.map +1 -0
  49. package/dist/generated/validate-drawable-workspace.js +13449 -0
  50. package/dist/generated/validate-drawing-document.d.ts +15 -0
  51. package/dist/generated/validate-drawing-document.d.ts.map +1 -0
  52. package/dist/generated/validate-drawing-document.js +4307 -0
  53. package/dist/generated/validate-time-series-scene.d.ts.map +1 -1
  54. package/dist/generated/validate-time-series-scene.js +16 -16
  55. package/dist/index.d.ts +14 -1
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +13 -1
  58. package/package.json +1 -1
  59. package/schema/chart-config.schema.json +68 -1
  60. package/schema/chart-scene.schema.json +1 -27
  61. package/schema/common.schema.json +26 -0
  62. package/schema/drawable-workspace.schema.json +110 -0
  63. package/schema/drawing-document.schema.json +811 -0
  64. package/schema/time-series-scene.schema.json +3 -12
@@ -9,6 +9,21 @@ export declare const CommonSchema: {
9
9
  readonly maxLength: 128;
10
10
  readonly pattern: "^[A-Za-z][A-Za-z0-9._:-]*$";
11
11
  };
12
+ readonly period: {
13
+ readonly type: "object";
14
+ readonly additionalProperties: false;
15
+ readonly required: readonly ["span", "type"];
16
+ readonly properties: {
17
+ readonly span: {
18
+ readonly type: "integer";
19
+ readonly minimum: 1;
20
+ readonly maximum: 100000;
21
+ };
22
+ readonly type: {
23
+ readonly enum: readonly ["second", "minute", "hour", "day", "week", "month", "year"];
24
+ };
25
+ };
26
+ };
12
27
  readonly finiteNumber: {
13
28
  readonly type: "number";
14
29
  readonly minimum: -1.7976931348623157e+308;
@@ -223,7 +238,39 @@ export declare const ChartConfigSchema: {
223
238
  readonly required: readonly ["type", "upColor", "downColor", "noChangeColor", "upBorderColor", "downBorderColor", "noChangeBorderColor", "upWickColor", "downWickColor", "noChangeWickColor"];
224
239
  readonly properties: {
225
240
  readonly type: {
226
- readonly enum: readonly ["candle_solid", "candle_stroke", "candle_up_stroke", "candle_down_stroke", "ohlc"];
241
+ readonly enum: readonly ["candle_solid", "candle_stroke", "candle_up_stroke", "candle_down_stroke", "ohlc", "area"];
242
+ };
243
+ readonly area: {
244
+ readonly type: "object";
245
+ readonly additionalProperties: false;
246
+ readonly required: readonly ["value", "line", "backgroundColor", "smooth", "pointVisible"];
247
+ readonly properties: {
248
+ readonly value: {
249
+ readonly const: "close";
250
+ };
251
+ readonly line: {
252
+ readonly type: "object";
253
+ readonly additionalProperties: false;
254
+ readonly required: readonly ["color", "size"];
255
+ readonly properties: {
256
+ readonly color: {
257
+ readonly const: "rgba(41, 98, 255, 1)";
258
+ };
259
+ readonly size: {
260
+ readonly const: 2;
261
+ };
262
+ };
263
+ };
264
+ readonly backgroundColor: {
265
+ readonly const: "rgba(0, 0, 0, 0)";
266
+ };
267
+ readonly smooth: {
268
+ readonly const: false;
269
+ };
270
+ readonly pointVisible: {
271
+ readonly const: false;
272
+ };
273
+ };
227
274
  };
228
275
  readonly upColor: {
229
276
  readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
@@ -253,6 +300,25 @@ export declare const ChartConfigSchema: {
253
300
  readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor";
254
301
  };
255
302
  };
303
+ readonly if: {
304
+ readonly properties: {
305
+ readonly type: {
306
+ readonly const: "area";
307
+ };
308
+ };
309
+ readonly required: readonly ["type"];
310
+ };
311
+ readonly then: {
312
+ readonly required: readonly ["area"];
313
+ readonly properties: {
314
+ readonly area: true;
315
+ };
316
+ };
317
+ readonly else: {
318
+ readonly not: {
319
+ readonly required: readonly ["area"];
320
+ };
321
+ };
256
322
  };
257
323
  readonly grid: {
258
324
  readonly type: "object";
@@ -641,7 +707,7 @@ export declare const ChartSceneSchema: {
641
707
  readonly $ref: "#/$defs/symbol";
642
708
  };
643
709
  readonly period: {
644
- readonly $ref: "#/$defs/period";
710
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/period";
645
711
  };
646
712
  readonly data: {
647
713
  readonly type: "array";
@@ -707,21 +773,6 @@ export declare const ChartSceneSchema: {
707
773
  };
708
774
  };
709
775
  };
710
- readonly period: {
711
- readonly type: "object";
712
- readonly additionalProperties: false;
713
- readonly required: readonly ["span", "type"];
714
- readonly properties: {
715
- readonly span: {
716
- readonly type: "integer";
717
- readonly minimum: 1;
718
- readonly maximum: 100000;
719
- };
720
- readonly type: {
721
- readonly enum: readonly ["second", "minute", "hour", "day", "week", "month", "year"];
722
- };
723
- };
724
- };
725
776
  readonly viewport: {
726
777
  readonly type: "object";
727
778
  readonly additionalProperties: false;
@@ -777,6 +828,707 @@ export declare const ChartSceneSchema: {
777
828
  };
778
829
  };
779
830
  };
831
+ export declare const DrawingDocumentSchema: {
832
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
833
+ readonly $id: "https://baron.dev/kline-scene/drawing-document.schema.json";
834
+ readonly title: "DrawingDocument";
835
+ readonly type: "object";
836
+ readonly additionalProperties: false;
837
+ readonly required: readonly ["schema", "version", "scopeKey", "coordinateSystem", "drawings", "metadata"];
838
+ readonly properties: {
839
+ readonly schema: {
840
+ readonly const: "@baron1996/drawing-document";
841
+ };
842
+ readonly version: {
843
+ readonly const: 1;
844
+ };
845
+ readonly scopeKey: {
846
+ readonly type: "string";
847
+ readonly minLength: 1;
848
+ readonly maxLength: 256;
849
+ };
850
+ readonly coordinateSystem: {
851
+ readonly $ref: "#/$defs/coordinateSystem";
852
+ };
853
+ readonly drawings: {
854
+ readonly type: "array";
855
+ readonly maxItems: 10000;
856
+ readonly items: {
857
+ readonly $ref: "#/$defs/drawing";
858
+ };
859
+ };
860
+ readonly metadata: {
861
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/metadata";
862
+ };
863
+ };
864
+ readonly $defs: {
865
+ readonly coordinateSystem: {
866
+ readonly type: "object";
867
+ readonly additionalProperties: false;
868
+ readonly required: readonly ["timezone", "valueAxes"];
869
+ readonly properties: {
870
+ readonly timezone: {
871
+ readonly $ref: "#/$defs/timezone";
872
+ };
873
+ readonly valueAxes: {
874
+ readonly $ref: "#/$defs/valueAxes";
875
+ };
876
+ };
877
+ };
878
+ readonly timezone: {
879
+ readonly type: "string";
880
+ readonly minLength: 1;
881
+ readonly maxLength: 128;
882
+ readonly pattern: "^[A-Za-z_+-]+(?:/[A-Za-z0-9_+-]+)*$";
883
+ };
884
+ readonly valueAxes: {
885
+ readonly type: "array";
886
+ readonly minItems: 1;
887
+ readonly maxItems: 64;
888
+ readonly items: {
889
+ readonly $ref: "#/$defs/valueAxis";
890
+ };
891
+ };
892
+ readonly valueAxis: {
893
+ readonly type: "object";
894
+ readonly additionalProperties: false;
895
+ readonly required: readonly ["paneRole", "yAxisRole", "valuePrecision"];
896
+ readonly properties: {
897
+ readonly paneRole: {
898
+ readonly type: "string";
899
+ readonly minLength: 1;
900
+ readonly maxLength: 128;
901
+ };
902
+ readonly yAxisRole: {
903
+ readonly type: "string";
904
+ readonly minLength: 1;
905
+ readonly maxLength: 128;
906
+ };
907
+ readonly valuePrecision: {
908
+ readonly type: "integer";
909
+ readonly minimum: 0;
910
+ readonly maximum: 16;
911
+ };
912
+ };
913
+ };
914
+ readonly target: {
915
+ readonly type: "object";
916
+ readonly additionalProperties: false;
917
+ readonly required: readonly ["paneRole", "yAxisRole"];
918
+ readonly properties: {
919
+ readonly paneRole: {
920
+ readonly type: "string";
921
+ readonly minLength: 1;
922
+ readonly maxLength: 128;
923
+ };
924
+ readonly yAxisRole: {
925
+ readonly type: "string";
926
+ readonly minLength: 1;
927
+ readonly maxLength: 128;
928
+ };
929
+ };
930
+ };
931
+ readonly drawingStyles: {
932
+ readonly type: "object";
933
+ readonly additionalProperties: false;
934
+ readonly required: readonly ["line", "fill", "text"];
935
+ readonly properties: {
936
+ readonly line: {
937
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/lineStyle";
938
+ };
939
+ readonly fill: {
940
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/fillStyle";
941
+ };
942
+ readonly text: {
943
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/textStyle";
944
+ };
945
+ };
946
+ };
947
+ readonly drawingBase: {
948
+ readonly type: "object";
949
+ readonly additionalProperties: false;
950
+ readonly required: readonly ["id", "target", "visible", "locked", "zLevel", "mode", "styles"];
951
+ readonly properties: {
952
+ readonly id: {
953
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/stableId";
954
+ };
955
+ readonly groupId: {
956
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/stableId";
957
+ };
958
+ readonly target: {
959
+ readonly $ref: "#/$defs/target";
960
+ };
961
+ readonly visible: {
962
+ readonly type: "boolean";
963
+ };
964
+ readonly locked: {
965
+ readonly type: "boolean";
966
+ };
967
+ readonly zLevel: {
968
+ readonly type: "integer";
969
+ readonly minimum: -1000;
970
+ readonly maximum: 1000;
971
+ };
972
+ readonly mode: {
973
+ readonly enum: readonly ["normal", "weak_magnet", "strong_magnet"];
974
+ };
975
+ readonly styles: {
976
+ readonly $ref: "#/$defs/drawingStyles";
977
+ };
978
+ readonly metadata: {
979
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/metadata";
980
+ };
981
+ };
982
+ };
983
+ readonly drawingTimeAnchor: {
984
+ readonly type: "object";
985
+ readonly additionalProperties: false;
986
+ readonly required: readonly ["timestamp", "granularity"];
987
+ readonly properties: {
988
+ readonly timestamp: {
989
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/safeInteger";
990
+ };
991
+ readonly granularity: {
992
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/period";
993
+ };
994
+ };
995
+ };
996
+ readonly timeValuePoint: {
997
+ readonly type: "object";
998
+ readonly additionalProperties: false;
999
+ readonly required: readonly ["timestamp", "granularity", "value"];
1000
+ readonly properties: {
1001
+ readonly timestamp: {
1002
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/safeInteger";
1003
+ };
1004
+ readonly granularity: {
1005
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/period";
1006
+ };
1007
+ readonly value: {
1008
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber";
1009
+ };
1010
+ };
1011
+ };
1012
+ readonly geometryValue: {
1013
+ readonly type: "object";
1014
+ readonly additionalProperties: false;
1015
+ readonly required: readonly ["value"];
1016
+ readonly properties: {
1017
+ readonly value: {
1018
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber";
1019
+ };
1020
+ };
1021
+ };
1022
+ readonly geometryValueText: {
1023
+ readonly type: "object";
1024
+ readonly additionalProperties: false;
1025
+ readonly required: readonly ["value", "text"];
1026
+ readonly properties: {
1027
+ readonly value: {
1028
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber";
1029
+ };
1030
+ readonly text: {
1031
+ readonly type: "string";
1032
+ readonly maxLength: 4096;
1033
+ };
1034
+ };
1035
+ };
1036
+ readonly geometryTime: {
1037
+ readonly type: "object";
1038
+ readonly additionalProperties: false;
1039
+ readonly required: readonly ["time"];
1040
+ readonly properties: {
1041
+ readonly time: {
1042
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/safeInteger";
1043
+ };
1044
+ };
1045
+ };
1046
+ readonly geometryValueSpan: {
1047
+ readonly type: "object";
1048
+ readonly additionalProperties: false;
1049
+ readonly required: readonly ["value", "startTime", "endTime"];
1050
+ readonly properties: {
1051
+ readonly value: {
1052
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber";
1053
+ };
1054
+ readonly startTime: {
1055
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/safeInteger";
1056
+ };
1057
+ readonly endTime: {
1058
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/safeInteger";
1059
+ };
1060
+ };
1061
+ };
1062
+ readonly geometryTimeSpan: {
1063
+ readonly type: "object";
1064
+ readonly additionalProperties: false;
1065
+ readonly required: readonly ["time", "startValue", "endValue"];
1066
+ readonly properties: {
1067
+ readonly time: {
1068
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/safeInteger";
1069
+ };
1070
+ readonly startValue: {
1071
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber";
1072
+ };
1073
+ readonly endValue: {
1074
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber";
1075
+ };
1076
+ };
1077
+ };
1078
+ readonly geometryTwoPoints: {
1079
+ readonly type: "object";
1080
+ readonly additionalProperties: false;
1081
+ readonly required: readonly ["points"];
1082
+ readonly properties: {
1083
+ readonly points: {
1084
+ readonly type: "array";
1085
+ readonly minItems: 2;
1086
+ readonly maxItems: 2;
1087
+ readonly items: {
1088
+ readonly $ref: "#/$defs/timeValuePoint";
1089
+ };
1090
+ };
1091
+ };
1092
+ };
1093
+ readonly geometryThreePoints: {
1094
+ readonly type: "object";
1095
+ readonly additionalProperties: false;
1096
+ readonly required: readonly ["points"];
1097
+ readonly properties: {
1098
+ readonly points: {
1099
+ readonly type: "array";
1100
+ readonly minItems: 3;
1101
+ readonly maxItems: 3;
1102
+ readonly items: {
1103
+ readonly $ref: "#/$defs/timeValuePoint";
1104
+ };
1105
+ };
1106
+ };
1107
+ };
1108
+ readonly geometryBrushPoints: {
1109
+ readonly type: "object";
1110
+ readonly additionalProperties: false;
1111
+ readonly required: readonly ["points"];
1112
+ readonly properties: {
1113
+ readonly points: {
1114
+ readonly type: "array";
1115
+ readonly minItems: 2;
1116
+ readonly maxItems: 256;
1117
+ readonly items: {
1118
+ readonly $ref: "#/$defs/timeValuePoint";
1119
+ };
1120
+ };
1121
+ };
1122
+ };
1123
+ readonly geometryPointText: {
1124
+ readonly type: "object";
1125
+ readonly additionalProperties: false;
1126
+ readonly required: readonly ["point", "text"];
1127
+ readonly properties: {
1128
+ readonly point: {
1129
+ readonly $ref: "#/$defs/timeValuePoint";
1130
+ };
1131
+ readonly text: {
1132
+ readonly type: "string";
1133
+ readonly maxLength: 4096;
1134
+ };
1135
+ };
1136
+ };
1137
+ readonly geometryPoint: {
1138
+ readonly type: "object";
1139
+ readonly additionalProperties: false;
1140
+ readonly required: readonly ["point"];
1141
+ readonly properties: {
1142
+ readonly point: {
1143
+ readonly $ref: "#/$defs/timeValuePoint";
1144
+ };
1145
+ };
1146
+ };
1147
+ readonly geometryStartEnd: {
1148
+ readonly type: "object";
1149
+ readonly additionalProperties: false;
1150
+ readonly required: readonly ["start", "end"];
1151
+ readonly properties: {
1152
+ readonly start: {
1153
+ readonly $ref: "#/$defs/timeValuePoint";
1154
+ };
1155
+ readonly end: {
1156
+ readonly $ref: "#/$defs/timeValuePoint";
1157
+ };
1158
+ };
1159
+ };
1160
+ readonly drawing: {
1161
+ readonly type: "object";
1162
+ readonly additionalProperties: false;
1163
+ readonly required: readonly ["id", "target", "visible", "locked", "zLevel", "mode", "styles", "type", "geometry"];
1164
+ readonly properties: {
1165
+ readonly id: {
1166
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/stableId";
1167
+ };
1168
+ readonly groupId: {
1169
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/stableId";
1170
+ };
1171
+ readonly target: {
1172
+ readonly $ref: "#/$defs/target";
1173
+ };
1174
+ readonly visible: {
1175
+ readonly type: "boolean";
1176
+ };
1177
+ readonly locked: {
1178
+ readonly type: "boolean";
1179
+ };
1180
+ readonly zLevel: {
1181
+ readonly type: "integer";
1182
+ readonly minimum: -1000;
1183
+ readonly maximum: 1000;
1184
+ };
1185
+ readonly mode: {
1186
+ readonly enum: readonly ["normal", "weak_magnet", "strong_magnet"];
1187
+ };
1188
+ readonly styles: {
1189
+ readonly $ref: "#/$defs/drawingStyles";
1190
+ };
1191
+ readonly metadata: {
1192
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/metadata";
1193
+ };
1194
+ readonly type: {
1195
+ readonly enum: readonly ["horizontalStraightLine", "priceLine", "simpleTag", "verticalStraightLine", "horizontalRayLine", "horizontalSegment", "verticalRayLine", "verticalSegment", "rayLine", "segment", "straightLine", "fibonacciLine", "priceChannelLine", "parallelStraightLine", "brush", "simpleAnnotation", "callout", "text", "crossLine", "rectangle", "arrow", "priceMeasurement"];
1196
+ };
1197
+ readonly geometry: {
1198
+ readonly type: "object";
1199
+ };
1200
+ };
1201
+ readonly oneOf: readonly [{
1202
+ readonly title: "DrawingHorizontalStraightLine";
1203
+ readonly properties: {
1204
+ readonly type: {
1205
+ readonly const: "horizontalStraightLine";
1206
+ };
1207
+ readonly geometry: {
1208
+ readonly $ref: "#/$defs/geometryValue";
1209
+ };
1210
+ };
1211
+ readonly required: readonly ["type", "geometry"];
1212
+ }, {
1213
+ readonly title: "DrawingPriceLine";
1214
+ readonly properties: {
1215
+ readonly type: {
1216
+ readonly const: "priceLine";
1217
+ };
1218
+ readonly geometry: {
1219
+ readonly $ref: "#/$defs/geometryValue";
1220
+ };
1221
+ };
1222
+ readonly required: readonly ["type", "geometry"];
1223
+ }, {
1224
+ readonly title: "DrawingSimpleTag";
1225
+ readonly properties: {
1226
+ readonly type: {
1227
+ readonly const: "simpleTag";
1228
+ };
1229
+ readonly geometry: {
1230
+ readonly $ref: "#/$defs/geometryValueText";
1231
+ };
1232
+ };
1233
+ readonly required: readonly ["type", "geometry"];
1234
+ }, {
1235
+ readonly title: "DrawingVerticalStraightLine";
1236
+ readonly properties: {
1237
+ readonly type: {
1238
+ readonly const: "verticalStraightLine";
1239
+ };
1240
+ readonly geometry: {
1241
+ readonly $ref: "#/$defs/geometryTime";
1242
+ };
1243
+ };
1244
+ readonly required: readonly ["type", "geometry"];
1245
+ }, {
1246
+ readonly title: "DrawingHorizontalRayLine";
1247
+ readonly properties: {
1248
+ readonly type: {
1249
+ readonly const: "horizontalRayLine";
1250
+ };
1251
+ readonly geometry: {
1252
+ readonly $ref: "#/$defs/geometryValueSpan";
1253
+ };
1254
+ };
1255
+ readonly required: readonly ["type", "geometry"];
1256
+ }, {
1257
+ readonly title: "DrawingHorizontalSegment";
1258
+ readonly properties: {
1259
+ readonly type: {
1260
+ readonly const: "horizontalSegment";
1261
+ };
1262
+ readonly geometry: {
1263
+ readonly $ref: "#/$defs/geometryValueSpan";
1264
+ };
1265
+ };
1266
+ readonly required: readonly ["type", "geometry"];
1267
+ }, {
1268
+ readonly title: "DrawingVerticalRayLine";
1269
+ readonly properties: {
1270
+ readonly type: {
1271
+ readonly const: "verticalRayLine";
1272
+ };
1273
+ readonly geometry: {
1274
+ readonly $ref: "#/$defs/geometryTimeSpan";
1275
+ };
1276
+ };
1277
+ readonly required: readonly ["type", "geometry"];
1278
+ }, {
1279
+ readonly title: "DrawingVerticalSegment";
1280
+ readonly properties: {
1281
+ readonly type: {
1282
+ readonly const: "verticalSegment";
1283
+ };
1284
+ readonly geometry: {
1285
+ readonly $ref: "#/$defs/geometryTimeSpan";
1286
+ };
1287
+ };
1288
+ readonly required: readonly ["type", "geometry"];
1289
+ }, {
1290
+ readonly title: "DrawingRayLine";
1291
+ readonly properties: {
1292
+ readonly type: {
1293
+ readonly const: "rayLine";
1294
+ };
1295
+ readonly geometry: {
1296
+ readonly $ref: "#/$defs/geometryTwoPoints";
1297
+ };
1298
+ };
1299
+ readonly required: readonly ["type", "geometry"];
1300
+ }, {
1301
+ readonly title: "DrawingSegment";
1302
+ readonly properties: {
1303
+ readonly type: {
1304
+ readonly const: "segment";
1305
+ };
1306
+ readonly geometry: {
1307
+ readonly $ref: "#/$defs/geometryTwoPoints";
1308
+ };
1309
+ };
1310
+ readonly required: readonly ["type", "geometry"];
1311
+ }, {
1312
+ readonly title: "DrawingStraightLine";
1313
+ readonly properties: {
1314
+ readonly type: {
1315
+ readonly const: "straightLine";
1316
+ };
1317
+ readonly geometry: {
1318
+ readonly $ref: "#/$defs/geometryTwoPoints";
1319
+ };
1320
+ };
1321
+ readonly required: readonly ["type", "geometry"];
1322
+ }, {
1323
+ readonly title: "DrawingFibonacciLine";
1324
+ readonly properties: {
1325
+ readonly type: {
1326
+ readonly const: "fibonacciLine";
1327
+ };
1328
+ readonly geometry: {
1329
+ readonly $ref: "#/$defs/geometryTwoPoints";
1330
+ };
1331
+ };
1332
+ readonly required: readonly ["type", "geometry"];
1333
+ }, {
1334
+ readonly title: "DrawingPriceChannelLine";
1335
+ readonly properties: {
1336
+ readonly type: {
1337
+ readonly const: "priceChannelLine";
1338
+ };
1339
+ readonly geometry: {
1340
+ readonly $ref: "#/$defs/geometryThreePoints";
1341
+ };
1342
+ };
1343
+ readonly required: readonly ["type", "geometry"];
1344
+ }, {
1345
+ readonly title: "DrawingParallelStraightLine";
1346
+ readonly properties: {
1347
+ readonly type: {
1348
+ readonly const: "parallelStraightLine";
1349
+ };
1350
+ readonly geometry: {
1351
+ readonly $ref: "#/$defs/geometryThreePoints";
1352
+ };
1353
+ };
1354
+ readonly required: readonly ["type", "geometry"];
1355
+ }, {
1356
+ readonly title: "DrawingBrush";
1357
+ readonly properties: {
1358
+ readonly type: {
1359
+ readonly const: "brush";
1360
+ };
1361
+ readonly geometry: {
1362
+ readonly $ref: "#/$defs/geometryBrushPoints";
1363
+ };
1364
+ };
1365
+ readonly required: readonly ["type", "geometry"];
1366
+ }, {
1367
+ readonly title: "DrawingSimpleAnnotation";
1368
+ readonly properties: {
1369
+ readonly type: {
1370
+ readonly const: "simpleAnnotation";
1371
+ };
1372
+ readonly geometry: {
1373
+ readonly $ref: "#/$defs/geometryPointText";
1374
+ };
1375
+ };
1376
+ readonly required: readonly ["type", "geometry"];
1377
+ }, {
1378
+ readonly title: "DrawingCallout";
1379
+ readonly properties: {
1380
+ readonly type: {
1381
+ readonly const: "callout";
1382
+ };
1383
+ readonly geometry: {
1384
+ readonly $ref: "#/$defs/geometryPointText";
1385
+ };
1386
+ };
1387
+ readonly required: readonly ["type", "geometry"];
1388
+ }, {
1389
+ readonly title: "DrawingText";
1390
+ readonly properties: {
1391
+ readonly type: {
1392
+ readonly const: "text";
1393
+ };
1394
+ readonly geometry: {
1395
+ readonly $ref: "#/$defs/geometryPointText";
1396
+ };
1397
+ };
1398
+ readonly required: readonly ["type", "geometry"];
1399
+ }, {
1400
+ readonly title: "DrawingCrossLine";
1401
+ readonly properties: {
1402
+ readonly type: {
1403
+ readonly const: "crossLine";
1404
+ };
1405
+ readonly geometry: {
1406
+ readonly $ref: "#/$defs/geometryPoint";
1407
+ };
1408
+ };
1409
+ readonly required: readonly ["type", "geometry"];
1410
+ }, {
1411
+ readonly title: "DrawingRectangle";
1412
+ readonly properties: {
1413
+ readonly type: {
1414
+ readonly const: "rectangle";
1415
+ };
1416
+ readonly geometry: {
1417
+ readonly $ref: "#/$defs/geometryStartEnd";
1418
+ };
1419
+ };
1420
+ readonly required: readonly ["type", "geometry"];
1421
+ }, {
1422
+ readonly title: "DrawingArrow";
1423
+ readonly properties: {
1424
+ readonly type: {
1425
+ readonly const: "arrow";
1426
+ };
1427
+ readonly geometry: {
1428
+ readonly $ref: "#/$defs/geometryStartEnd";
1429
+ };
1430
+ };
1431
+ readonly required: readonly ["type", "geometry"];
1432
+ }, {
1433
+ readonly title: "DrawingPriceMeasurement";
1434
+ readonly properties: {
1435
+ readonly type: {
1436
+ readonly const: "priceMeasurement";
1437
+ };
1438
+ readonly geometry: {
1439
+ readonly $ref: "#/$defs/geometryStartEnd";
1440
+ };
1441
+ };
1442
+ readonly required: readonly ["type", "geometry"];
1443
+ }];
1444
+ };
1445
+ };
1446
+ };
1447
+ export declare const DrawableWorkspaceSchema: {
1448
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
1449
+ readonly $id: "https://baron.dev/kline-scene/drawable-workspace.schema.json";
1450
+ readonly title: "DrawableWorkspaceDocument";
1451
+ readonly type: "object";
1452
+ readonly additionalProperties: false;
1453
+ readonly required: readonly ["schema", "version", "runtime", "scene", "drawings", "binding", "metadata"];
1454
+ readonly properties: {
1455
+ readonly schema: {
1456
+ readonly const: "@baron1996/drawable-workspace";
1457
+ };
1458
+ readonly version: {
1459
+ readonly const: 1;
1460
+ };
1461
+ readonly runtime: {
1462
+ readonly type: "object";
1463
+ readonly additionalProperties: false;
1464
+ readonly required: readonly ["engine", "engineVersion", "workspaceRuntimeVersion"];
1465
+ readonly properties: {
1466
+ readonly engine: {
1467
+ readonly const: "klinecharts";
1468
+ };
1469
+ readonly engineVersion: {
1470
+ readonly const: "10.0.0";
1471
+ };
1472
+ readonly workspaceRuntimeVersion: {
1473
+ readonly const: "1.0.0";
1474
+ };
1475
+ };
1476
+ };
1477
+ readonly scene: {
1478
+ readonly oneOf: readonly [{
1479
+ readonly title: "ChartWorkspaceScene";
1480
+ readonly type: "object";
1481
+ readonly additionalProperties: false;
1482
+ readonly required: readonly ["kind", "document"];
1483
+ readonly properties: {
1484
+ readonly kind: {
1485
+ readonly const: "chart";
1486
+ };
1487
+ readonly document: {
1488
+ readonly $ref: "https://baron.dev/kline-scene/chart-scene.schema.json";
1489
+ };
1490
+ };
1491
+ }, {
1492
+ readonly title: "TimeSeriesWorkspaceScene";
1493
+ readonly type: "object";
1494
+ readonly additionalProperties: false;
1495
+ readonly required: readonly ["kind", "document"];
1496
+ readonly properties: {
1497
+ readonly kind: {
1498
+ readonly const: "time-series";
1499
+ };
1500
+ readonly document: {
1501
+ readonly $ref: "https://baron.dev/kline-scene/time-series-scene.schema.json";
1502
+ };
1503
+ };
1504
+ }];
1505
+ };
1506
+ readonly drawings: {
1507
+ readonly $ref: "https://baron.dev/kline-scene/drawing-document.schema.json";
1508
+ };
1509
+ readonly binding: {
1510
+ readonly type: "object";
1511
+ readonly additionalProperties: false;
1512
+ readonly required: readonly ["scopeKey", "timezone", "valueAxes"];
1513
+ readonly properties: {
1514
+ readonly scopeKey: {
1515
+ readonly type: "string";
1516
+ readonly minLength: 1;
1517
+ readonly maxLength: 256;
1518
+ };
1519
+ readonly timezone: {
1520
+ readonly $ref: "https://baron.dev/kline-scene/drawing-document.schema.json#/$defs/timezone";
1521
+ };
1522
+ readonly valueAxes: {
1523
+ readonly $ref: "https://baron.dev/kline-scene/drawing-document.schema.json#/$defs/valueAxes";
1524
+ };
1525
+ };
1526
+ };
1527
+ readonly metadata: {
1528
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/metadata";
1529
+ };
1530
+ };
1531
+ };
780
1532
  export declare const TimeSeriesRuntimeSchema: {
781
1533
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
782
1534
  readonly $id: "https://baron.dev/kline-scene/time-series-runtime.schema.json";
@@ -899,7 +1651,7 @@ export declare const TimeSeriesSceneSchema: {
899
1651
  readonly $ref: "https://baron.dev/kline-scene/time-series-runtime.schema.json";
900
1652
  };
901
1653
  readonly period: {
902
- readonly $ref: "#/$defs/timeSeriesPeriod";
1654
+ readonly $ref: "https://baron.dev/kline-scene/common.schema.json#/$defs/period";
903
1655
  };
904
1656
  readonly series: {
905
1657
  readonly type: "array";
@@ -931,21 +1683,6 @@ export declare const TimeSeriesSceneSchema: {
931
1683
  };
932
1684
  };
933
1685
  readonly $defs: {
934
- readonly timeSeriesPeriod: {
935
- readonly type: "object";
936
- readonly additionalProperties: false;
937
- readonly required: readonly ["span", "type"];
938
- readonly properties: {
939
- readonly span: {
940
- readonly type: "integer";
941
- readonly minimum: 1;
942
- readonly maximum: 100000;
943
- };
944
- readonly type: {
945
- readonly enum: readonly ["second", "minute", "hour", "day", "week", "month", "year"];
946
- };
947
- };
948
- };
949
1686
  readonly timeSeriesDefinition: {
950
1687
  readonly type: "object";
951
1688
  readonly additionalProperties: false;