@baron1996/klinecharts-adapter 0.1.0 → 0.2.1
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/README.md +6 -0
- package/dist/adapter.d.ts +40 -1
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +408 -22
- package/dist/conversion/overlays.d.ts +4 -1
- package/dist/conversion/overlays.d.ts.map +1 -1
- package/dist/conversion/overlays.js +26 -20
- package/dist/conversion/panes.d.ts +3 -1
- package/dist/conversion/panes.d.ts.map +1 -1
- package/dist/conversion/panes.js +7 -1
- package/dist/conversion/price.d.ts +6 -0
- package/dist/conversion/price.d.ts.map +1 -0
- package/dist/conversion/price.js +48 -0
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +3 -3
- package/dist/extensions/price-measurement.d.ts +13 -0
- package/dist/extensions/price-measurement.d.ts.map +1 -0
- package/dist/extensions/price-measurement.js +64 -0
- package/dist/extensions/register.d.ts.map +1 -1
- package/dist/extensions/register.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/interaction/dragging.d.ts +12 -0
- package/dist/interaction/dragging.d.ts.map +1 -0
- package/dist/interaction/dragging.js +71 -0
- package/dist/interaction/hit-testing.d.ts +26 -0
- package/dist/interaction/hit-testing.d.ts.map +1 -0
- package/dist/interaction/hit-testing.js +86 -0
- package/dist/interaction/selection-arbitration.d.ts +6 -0
- package/dist/interaction/selection-arbitration.d.ts.map +1 -0
- package/dist/interaction/selection-arbitration.js +10 -0
- package/dist/registry/overlays.d.ts +2 -2
- package/dist/registry/overlays.d.ts.map +1 -1
- package/dist/registry/overlays.js +1 -0
- package/dist/version.d.ts +3 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +3 -2
- package/package.json +2 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { hitTestOverlayGeometries, } from './hit-testing.js';
|
|
2
|
+
/**
|
|
3
|
+
* 仅忽略引擎旧命中区域产生的取消选择:回调坐标必须仍命中当前选中 Overlay 的规范几何。
|
|
4
|
+
*/
|
|
5
|
+
export function shouldIgnoreStaleOverlayDeselection(selectedOverlayId, deselectedOverlayId, coordinate, currentGeometries) {
|
|
6
|
+
if (selectedOverlayId !== deselectedOverlayId || coordinate === undefined) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
return hitTestOverlayGeometries(coordinate, currentGeometries)?.overlayId === deselectedOverlayId;
|
|
10
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SceneOverlay } from '@baron1996/kline-scene-schema';
|
|
2
2
|
export declare const BUILT_IN_OVERLAYS: readonly ["horizontalRayLine", "horizontalSegment", "horizontalStraightLine", "verticalRayLine", "verticalSegment", "verticalStraightLine", "rayLine", "segment", "straightLine", "priceLine", "priceChannelLine", "parallelStraightLine", "fibonacciLine", "brush", "simpleAnnotation", "simpleTag"];
|
|
3
|
-
export declare const PROJECT_OVERLAYS: readonly ["rectangle", "arrow", "crossLine", "callout", "text"];
|
|
4
|
-
export declare const SUPPORTED_OVERLAYS: readonly ["horizontalRayLine", "horizontalSegment", "horizontalStraightLine", "verticalRayLine", "verticalSegment", "verticalStraightLine", "rayLine", "segment", "straightLine", "priceLine", "priceChannelLine", "parallelStraightLine", "fibonacciLine", "brush", "simpleAnnotation", "simpleTag", "rectangle", "arrow", "crossLine", "callout", "text"];
|
|
3
|
+
export declare const PROJECT_OVERLAYS: readonly ["priceMeasurement", "rectangle", "arrow", "crossLine", "callout", "text"];
|
|
4
|
+
export declare const SUPPORTED_OVERLAYS: readonly ["horizontalRayLine", "horizontalSegment", "horizontalStraightLine", "verticalRayLine", "verticalSegment", "verticalStraightLine", "rayLine", "segment", "straightLine", "priceLine", "priceChannelLine", "parallelStraightLine", "fibonacciLine", "brush", "simpleAnnotation", "simpleTag", "priceMeasurement", "rectangle", "arrow", "crossLine", "callout", "text"];
|
|
5
5
|
export declare function isSupportedOverlay(name: string): name is SceneOverlay['type'];
|
|
6
6
|
//# sourceMappingURL=overlays.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlays.d.ts","sourceRoot":"","sources":["../../src/registry/overlays.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,eAAO,MAAM,iBAAiB,uSAiBsB,CAAC;AAErD,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"overlays.d.ts","sourceRoot":"","sources":["../../src/registry/overlays.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,eAAO,MAAM,iBAAiB,uSAiBsB,CAAC;AAErD,eAAO,MAAM,gBAAgB,qFAOuB,CAAC;AAErD,eAAO,MAAM,kBAAkB,iXAGqB,CAAC;AAIrD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,YAAY,CAAC,MAAM,CAAC,CAE7E"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/** Adapter 包版本。 */
|
|
2
|
-
export declare const ADAPTER_PACKAGE_VERSION: "0.1
|
|
2
|
+
export declare const ADAPTER_PACKAGE_VERSION: "0.2.1";
|
|
3
3
|
/** 唯一允许加载的 KLineCharts 引擎版本。 */
|
|
4
4
|
export declare const KLINECHARTS_ENGINE_VERSION: "10.0.0";
|
|
5
5
|
/** 与 ChartScene 绑定的 Runtime 协议版本。 */
|
|
6
|
-
export declare const KLINECHARTS_RUNTIME_VERSION: "0.
|
|
6
|
+
export declare const KLINECHARTS_RUNTIME_VERSION: "0.2.0";
|
|
7
|
+
export declare const SUPPORTED_KLINECHARTS_RUNTIME_VERSIONS: readonly ["0.1.0", "0.2.0"];
|
|
7
8
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,eAAO,MAAM,uBAAuB,EAAG,OAAgB,CAAC;AAExD,gCAAgC;AAChC,eAAO,MAAM,0BAA0B,EAAG,QAAiB,CAAC;AAE5D,qCAAqC;AACrC,eAAO,MAAM,2BAA2B,EAAG,OAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,eAAO,MAAM,uBAAuB,EAAG,OAAgB,CAAC;AAExD,gCAAgC;AAChC,eAAO,MAAM,0BAA0B,EAAG,QAAiB,CAAC;AAE5D,qCAAqC;AACrC,eAAO,MAAM,2BAA2B,EAAG,OAAgB,CAAC;AAC5D,eAAO,MAAM,sCAAsC,6BAA8B,CAAC"}
|
package/dist/version.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** Adapter 包版本。 */
|
|
2
|
-
export const ADAPTER_PACKAGE_VERSION = '0.1
|
|
2
|
+
export const ADAPTER_PACKAGE_VERSION = '0.2.1';
|
|
3
3
|
/** 唯一允许加载的 KLineCharts 引擎版本。 */
|
|
4
4
|
export const KLINECHARTS_ENGINE_VERSION = '10.0.0';
|
|
5
5
|
/** 与 ChartScene 绑定的 Runtime 协议版本。 */
|
|
6
|
-
export const KLINECHARTS_RUNTIME_VERSION = '0.
|
|
6
|
+
export const KLINECHARTS_RUNTIME_VERSION = '0.2.0';
|
|
7
|
+
export const SUPPORTED_KLINECHARTS_RUNTIME_VERSIONS = ['0.1.0', '0.2.0'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baron1996/klinecharts-adapter",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Controlled ChartScene adapter for KLineCharts.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@baron1996/kline-scene-schema": "0.1
|
|
41
|
+
"@baron1996/kline-scene-schema": "0.2.1",
|
|
42
42
|
"klinecharts": "10.0.0"
|
|
43
43
|
}
|
|
44
44
|
}
|