@363045841yyt/klinechart 0.7.5 → 0.7.7
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 +4 -4
- package/dist/components/ChartSettingsDialog.vue.d.ts +14 -0
- package/dist/components/ChartSettingsDialog.vue.d.ts.map +1 -0
- package/dist/components/ColorPresetPanel.vue.d.ts +12 -0
- package/dist/components/ColorPresetPanel.vue.d.ts.map +1 -0
- package/dist/components/DrawingStyleToolbar.vue.d.ts +1 -15
- package/dist/components/DrawingStyleToolbar.vue.d.ts.map +1 -1
- package/dist/components/IndicatorParams.vue.d.ts.map +1 -1
- package/dist/components/IndicatorSelector.vue.d.ts.map +1 -1
- package/dist/components/KLineChart.vue.d.ts +7 -6
- package/dist/components/KLineChart.vue.d.ts.map +1 -1
- package/dist/components/KLineTooltip.vue.d.ts +9 -2
- package/dist/components/KLineTooltip.vue.d.ts.map +1 -1
- package/dist/components/LeftToolbar.vue.d.ts +4 -3
- package/dist/components/LeftToolbar.vue.d.ts.map +1 -1
- package/dist/components/MarkerTooltip.vue.d.ts +1 -12
- package/dist/components/MarkerTooltip.vue.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/composables/useFullscreenTeleportTarget.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.css +1 -0
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1009 -905
- package/dist/version.d.ts +1 -1
- package/dist/web-component.d.ts +18 -0
- package/dist/web-component.d.ts.map +1 -0
- package/package.json +10 -2
- package/src/__tests__/_mockController.ts +11 -1
- package/src/components/ChartSettingsDialog.vue +624 -0
- package/src/components/ColorPresetPanel.vue +289 -0
- package/src/components/DrawingStyleToolbar.vue +12 -25
- package/src/components/IndicatorParams.vue +58 -57
- package/src/components/IndicatorSelector.vue +91 -88
- package/src/components/KLineChart.vue +267 -442
- package/src/components/KLineTooltip.vue +19 -13
- package/src/components/LeftToolbar.vue +35 -393
- package/src/components/MarkerTooltip.vue +5 -16
- package/src/components/index.ts +1 -0
- package/src/composables/useFullscreenTeleportTarget.ts +0 -2
- package/src/web-component.ts +14 -0
- package/dist/klinechart.css +0 -2
package/dist/version.d.ts
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SemanticChartConfig, DataFetcher } from '@363045841yyt/klinechart-core/semantic';
|
|
2
|
+
declare const KLineChartElement: import('vue').VueElementConstructor<{
|
|
3
|
+
semanticConfig: SemanticChartConfig;
|
|
4
|
+
dataFetcher: DataFetcher;
|
|
5
|
+
yPaddingPx?: number;
|
|
6
|
+
minKWidth?: number;
|
|
7
|
+
maxKWidth?: number;
|
|
8
|
+
rightAxisWidth?: number;
|
|
9
|
+
bottomAxisHeight?: number;
|
|
10
|
+
priceLabelWidth?: number;
|
|
11
|
+
zoomLevels?: number;
|
|
12
|
+
initialZoomLevel?: number;
|
|
13
|
+
isFullscreen?: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
export { KLineChartElement };
|
|
16
|
+
export default KLineChartElement;
|
|
17
|
+
export type { SemanticChartConfig, DataFetcher };
|
|
18
|
+
//# sourceMappingURL=web-component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-component.d.ts","sourceRoot":"","sources":["../src/web-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAE9F,QAAA,MAAM,iBAAiB;;;;;;;;;;;;EAErB,CAAA;AAIF,OAAO,EAAE,iBAAiB,EAAE,CAAA;AAC5B,eAAe,iBAAiB,CAAA;AAEhC,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@363045841yyt/klinechart",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
4
4
|
"description": "Vue 3 bindings for @363045841yyt/klinechart-core. Idiomatic composables, SFC components.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
"default": "./dist/index.cjs"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
|
+
"./web-component": {
|
|
32
|
+
"import": {
|
|
33
|
+
"default": "./dist/kline-chart.js"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
31
36
|
"./style.css": "./dist/klinechart.css"
|
|
32
37
|
},
|
|
33
38
|
"files": [
|
|
@@ -39,7 +44,8 @@
|
|
|
39
44
|
},
|
|
40
45
|
"scripts": {
|
|
41
46
|
"dev": "vite --config preview/vite.config.ts",
|
|
42
|
-
"build": "vite build
|
|
47
|
+
"build": "vite build",
|
|
48
|
+
"build:wc": "cross-env BUILD_TARGET=web-component vite build",
|
|
43
49
|
"postbuild": "node -e \"require('fs').copyFileSync('dist/index.d.ts','dist/index.d.cts')\"",
|
|
44
50
|
"test": "vitest run",
|
|
45
51
|
"test:watch": "vitest",
|
|
@@ -69,6 +75,7 @@
|
|
|
69
75
|
"@size-limit/preset-small-lib": "^12.1.0",
|
|
70
76
|
"@vitejs/plugin-vue": "^6.0.0",
|
|
71
77
|
"@vue/test-utils": "^2.4.10",
|
|
78
|
+
"cross-env": "^7.0.3",
|
|
72
79
|
"jsdom": "^29.1.1",
|
|
73
80
|
"publint": "^0.3.0",
|
|
74
81
|
"size-limit": "^12.1.0",
|
|
@@ -76,6 +83,7 @@
|
|
|
76
83
|
"unplugin-icons": "^23.0.1",
|
|
77
84
|
"vite": "^8.0.14",
|
|
78
85
|
"vite-plugin-babel": "^1.3.2",
|
|
86
|
+
"vite-plugin-css-injected-by-js": "^5.0.1",
|
|
79
87
|
"vite-plugin-dts": "^5.0.1",
|
|
80
88
|
"vitest": "^4.1.5",
|
|
81
89
|
"vue": "^3.5.0"
|
|
@@ -20,13 +20,14 @@ import type {
|
|
|
20
20
|
IndicatorDefinition,
|
|
21
21
|
IndicatorSelectorController,
|
|
22
22
|
KLineData,
|
|
23
|
+
PaneSpec,
|
|
23
24
|
ToolbarController,
|
|
24
25
|
ToolDefinition,
|
|
25
26
|
ToolId,
|
|
26
27
|
} from '@363045841yyt/klinechart-core'
|
|
27
28
|
|
|
28
29
|
// ---------------------------------------------------------------------------
|
|
29
|
-
// Inline mini-signal �?Object.is-equality, sync notify. Drop-in compatible
|
|
30
|
+
// Inline mini-signal �?Object.is-equality, sync notify. Drop-in compatible
|
|
30
31
|
// with `@363045841yyt/klinechart-core/reactivity` for shape-only test purposes.
|
|
31
32
|
// ---------------------------------------------------------------------------
|
|
32
33
|
|
|
@@ -132,6 +133,7 @@ export function createMockChartController(
|
|
|
132
133
|
})
|
|
133
134
|
const data = createSignal<ReadonlyArray<KLineData>>(opts.data ?? [])
|
|
134
135
|
const theme = createSignal<'light' | 'dark'>(opts.theme ?? 'light')
|
|
136
|
+
const paneLayout = createSignal<ReadonlyArray<PaneSpec>>([])
|
|
135
137
|
const indicatorSelector = createMockIndicatorSelector()
|
|
136
138
|
const toolbar = createMockToolbar()
|
|
137
139
|
const drawing = createMockDrawing()
|
|
@@ -140,12 +142,15 @@ export function createMockChartController(
|
|
|
140
142
|
viewport,
|
|
141
143
|
data,
|
|
142
144
|
theme,
|
|
145
|
+
paneLayout,
|
|
143
146
|
indicatorSelector,
|
|
144
147
|
toolbar,
|
|
145
148
|
drawing,
|
|
146
149
|
setData: (next) => data.set(next),
|
|
147
150
|
appendData: (next) => data.set([...data.peek(), ...next]),
|
|
148
151
|
updateData: (next) => data.set(next),
|
|
152
|
+
getData: () => data.peek(),
|
|
153
|
+
getZoomLevelCount: () => 10,
|
|
149
154
|
setTheme: (next) => theme.set(next),
|
|
150
155
|
zoomToLevel: (level) =>
|
|
151
156
|
viewport.set({ ...viewport.peek(), zoomLevel: level }),
|
|
@@ -167,12 +172,17 @@ export function createMockChartController(
|
|
|
167
172
|
removeIndicator: () => false,
|
|
168
173
|
updateIndicatorParams: () => false,
|
|
169
174
|
updateRendererConfig: () => {},
|
|
175
|
+
setTooltipSize: () => {},
|
|
176
|
+
setTooltipAnchorPositioning: () => {},
|
|
177
|
+
getIndicatorTitle: () => undefined,
|
|
170
178
|
setDrawingTool: (tool) => drawing.setActiveTool(tool),
|
|
171
179
|
clearDrawings: () => drawing.clearAll(),
|
|
172
180
|
removeDrawing: () => {},
|
|
173
181
|
resizeSubPane: () => false,
|
|
174
182
|
createSubPane: () => false,
|
|
175
183
|
clearSubPanes: () => {},
|
|
184
|
+
replaceSubPaneIndicator: () => false,
|
|
185
|
+
updatePaneLayout: (_panes: PaneSpec[]) => {},
|
|
176
186
|
updateCustomMarkers: () => {},
|
|
177
187
|
clearCustomMarkers: () => {},
|
|
178
188
|
updateSettingsFacade: () => {},
|