velo-plot 3.0.0 → 3.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/README.md +22 -15
- package/dist/ChartCore-AnR_3Xkb.js +7338 -0
- package/dist/ChartCore-AnR_3Xkb.js.map +1 -0
- package/dist/GpuChartRenderer-Dxc0hrQA.js +75 -0
- package/dist/GpuChartRenderer-Dxc0hrQA.js.map +1 -0
- package/dist/{index.core-BmZe2jRQ.js → PluginRegistry-CzMHebYP.js} +19 -33
- package/dist/PluginRegistry-CzMHebYP.js.map +1 -0
- package/dist/angular-hooks.js +1 -1
- package/dist/angular.js +8 -8
- package/dist/{axisFormat-CzumxpCL.js → axisFormat-Sz4WIJfQ.js} +2 -2
- package/dist/{axisFormat-CzumxpCL.js.map → axisFormat-Sz4WIJfQ.js.map} +1 -1
- package/dist/{chartSyncBridge-DbWrwtyP.js → chartSyncBridge-D_rCtbFq.js} +12 -11
- package/dist/{chartSyncBridge-DbWrwtyP.js.map → chartSyncBridge-D_rCtbFq.js.map} +1 -1
- package/dist/core/ChartStatistics.d.ts +1 -1
- package/dist/core/chart/ChartCore.d.ts +12 -17
- package/dist/core/chart/ChartFeatureHooks.d.ts +7 -0
- package/dist/core/chart/chartExportPatch.d.ts +2 -0
- package/dist/core/chart/overlaySeriesRegistry.d.ts +7 -0
- package/dist/core/chart/series/SeriesActions.d.ts +1 -0
- package/dist/core/chart/series/SeriesBufferLite.d.ts +13 -0
- package/dist/core/chart/series/seriesOptionsRegistry.d.ts +8 -0
- package/dist/core/chart/series/seriesTypeRegistry.d.ts +5 -0
- package/dist/createStackedChart-DqcLCFGS.js +1338 -0
- package/dist/createStackedChart-DqcLCFGS.js.map +1 -0
- package/dist/{hooks-CYPCxoZx.js → hooks-DH-3bewj.js} +7 -7
- package/dist/{hooks-CYPCxoZx.js.map → hooks-DH-3bewj.js.map} +1 -1
- package/dist/{index-qunX30Xu.js → index-B7PTX94B.js} +2133 -2133
- package/dist/index-B7PTX94B.js.map +1 -0
- package/dist/{index-BMiZoKmm.js → index-BgrvqltV.js} +67 -67
- package/dist/index-BgrvqltV.js.map +1 -0
- package/dist/index-Cv6ZDLWf.js +521 -0
- package/dist/index-Cv6ZDLWf.js.map +1 -0
- package/dist/index-qhscKTDy.js.map +1 -1
- package/dist/index.core.d.ts +8 -6
- package/dist/index.d.ts +1 -14
- package/dist/plugins/3d.js +3 -1
- package/dist/plugins/3d.js.map +1 -1
- package/dist/plugins/analysis.js.map +1 -1
- package/dist/plugins/createPlugin.d.ts +8 -0
- package/dist/plugins/debug.js +32 -32
- package/dist/plugins/debug.js.map +1 -1
- package/dist/plugins/gpu.js +2033 -209
- package/dist/plugins/gpu.js.map +1 -1
- package/dist/plugins/i18n.js +286 -23
- package/dist/plugins/i18n.js.map +1 -1
- package/dist/plugins/latex.js +766 -207
- package/dist/plugins/latex.js.map +1 -1
- package/dist/plugins/loading/index.d.ts +1 -2
- package/dist/plugins/loading.js +3 -4
- package/dist/plugins/offscreen.js +11 -10
- package/dist/plugins/offscreen.js.map +1 -1
- package/dist/plugins/regression.js +254 -256
- package/dist/plugins/regression.js.map +1 -1
- package/dist/plugins/streaming.js +1 -1
- package/dist/plugins/tools.js +1 -1
- package/dist/react.js +55 -58
- package/dist/react.js.map +1 -1
- package/dist/renderer/NativeWebGLRenderer.d.ts +2 -1
- package/dist/renderer/native/NativeWebGLRenderer.d.ts +5 -1
- package/dist/renderer/native/draw.d.ts +2 -47
- package/dist/renderer/native/drawCore.d.ts +27 -0
- package/dist/renderer/native/drawExtended.d.ts +29 -0
- package/dist/renderer/native/frameRenderExtended.d.ts +1 -0
- package/dist/renderer/native/frameRenderRegistry.d.ts +27 -0
- package/dist/renderer/native/programFactoryCore.d.ts +6 -0
- package/dist/renderer/native/programFactoryExtended.d.ts +4 -0
- package/dist/renderer/native/utils.d.ts +3 -29
- package/dist/renderer/native/utilsCore.d.ts +14 -0
- package/dist/renderer/native/utilsExtended.d.ts +17 -0
- package/dist/renderer/overlaySeriesExtended.d.ts +1 -0
- package/dist/renderer/registerExtendedSeries.d.ts +1 -0
- package/dist/renderer/registerWebGPU.d.ts +2 -0
- package/dist/renderer/seriesBufferExtended.d.ts +4 -0
- package/dist/scientific/index.d.ts +1 -5
- package/dist/scientific/registerScientific.d.ts +1 -0
- package/dist/scientific.js +41 -41
- package/dist/solid.js +56 -59
- package/dist/solid.js.map +1 -1
- package/dist/svelte.js +26 -29
- package/dist/svelte.js.map +1 -1
- package/dist/trading/index.d.ts +1 -4
- package/dist/trading/registerTrading.d.ts +3 -0
- package/dist/trading.js +42 -42
- package/dist/types.d.ts +3 -3
- package/dist/velo-plot.full.js +2212 -1351
- package/dist/velo-plot.full.js.map +1 -1
- package/dist/velo-plot.js +33 -28
- package/dist/velo-plot.js.map +1 -1
- package/dist/vue/index.d.ts +2 -2
- package/dist/vue.js +17 -20
- package/dist/vue.js.map +1 -1
- package/package.json +9 -1
- package/dist/ChartCore-BpzRvN4Y.js +0 -8467
- package/dist/ChartCore-BpzRvN4Y.js.map +0 -1
- package/dist/createStackedChart-Dm-YqUT7.js +0 -756
- package/dist/createStackedChart-Dm-YqUT7.js.map +0 -1
- package/dist/gpuRenderer-BpaMYz-k.js +0 -1848
- package/dist/gpuRenderer-BpaMYz-k.js.map +0 -1
- package/dist/index-BMiZoKmm.js.map +0 -1
- package/dist/index-qunX30Xu.js.map +0 -1
- package/dist/index-x4stH3jD.js +0 -282
- package/dist/index-x4stH3jD.js.map +0 -1
- package/dist/index.core-BmZe2jRQ.js.map +0 -1
- package/dist/mockDatafeed-DHIDPcpX.js +0 -515
- package/dist/mockDatafeed-DHIDPcpX.js.map +0 -1
- package/dist/symbols-DT0eLlpW.js +0 -568
- package/dist/symbols-DT0eLlpW.js.map +0 -1
package/dist/velo-plot.js
CHANGED
|
@@ -1,32 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as S } from "./
|
|
3
|
-
import {
|
|
1
|
+
import { E as g } from "./axisFormat-Sz4WIJfQ.js";
|
|
2
|
+
import { D as o, e as l, d as u, L as E, a as f, N as m, P, S as p, c as T, N as d, h as L, b as x, f as N, g as R, p as S } from "./ChartCore-AnR_3Xkb.js";
|
|
3
|
+
import { c as C, d as H, g as M, r as b } from "./PluginRegistry-CzMHebYP.js";
|
|
4
|
+
function t(e) {
|
|
5
|
+
return e;
|
|
6
|
+
}
|
|
7
|
+
function s(e, a) {
|
|
8
|
+
return (r) => ({
|
|
9
|
+
...a(r),
|
|
10
|
+
manifest: e
|
|
11
|
+
});
|
|
12
|
+
}
|
|
4
13
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
M as createRenderer,
|
|
22
|
-
A as createScale,
|
|
14
|
+
o as DARK_THEME,
|
|
15
|
+
l as DEFAULT_THEME,
|
|
16
|
+
g as EventEmitter,
|
|
17
|
+
u as LIGHT_THEME,
|
|
18
|
+
E as LinearScale,
|
|
19
|
+
f as LogScale,
|
|
20
|
+
m as NativeWebGLRenderer,
|
|
21
|
+
P as PluginManagerImpl,
|
|
22
|
+
p as Series,
|
|
23
|
+
T as createChart,
|
|
24
|
+
s as createConfigurablePlugin,
|
|
25
|
+
d as createNativeRenderer,
|
|
26
|
+
t as createPlugin,
|
|
27
|
+
L as createPluginContext,
|
|
28
|
+
C as createRenderer,
|
|
29
|
+
x as createScale,
|
|
23
30
|
N as createTheme,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
L as parseColor,
|
|
30
|
-
x as registerPlugin
|
|
31
|
+
H as definePlugin,
|
|
32
|
+
M as getPluginRegistry,
|
|
33
|
+
R as getThemeByName,
|
|
34
|
+
S as parseColor,
|
|
35
|
+
b as registerPlugin
|
|
31
36
|
};
|
|
32
37
|
//# sourceMappingURL=velo-plot.js.map
|
package/dist/velo-plot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"velo-plot.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
1
|
+
{"version":3,"file":"velo-plot.js","sources":["../src/plugins/createPlugin.ts"],"sourcesContent":["import type { ChartPlugin, PluginFactory, PluginManifest } from \"./types\";\n\nexport function createPlugin<TConfig = void, TApi extends Record<string, unknown> = {}>(\n definition: ChartPlugin<TConfig> & { api?: TApi },\n): ChartPlugin<TConfig> & { api: TApi } {\n return definition as ChartPlugin<TConfig> & { api: TApi };\n}\n\nexport function createConfigurablePlugin<TConfig = void>(\n manifest: PluginManifest,\n factory: (config?: TConfig) => Omit<ChartPlugin<TConfig>, \"manifest\">,\n): PluginFactory<TConfig> {\n return (config?: TConfig) => ({\n ...factory(config),\n manifest,\n });\n}\n"],"names":["createPlugin","definition","createConfigurablePlugin","manifest","factory","config"],"mappings":";;;AAEO,SAASA,EACdC,GACsC;AACtC,SAAOA;AACT;AAEO,SAASC,EACdC,GACAC,GACwB;AACxB,SAAO,CAACC,OAAsB;AAAA,IAC5B,GAAGD,EAAQC,CAAM;AAAA,IACjB,UAAAF;AAAA,EAAA;AAEJ;"}
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ export declare const SciPlot: import('vue').DefineComponent<import('vue').Extrac
|
|
|
85
85
|
})>;
|
|
86
86
|
};
|
|
87
87
|
plugins: {
|
|
88
|
-
type: import('vue').PropType<
|
|
88
|
+
type: import('vue').PropType<import('..').ChartPlugin<unknown>[]>;
|
|
89
89
|
};
|
|
90
90
|
layout: {
|
|
91
91
|
type: import('vue').PropType<import('..').LayoutOptions>;
|
|
@@ -203,7 +203,7 @@ export declare const SciPlot: import('vue').DefineComponent<import('vue').Extrac
|
|
|
203
203
|
})>;
|
|
204
204
|
};
|
|
205
205
|
plugins: {
|
|
206
|
-
type: import('vue').PropType<
|
|
206
|
+
type: import('vue').PropType<import('..').ChartPlugin<unknown>[]>;
|
|
207
207
|
};
|
|
208
208
|
layout: {
|
|
209
209
|
type: import('vue').PropType<import('..').LayoutOptions>;
|
package/dist/vue.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { ref as f, shallowRef as C, watch as m, onMounted as R, onUnmounted as p, defineComponent as A, createElementBlock as O, openBlock as P, normalizeStyle as L, normalizeClass as z, unref as j } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "./ChartCore-BpzRvN4Y.js";
|
|
5
|
-
import "./index-x4stH3jD.js";
|
|
6
|
-
import "./symbols-DT0eLlpW.js";
|
|
2
|
+
import { p as S, o as E, s as V, d as $ } from "./optionsSync-QUiN4Inw.js";
|
|
3
|
+
import { c as K, i as B, r as k, a as M, b as N } from "./chartSyncBridge-D_rCtbFq.js";
|
|
7
4
|
import { a as I, u as Z } from "./a11y-Bw6urYpr.js";
|
|
8
|
-
import { c as J } from "./createStackedChart-
|
|
5
|
+
import { c as J } from "./createStackedChart-DqcLCFGS.js";
|
|
9
6
|
import { s as b, a as T, b as x } from "./stackedSync-tnrunZMt.js";
|
|
10
7
|
function w(t = {}) {
|
|
11
8
|
const d = f(null), a = C(null), e = f(!1), n = f(null), u = f(null);
|
|
@@ -19,14 +16,14 @@ function w(t = {}) {
|
|
|
19
16
|
const s = a.value;
|
|
20
17
|
if (!s) return;
|
|
21
18
|
const v = S(l);
|
|
22
|
-
|
|
19
|
+
E(o, v) && (V(s, o, v), o = v);
|
|
23
20
|
},
|
|
24
21
|
{ deep: !0 }
|
|
25
22
|
), R(() => {
|
|
26
23
|
const l = d.value;
|
|
27
24
|
if (l)
|
|
28
25
|
try {
|
|
29
|
-
const s =
|
|
26
|
+
const s = K(l, c.current, {
|
|
30
27
|
onBoundsChange: (v) => {
|
|
31
28
|
u.value = v;
|
|
32
29
|
},
|
|
@@ -122,7 +119,7 @@ const F = /* @__PURE__ */ A({
|
|
|
122
119
|
return m(
|
|
123
120
|
() => [e.series, r.value, u.value],
|
|
124
121
|
() => {
|
|
125
|
-
!r.value || !u.value || (v.value =
|
|
122
|
+
!r.value || !u.value || (v.value = $(
|
|
126
123
|
{
|
|
127
124
|
addSeries: o,
|
|
128
125
|
updateSeries: i,
|
|
@@ -208,7 +205,7 @@ function G(t) {
|
|
|
208
205
|
}
|
|
209
206
|
};
|
|
210
207
|
}
|
|
211
|
-
const U = ["aria-label", "data-ready"],
|
|
208
|
+
const U = ["aria-label", "data-ready"], _ = /* @__PURE__ */ A({
|
|
212
209
|
__name: "StackedPlot",
|
|
213
210
|
props: {
|
|
214
211
|
panes: {},
|
|
@@ -254,7 +251,7 @@ const U = ["aria-label", "data-ready"], ae = /* @__PURE__ */ A({
|
|
|
254
251
|
}, null, 14, U));
|
|
255
252
|
}
|
|
256
253
|
});
|
|
257
|
-
function
|
|
254
|
+
function ee(t, d, a = {}) {
|
|
258
255
|
const e = f(null), n = f(!1), u = f(null);
|
|
259
256
|
return m(
|
|
260
257
|
() => [t(), d, JSON.stringify(a)],
|
|
@@ -267,7 +264,7 @@ function le(t, d, a = {}) {
|
|
|
267
264
|
l && !B(r) && k(r, l.id);
|
|
268
265
|
}), n.value = !0, u.value = null;
|
|
269
266
|
try {
|
|
270
|
-
const l = await
|
|
267
|
+
const l = await M(r, d, a);
|
|
271
268
|
i || (e.value = l, n.value = !1);
|
|
272
269
|
} catch (l) {
|
|
273
270
|
i || (u.value = l instanceof Error ? l : new Error(String(l)), n.value = !1);
|
|
@@ -289,23 +286,23 @@ function X(t, d) {
|
|
|
289
286
|
a.value = null;
|
|
290
287
|
return;
|
|
291
288
|
}
|
|
292
|
-
e =
|
|
289
|
+
e = N(n, d), a.value = e.group;
|
|
293
290
|
},
|
|
294
291
|
{ immediate: !0 }
|
|
295
292
|
), p(() => {
|
|
296
293
|
e == null || e.destroy(), a.value = null;
|
|
297
294
|
}), { group: a };
|
|
298
295
|
}
|
|
299
|
-
const
|
|
296
|
+
const te = X, ae = F, le = w, ne = w;
|
|
300
297
|
export {
|
|
301
|
-
|
|
302
|
-
|
|
298
|
+
ae as SciPlot,
|
|
299
|
+
_ as StackedPlot,
|
|
303
300
|
F as VeloPlot,
|
|
304
|
-
|
|
301
|
+
te as useChartGroup,
|
|
305
302
|
X as useChartSync,
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
303
|
+
ee as useIndicator,
|
|
304
|
+
ne as useSciChart,
|
|
305
|
+
le as useSciPlot,
|
|
309
306
|
G as useStackedPlot,
|
|
310
307
|
w as useVeloPlot
|
|
311
308
|
};
|
package/dist/vue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue.js","sources":["../src/vue/useVeloPlot.ts","../src/vue/VeloPlot.vue","../src/vue/useStackedPlot.ts","../src/vue/StackedPlot.vue","../src/vue/useIndicator.ts","../src/vue/useChartSync.ts","../src/vue/index.ts"],"sourcesContent":["/**\n * Vue composable for single charts.\n */\n\nimport { ref, shallowRef, onMounted, onUnmounted, watch } from \"vue\";\nimport type { Ref } from \"vue\";\nimport type { Chart } from \"../core/Chart\";\nimport type {\n SeriesOptions,\n SeriesUpdateData,\n ZoomOptions,\n Bounds,\n} from \"../types\";\nimport {\n createChartLifecycle,\n type ChartBindingOptions,\n optionsChanged,\n syncChartOptions,\n pickSyncableOptions,\n} from \"../bindings/shared\";\n\nexport interface UseVeloPlotOptions extends ChartBindingOptions {}\n\nexport interface UseVeloPlotReturn {\n containerRef: Ref<HTMLDivElement | null>;\n chart: Ref<Chart | null>;\n isReady: Ref<boolean>;\n error: Ref<Error | null>;\n bounds: Ref<Bounds | null>;\n addSeries: (options: SeriesOptions) => void;\n updateSeries: (id: string, data: SeriesUpdateData) => void;\n removeSeries: (id: string) => void;\n zoom: (options: ZoomOptions) => void;\n resetZoom: () => void;\n}\n\nexport function useVeloPlot(options: UseVeloPlotOptions = {}): UseVeloPlotReturn {\n const containerRef = ref<HTMLDivElement | null>(null);\n const chart = shallowRef<Chart | null>(null);\n const isReady = ref(false);\n const error = ref<Error | null>(null);\n const bounds = ref<Bounds | null>(null);\n\n let destroy: (() => void) | null = null;\n const optionsRef = { current: options };\n let prevSync = pickSyncableOptions(options);\n\n watch(\n () => options,\n (next) => {\n optionsRef.current = next;\n const c = chart.value;\n if (!c) return;\n const picked = pickSyncableOptions(next);\n if (optionsChanged(prevSync, picked)) {\n syncChartOptions(c, prevSync, picked);\n prevSync = picked;\n }\n },\n { deep: true },\n );\n\n onMounted(() => {\n const el = containerRef.value;\n if (!el) return;\n try {\n const handle = createChartLifecycle(el, optionsRef.current, {\n onBoundsChange: (b) => {\n bounds.value = b;\n },\n onError: (e) => {\n error.value = e;\n },\n });\n chart.value = handle.chart;\n destroy = handle.destroy;\n bounds.value = handle.getBounds();\n isReady.value = true;\n prevSync = pickSyncableOptions(optionsRef.current);\n } catch (e) {\n error.value = e instanceof Error ? e : new Error(String(e));\n }\n });\n\n onUnmounted(() => {\n destroy?.();\n destroy = null;\n chart.value = null;\n isReady.value = false;\n });\n\n const addSeries = (opts: SeriesOptions) => {\n chart.value?.addSeries(opts);\n if (chart.value) bounds.value = chart.value.getViewBounds();\n };\n\n return {\n containerRef,\n chart,\n isReady,\n error,\n bounds,\n addSeries,\n updateSeries: (id, data) => chart.value?.updateSeries(id, data),\n removeSeries: (id) => chart.value?.removeSeries(id),\n zoom: (z) => chart.value?.zoom(z),\n resetZoom: () => {\n chart.value?.resetZoom();\n if (chart.value) bounds.value = chart.value.getViewBounds();\n },\n };\n}\n","<script setup lang=\"ts\">\nimport { ref, watch, onUnmounted } from \"vue\";\nimport { useVeloPlot, type UseVeloPlotOptions } from \"./useVeloPlot\";\nimport {\n diffSeries,\n applyChartA11y,\n updateA11y,\n type VeloPlotSeries,\n} from \"../bindings/shared\";\nimport type { Bounds, CursorOptions, ZoomOptions } from \"../types\";\n\nconst props = withDefaults(\n defineProps<\n UseVeloPlotOptions & {\n series?: VeloPlotSeries[];\n zoom?: ZoomOptions;\n width?: number | string;\n height?: number | string;\n class?: string;\n cursor?: CursorOptions;\n ariaLabel?: string;\n keyboardNav?: boolean;\n }\n >(),\n {\n series: () => [],\n width: \"100%\",\n height: 400,\n keyboardNav: true,\n },\n);\n\nconst emit = defineEmits<{\n zoomChange: [bounds: Bounds];\n}>();\n\nconst {\n containerRef,\n chart,\n isReady,\n bounds,\n addSeries,\n updateSeries,\n removeSeries,\n resetZoom,\n} = useVeloPlot(props);\n\nconst previousSeries = ref(new Map<string, VeloPlotSeries>());\nlet a11yHandle: ReturnType<typeof applyChartA11y> | null = null;\n\nwatch(\n () => [props.series, isReady.value, chart.value] as const,\n () => {\n if (!isReady.value || !chart.value) return;\n previousSeries.value = diffSeries(\n {\n addSeries,\n updateSeries,\n removeSeries,\n autoScale: () => chart.value?.autoScale(),\n },\n props.series,\n previousSeries.value,\n );\n },\n { deep: true, immediate: true },\n);\n\nwatch(\n () => [isReady.value, chart.value, props.keyboardNav, props.ariaLabel] as const,\n () => {\n const el = containerRef.value;\n if (!el || !chart.value || !isReady.value) return;\n a11yHandle?.cleanup();\n a11yHandle = applyChartA11y(el, chart.value, {\n label: props.ariaLabel,\n series: props.series,\n bounds: bounds.value,\n enableKeyboard: props.keyboardNav,\n });\n },\n { immediate: true },\n);\n\nonUnmounted(() => a11yHandle?.cleanup());\n\nwatch(bounds, (b) => {\n const el = containerRef.value;\n if (el && a11yHandle) {\n updateA11y(el, a11yHandle.srTable, {\n label: props.ariaLabel,\n series: props.series,\n bounds: b,\n });\n }\n});\n\ndefineExpose({ getChart: () => chart.value, resetZoom, getBounds: () => bounds.value });\n</script>\n\n<template>\n <div\n ref=\"containerRef\"\n class=\"velo-plot-container\"\n :class=\"props.class\"\n :style=\"{\n position: 'relative',\n width: typeof width === 'number' ? `${width}px` : width,\n height: typeof height === 'number' ? `${height}px` : height,\n }\"\n />\n</template>\n","/**\n * Vue composable for stacked charts.\n */\n\nimport { ref, shallowRef, onMounted, onUnmounted, watch } from \"vue\";\nimport { createStackedChart } from \"../core/stacked\";\nimport type { StackedChart, StackedChartOptions } from \"../core/stacked\";\nimport type { Range } from \"../types\";\nimport {\n stackedStructureKey,\n syncStackedOptions,\n syncStackedPaneSeries,\n} from \"../bindings/shared\";\nimport type { VeloPlotSeries } from \"../bindings/shared\";\n\nexport interface UseStackedPlotOptions\n extends Omit<StackedChartOptions, \"container\"> {}\n\nexport function useStackedPlot(options: UseStackedPlotOptions) {\n const containerRef = ref<HTMLDivElement | null>(null);\n const stack = shallowRef<StackedChart | null>(null);\n const isReady = ref(false);\n\n let destroy: (() => void) | null = null;\n let structureKey = stackedStructureKey(options.panes);\n let paneSeries = new Map<string, Map<string, VeloPlotSeries>>();\n\n const mount = () => {\n const el = containerRef.value;\n if (!el) return;\n destroy?.();\n const created = createStackedChart({ ...options, container: el });\n stack.value = created;\n destroy = () => created.destroy();\n structureKey = stackedStructureKey(options.panes);\n paneSeries = syncStackedPaneSeries(created, options.panes, new Map());\n created.whenReady().then(() => {\n isReady.value = true;\n });\n };\n\n onMounted(mount);\n onUnmounted(() => {\n destroy?.();\n stack.value = null;\n isReady.value = false;\n });\n\n watch(\n () => options,\n (next) => {\n const current = stack.value;\n if (!current || !isReady.value) return;\n const nextKey = stackedStructureKey(next.panes);\n if (nextKey !== structureKey) {\n mount();\n return;\n }\n syncStackedOptions(current, next);\n paneSeries = syncStackedPaneSeries(current, next.panes, paneSeries);\n },\n { deep: true },\n );\n\n return {\n containerRef,\n stack,\n isReady,\n fitAll: (opts?: { x?: Range; padding?: number }) => stack.value?.fitAll(opts),\n resetAll: () => stack.value?.resetAll(),\n };\n}\n","<script setup lang=\"ts\">\nimport { useStackedPlot, type UseStackedPlotOptions } from \"./useStackedPlot\";\n\nconst props = withDefaults(\n defineProps<\n UseStackedPlotOptions & {\n width?: number | string;\n height?: number | string;\n class?: string;\n ariaLabel?: string;\n }\n >(),\n {\n width: \"100%\",\n height: 480,\n },\n);\n\nconst { containerRef, stack, isReady, fitAll, resetAll } = useStackedPlot(props);\n\ndefineExpose({\n getStack: () => stack.value,\n fitAll,\n resetAll,\n getBounds: () => stack.value?.getMaster().getViewBounds() ?? null,\n});\n</script>\n\n<template>\n <div\n ref=\"containerRef\"\n class=\"velo-plot-stacked\"\n :class=\"props.class\"\n role=\"img\"\n :aria-label=\"ariaLabel ?? `Stacked chart with ${panes.length} panes`\"\n :data-ready=\"isReady\"\n :style=\"{\n position: 'relative',\n width: typeof width === 'number' ? `${width}px` : width,\n height: typeof height === 'number' ? `${height}px` : height,\n }\"\n />\n</template>\n","import { ref, watch, onUnmounted } from \"vue\";\nimport type { AddIndicatorOptions, AddIndicatorResult } from \"../core/indicator/addIndicator\";\nimport type { IndicatorPresetName } from \"../core/indicator/indicatorPresets\";\nimport {\n addIndicatorToHost,\n isStackedChart,\n removeIndicatorFromChart,\n type IndicatorHost,\n} from \"../bindings/shared\";\nimport type { Chart } from \"../core/chart/types\";\n\nexport function useIndicator(\n host: () => IndicatorHost,\n preset: IndicatorPresetName,\n options: AddIndicatorOptions = {},\n) {\n const result = ref<(AddIndicatorResult & { paneId?: string }) | null>(null);\n const isLoading = ref(false);\n const error = ref<Error | null>(null);\n\n watch(\n () => [host(), preset, JSON.stringify(options)] as const,\n async ([h], _, onCleanup) => {\n if (!h) return;\n let cancelled = false;\n onCleanup(() => {\n cancelled = true;\n const res = result.value;\n if (res && !isStackedChart(h)) {\n removeIndicatorFromChart(h as Chart, res.id);\n }\n });\n isLoading.value = true;\n error.value = null;\n try {\n const res = await addIndicatorToHost(h, preset, options);\n if (!cancelled) {\n result.value = res;\n isLoading.value = false;\n }\n } catch (e) {\n if (!cancelled) {\n error.value = e instanceof Error ? e : new Error(String(e));\n isLoading.value = false;\n }\n }\n },\n { immediate: true },\n );\n\n onUnmounted(() => {\n const h = host();\n const res = result.value;\n if (res && h && !isStackedChart(h)) {\n removeIndicatorFromChart(h as Chart, res.id);\n }\n });\n\n return { result, isLoading, error };\n}\n","import { ref, watch, onUnmounted } from \"vue\";\nimport type { ChartLike, SyncOptions } from \"../core/sync\";\nimport { ChartGroup } from \"../core/sync\";\nimport { createChartSync } from \"../bindings/shared\";\n\nexport function useChartSync(\n charts: () => ChartLike[],\n options?: SyncOptions,\n) {\n const group = ref<ChartGroup | null>(null);\n let handle: ReturnType<typeof createChartSync> | null = null;\n\n watch(\n () => [charts(), JSON.stringify(options)] as const,\n ([list]) => {\n handle?.destroy();\n if (list.length < 2) {\n group.value = null;\n return;\n }\n handle = createChartSync(list, options);\n group.value = handle.group;\n },\n { immediate: true },\n );\n\n onUnmounted(() => {\n handle?.destroy();\n group.value = null;\n });\n\n return { group };\n}\n\nexport const useChartGroup = useChartSync;\n","export { default as VeloPlot } from \"./VeloPlot.vue\";\nexport { default as StackedPlot } from \"./StackedPlot.vue\";\nexport { useVeloPlot, type UseVeloPlotOptions, type UseVeloPlotReturn } from \"./useVeloPlot\";\nexport { useStackedPlot, type UseStackedPlotOptions } from \"./useStackedPlot\";\nexport { useIndicator } from \"./useIndicator\";\nexport { useChartSync, useChartGroup } from \"./useChartSync\";\n\nimport VeloPlotVue from \"./VeloPlot.vue\";\nimport { useVeloPlot as useVeloPlotImpl } from \"./useVeloPlot\";\n\n/** @deprecated Use `VeloPlot` instead. **Removed in v4.0.** */\nexport const SciPlot = VeloPlotVue;\n/** @deprecated Use `useVeloPlot` instead. **Removed in v4.0.** */\nexport const useSciPlot = useVeloPlotImpl;\n/** @deprecated Use `useVeloPlot` instead. **Removed in v4.0.** */\nexport const useSciChart = useVeloPlotImpl;\n"],"names":["useVeloPlot","options","containerRef","ref","chart","shallowRef","isReady","error","bounds","destroy","optionsRef","prevSync","pickSyncableOptions","watch","next","c","picked","optionsChanged","syncChartOptions","onMounted","el","handle","createChartLifecycle","b","e","onUnmounted","opts","_a","id","data","z","props","__props","addSeries","updateSeries","removeSeries","resetZoom","previousSeries","a11yHandle","diffSeries","applyChartA11y","updateA11y","__expose","_createElementBlock","_normalizeClass","_normalizeStyle","useStackedPlot","stack","structureKey","stackedStructureKey","paneSeries","mount","created","createStackedChart","syncStackedPaneSeries","current","syncStackedOptions","fitAll","resetAll","_unref","useIndicator","host","preset","result","isLoading","h","_","onCleanup","cancelled","res","isStackedChart","removeIndicatorFromChart","addIndicatorToHost","useChartSync","charts","group","list","createChartSync","useChartGroup","SciPlot","VeloPlotVue","useSciPlot","useVeloPlotImpl","useSciChart"],"mappings":";;;;;;;;;AAoCO,SAASA,EAAYC,IAA8B,IAAuB;AAC/E,QAAMC,IAAeC,EAA2B,IAAI,GAC9CC,IAAQC,EAAyB,IAAI,GACrCC,IAAUH,EAAI,EAAK,GACnBI,IAAQJ,EAAkB,IAAI,GAC9BK,IAASL,EAAmB,IAAI;AAEtC,MAAIM,IAA+B;AACnC,QAAMC,IAAa,EAAE,SAAST,EAAA;AAC9B,MAAIU,IAAWC,EAAoBX,CAAO;AAE1C,SAAAY;AAAA,IACE,MAAMZ;AAAA,IACN,CAACa,MAAS;AACR,MAAAJ,EAAW,UAAUI;AACrB,YAAMC,IAAIX,EAAM;AAChB,UAAI,CAACW,EAAG;AACR,YAAMC,IAASJ,EAAoBE,CAAI;AACvC,MAAIG,EAAeN,GAAUK,CAAM,MACjCE,EAAiBH,GAAGJ,GAAUK,CAAM,GACpCL,IAAWK;AAAA,IAEf;AAAA,IACA,EAAE,MAAM,GAAA;AAAA,EAAK,GAGfG,EAAU,MAAM;AACd,UAAMC,IAAKlB,EAAa;AACxB,QAAKkB;AACL,UAAI;AACF,cAAMC,IAASC,EAAqBF,GAAIV,EAAW,SAAS;AAAA,UAC1D,gBAAgB,CAACa,MAAM;AACrB,YAAAf,EAAO,QAAQe;AAAA,UACjB;AAAA,UACA,SAAS,CAACC,MAAM;AACd,YAAAjB,EAAM,QAAQiB;AAAA,UAChB;AAAA,QAAA,CACD;AACD,QAAApB,EAAM,QAAQiB,EAAO,OACrBZ,IAAUY,EAAO,SACjBb,EAAO,QAAQa,EAAO,UAAA,GACtBf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,SAAAR;AAAA,IACE,MAAM,CAAC6D,EAAA,GAAU,KAAK,UAAUzE,CAAO,CAAC;AAAA,IACxC,CAAC,CAAC2E,CAAI,MAAM;AAEV,UADAvD,KAAA,QAAAA,EAAQ,WACJuD,EAAK,SAAS,GAAG;AACnB,QAAAD,EAAM,QAAQ;AACd;AAAA,MACF;AACA,MAAAtD,IAASwD,EAAgBD,GAAM3E,CAAO,GACtC0E,EAAM,QAAQtD,EAAO;AAAA,IACvB;AAAA,IACA,EAAE,WAAW,GAAA;AAAA,EAAK,GAGpBI,EAAY,MAAM;AAChB,IAAAJ,KAAA,QAAAA,EAAQ,WACRsD,EAAM,QAAQ;AAAA,EAChB,CAAC,GAEM,EAAE,OAAAA,EAAA;AACX;AAEO,MAAMG,KAAgBL,GCvBhBM,KAAUC,GAEVC,KAAaC,GAEbC,KAAcD;"}
|
|
1
|
+
{"version":3,"file":"vue.js","sources":["../src/vue/useVeloPlot.ts","../src/vue/VeloPlot.vue","../src/vue/useStackedPlot.ts","../src/vue/StackedPlot.vue","../src/vue/useIndicator.ts","../src/vue/useChartSync.ts","../src/vue/index.ts"],"sourcesContent":["/**\n * Vue composable for single charts.\n */\n\nimport { ref, shallowRef, onMounted, onUnmounted, watch } from \"vue\";\nimport type { Ref } from \"vue\";\nimport type { Chart } from \"../core/Chart\";\nimport type {\n SeriesOptions,\n SeriesUpdateData,\n ZoomOptions,\n Bounds,\n} from \"../types\";\nimport {\n createChartLifecycle,\n type ChartBindingOptions,\n optionsChanged,\n syncChartOptions,\n pickSyncableOptions,\n} from \"../bindings/shared\";\n\nexport interface UseVeloPlotOptions extends ChartBindingOptions {}\n\nexport interface UseVeloPlotReturn {\n containerRef: Ref<HTMLDivElement | null>;\n chart: Ref<Chart | null>;\n isReady: Ref<boolean>;\n error: Ref<Error | null>;\n bounds: Ref<Bounds | null>;\n addSeries: (options: SeriesOptions) => void;\n updateSeries: (id: string, data: SeriesUpdateData) => void;\n removeSeries: (id: string) => void;\n zoom: (options: ZoomOptions) => void;\n resetZoom: () => void;\n}\n\nexport function useVeloPlot(options: UseVeloPlotOptions = {}): UseVeloPlotReturn {\n const containerRef = ref<HTMLDivElement | null>(null);\n const chart = shallowRef<Chart | null>(null);\n const isReady = ref(false);\n const error = ref<Error | null>(null);\n const bounds = ref<Bounds | null>(null);\n\n let destroy: (() => void) | null = null;\n const optionsRef = { current: options };\n let prevSync = pickSyncableOptions(options);\n\n watch(\n () => options,\n (next) => {\n optionsRef.current = next;\n const c = chart.value;\n if (!c) return;\n const picked = pickSyncableOptions(next);\n if (optionsChanged(prevSync, picked)) {\n syncChartOptions(c, prevSync, picked);\n prevSync = picked;\n }\n },\n { deep: true },\n );\n\n onMounted(() => {\n const el = containerRef.value;\n if (!el) return;\n try {\n const handle = createChartLifecycle(el, optionsRef.current, {\n onBoundsChange: (b) => {\n bounds.value = b;\n },\n onError: (e) => {\n error.value = e;\n },\n });\n chart.value = handle.chart;\n destroy = handle.destroy;\n bounds.value = handle.getBounds();\n isReady.value = true;\n prevSync = pickSyncableOptions(optionsRef.current);\n } catch (e) {\n error.value = e instanceof Error ? e : new Error(String(e));\n }\n });\n\n onUnmounted(() => {\n destroy?.();\n destroy = null;\n chart.value = null;\n isReady.value = false;\n });\n\n const addSeries = (opts: SeriesOptions) => {\n chart.value?.addSeries(opts);\n if (chart.value) bounds.value = chart.value.getViewBounds();\n };\n\n return {\n containerRef,\n chart,\n isReady,\n error,\n bounds,\n addSeries,\n updateSeries: (id, data) => chart.value?.updateSeries(id, data),\n removeSeries: (id) => chart.value?.removeSeries(id),\n zoom: (z) => chart.value?.zoom(z),\n resetZoom: () => {\n chart.value?.resetZoom();\n if (chart.value) bounds.value = chart.value.getViewBounds();\n },\n };\n}\n","<script setup lang=\"ts\">\nimport { ref, watch, onUnmounted } from \"vue\";\nimport { useVeloPlot, type UseVeloPlotOptions } from \"./useVeloPlot\";\nimport {\n diffSeries,\n applyChartA11y,\n updateA11y,\n type VeloPlotSeries,\n} from \"../bindings/shared\";\nimport type { Bounds, CursorOptions, ZoomOptions } from \"../types\";\n\nconst props = withDefaults(\n defineProps<\n UseVeloPlotOptions & {\n series?: VeloPlotSeries[];\n zoom?: ZoomOptions;\n width?: number | string;\n height?: number | string;\n class?: string;\n cursor?: CursorOptions;\n ariaLabel?: string;\n keyboardNav?: boolean;\n }\n >(),\n {\n series: () => [],\n width: \"100%\",\n height: 400,\n keyboardNav: true,\n },\n);\n\nconst emit = defineEmits<{\n zoomChange: [bounds: Bounds];\n}>();\n\nconst {\n containerRef,\n chart,\n isReady,\n bounds,\n addSeries,\n updateSeries,\n removeSeries,\n resetZoom,\n} = useVeloPlot(props);\n\nconst previousSeries = ref(new Map<string, VeloPlotSeries>());\nlet a11yHandle: ReturnType<typeof applyChartA11y> | null = null;\n\nwatch(\n () => [props.series, isReady.value, chart.value] as const,\n () => {\n if (!isReady.value || !chart.value) return;\n previousSeries.value = diffSeries(\n {\n addSeries,\n updateSeries,\n removeSeries,\n autoScale: () => chart.value?.autoScale(),\n },\n props.series,\n previousSeries.value,\n );\n },\n { deep: true, immediate: true },\n);\n\nwatch(\n () => [isReady.value, chart.value, props.keyboardNav, props.ariaLabel] as const,\n () => {\n const el = containerRef.value;\n if (!el || !chart.value || !isReady.value) return;\n a11yHandle?.cleanup();\n a11yHandle = applyChartA11y(el, chart.value, {\n label: props.ariaLabel,\n series: props.series,\n bounds: bounds.value,\n enableKeyboard: props.keyboardNav,\n });\n },\n { immediate: true },\n);\n\nonUnmounted(() => a11yHandle?.cleanup());\n\nwatch(bounds, (b) => {\n const el = containerRef.value;\n if (el && a11yHandle) {\n updateA11y(el, a11yHandle.srTable, {\n label: props.ariaLabel,\n series: props.series,\n bounds: b,\n });\n }\n});\n\ndefineExpose({ getChart: () => chart.value, resetZoom, getBounds: () => bounds.value });\n</script>\n\n<template>\n <div\n ref=\"containerRef\"\n class=\"velo-plot-container\"\n :class=\"props.class\"\n :style=\"{\n position: 'relative',\n width: typeof width === 'number' ? `${width}px` : width,\n height: typeof height === 'number' ? `${height}px` : height,\n }\"\n />\n</template>\n","/**\n * Vue composable for stacked charts.\n */\n\nimport { ref, shallowRef, onMounted, onUnmounted, watch } from \"vue\";\nimport { createStackedChart } from \"../core/stacked\";\nimport type { StackedChart, StackedChartOptions } from \"../core/stacked\";\nimport type { Range } from \"../types\";\nimport {\n stackedStructureKey,\n syncStackedOptions,\n syncStackedPaneSeries,\n} from \"../bindings/shared\";\nimport type { VeloPlotSeries } from \"../bindings/shared\";\n\nexport interface UseStackedPlotOptions\n extends Omit<StackedChartOptions, \"container\"> {}\n\nexport function useStackedPlot(options: UseStackedPlotOptions) {\n const containerRef = ref<HTMLDivElement | null>(null);\n const stack = shallowRef<StackedChart | null>(null);\n const isReady = ref(false);\n\n let destroy: (() => void) | null = null;\n let structureKey = stackedStructureKey(options.panes);\n let paneSeries = new Map<string, Map<string, VeloPlotSeries>>();\n\n const mount = () => {\n const el = containerRef.value;\n if (!el) return;\n destroy?.();\n const created = createStackedChart({ ...options, container: el });\n stack.value = created;\n destroy = () => created.destroy();\n structureKey = stackedStructureKey(options.panes);\n paneSeries = syncStackedPaneSeries(created, options.panes, new Map());\n created.whenReady().then(() => {\n isReady.value = true;\n });\n };\n\n onMounted(mount);\n onUnmounted(() => {\n destroy?.();\n stack.value = null;\n isReady.value = false;\n });\n\n watch(\n () => options,\n (next) => {\n const current = stack.value;\n if (!current || !isReady.value) return;\n const nextKey = stackedStructureKey(next.panes);\n if (nextKey !== structureKey) {\n mount();\n return;\n }\n syncStackedOptions(current, next);\n paneSeries = syncStackedPaneSeries(current, next.panes, paneSeries);\n },\n { deep: true },\n );\n\n return {\n containerRef,\n stack,\n isReady,\n fitAll: (opts?: { x?: Range; padding?: number }) => stack.value?.fitAll(opts),\n resetAll: () => stack.value?.resetAll(),\n };\n}\n","<script setup lang=\"ts\">\nimport { useStackedPlot, type UseStackedPlotOptions } from \"./useStackedPlot\";\n\nconst props = withDefaults(\n defineProps<\n UseStackedPlotOptions & {\n width?: number | string;\n height?: number | string;\n class?: string;\n ariaLabel?: string;\n }\n >(),\n {\n width: \"100%\",\n height: 480,\n },\n);\n\nconst { containerRef, stack, isReady, fitAll, resetAll } = useStackedPlot(props);\n\ndefineExpose({\n getStack: () => stack.value,\n fitAll,\n resetAll,\n getBounds: () => stack.value?.getMaster().getViewBounds() ?? null,\n});\n</script>\n\n<template>\n <div\n ref=\"containerRef\"\n class=\"velo-plot-stacked\"\n :class=\"props.class\"\n role=\"img\"\n :aria-label=\"ariaLabel ?? `Stacked chart with ${panes.length} panes`\"\n :data-ready=\"isReady\"\n :style=\"{\n position: 'relative',\n width: typeof width === 'number' ? `${width}px` : width,\n height: typeof height === 'number' ? `${height}px` : height,\n }\"\n />\n</template>\n","import { ref, watch, onUnmounted } from \"vue\";\nimport type { AddIndicatorOptions, AddIndicatorResult } from \"../core/indicator/addIndicator\";\nimport type { IndicatorPresetName } from \"../core/indicator/indicatorPresets\";\nimport {\n addIndicatorToHost,\n isStackedChart,\n removeIndicatorFromChart,\n type IndicatorHost,\n} from \"../bindings/shared\";\nimport type { Chart } from \"../core/chart/types\";\n\nexport function useIndicator(\n host: () => IndicatorHost,\n preset: IndicatorPresetName,\n options: AddIndicatorOptions = {},\n) {\n const result = ref<(AddIndicatorResult & { paneId?: string }) | null>(null);\n const isLoading = ref(false);\n const error = ref<Error | null>(null);\n\n watch(\n () => [host(), preset, JSON.stringify(options)] as const,\n async ([h], _, onCleanup) => {\n if (!h) return;\n let cancelled = false;\n onCleanup(() => {\n cancelled = true;\n const res = result.value;\n if (res && !isStackedChart(h)) {\n removeIndicatorFromChart(h as Chart, res.id);\n }\n });\n isLoading.value = true;\n error.value = null;\n try {\n const res = await addIndicatorToHost(h, preset, options);\n if (!cancelled) {\n result.value = res;\n isLoading.value = false;\n }\n } catch (e) {\n if (!cancelled) {\n error.value = e instanceof Error ? e : new Error(String(e));\n isLoading.value = false;\n }\n }\n },\n { immediate: true },\n );\n\n onUnmounted(() => {\n const h = host();\n const res = result.value;\n if (res && h && !isStackedChart(h)) {\n removeIndicatorFromChart(h as Chart, res.id);\n }\n });\n\n return { result, isLoading, error };\n}\n","import { ref, watch, onUnmounted } from \"vue\";\nimport type { ChartLike, SyncOptions } from \"../core/sync\";\nimport { ChartGroup } from \"../core/sync\";\nimport { createChartSync } from \"../bindings/shared\";\n\nexport function useChartSync(\n charts: () => ChartLike[],\n options?: SyncOptions,\n) {\n const group = ref<ChartGroup | null>(null);\n let handle: ReturnType<typeof createChartSync> | null = null;\n\n watch(\n () => [charts(), JSON.stringify(options)] as const,\n ([list]) => {\n handle?.destroy();\n if (list.length < 2) {\n group.value = null;\n return;\n }\n handle = createChartSync(list, options);\n group.value = handle.group;\n },\n { immediate: true },\n );\n\n onUnmounted(() => {\n handle?.destroy();\n group.value = null;\n });\n\n return { group };\n}\n\nexport const useChartGroup = useChartSync;\n","export { default as VeloPlot } from \"./VeloPlot.vue\";\nexport { default as StackedPlot } from \"./StackedPlot.vue\";\nexport { useVeloPlot, type UseVeloPlotOptions, type UseVeloPlotReturn } from \"./useVeloPlot\";\nexport { useStackedPlot, type UseStackedPlotOptions } from \"./useStackedPlot\";\nexport { useIndicator } from \"./useIndicator\";\nexport { useChartSync, useChartGroup } from \"./useChartSync\";\n\nimport VeloPlotVue from \"./VeloPlot.vue\";\nimport { useVeloPlot as useVeloPlotImpl } from \"./useVeloPlot\";\n\n/** @deprecated Use `VeloPlot` instead. **Removed in v4.0.** */\nexport const SciPlot = VeloPlotVue;\n/** @deprecated Use `useVeloPlot` instead. **Removed in v4.0.** */\nexport const useSciPlot = useVeloPlotImpl;\n/** @deprecated Use `useVeloPlot` instead. **Removed in v4.0.** */\nexport const useSciChart = useVeloPlotImpl;\n"],"names":["useVeloPlot","options","containerRef","ref","chart","shallowRef","isReady","error","bounds","destroy","optionsRef","prevSync","pickSyncableOptions","watch","next","c","picked","optionsChanged","syncChartOptions","onMounted","el","handle","createChartLifecycle","b","e","onUnmounted","opts","_a","id","data","z","props","__props","addSeries","updateSeries","removeSeries","resetZoom","previousSeries","a11yHandle","diffSeries","applyChartA11y","updateA11y","__expose","_createElementBlock","_normalizeClass","_normalizeStyle","useStackedPlot","stack","structureKey","stackedStructureKey","paneSeries","mount","created","createStackedChart","syncStackedPaneSeries","current","syncStackedOptions","fitAll","resetAll","_unref","useIndicator","host","preset","result","isLoading","h","_","onCleanup","cancelled","res","isStackedChart","removeIndicatorFromChart","addIndicatorToHost","useChartSync","charts","group","list","createChartSync","useChartGroup","SciPlot","VeloPlotVue","useSciPlot","useVeloPlotImpl","useSciChart"],"mappings":";;;;;;AAoCO,SAASA,EAAYC,IAA8B,IAAuB;AAC/E,QAAMC,IAAeC,EAA2B,IAAI,GAC9CC,IAAQC,EAAyB,IAAI,GACrCC,IAAUH,EAAI,EAAK,GACnBI,IAAQJ,EAAkB,IAAI,GAC9BK,IAASL,EAAmB,IAAI;AAEtC,MAAIM,IAA+B;AACnC,QAAMC,IAAa,EAAE,SAAST,EAAA;AAC9B,MAAIU,IAAWC,EAAoBX,CAAO;AAE1C,SAAAY;AAAA,IACE,MAAMZ;AAAA,IACN,CAACa,MAAS;AACR,MAAAJ,EAAW,UAAUI;AACrB,YAAMC,IAAIX,EAAM;AAChB,UAAI,CAACW,EAAG;AACR,YAAMC,IAASJ,EAAoBE,CAAI;AACvC,MAAIG,EAAeN,GAAUK,CAAM,MACjCE,EAAiBH,GAAGJ,GAAUK,CAAM,GACpCL,IAAWK;AAAA,IAEf;AAAA,IACA,EAAE,MAAM,GAAA;AAAA,EAAK,GAGfG,EAAU,MAAM;AACd,UAAMC,IAAKlB,EAAa;AACxB,QAAKkB;AACL,UAAI;AACF,cAAMC,IAASC,EAAqBF,GAAIV,EAAW,SAAS;AAAA,UAC1D,gBAAgB,CAACa,MAAM;AACrB,YAAAf,EAAO,QAAQe;AAAA,UACjB;AAAA,UACA,SAAS,CAACC,MAAM;AACd,YAAAjB,EAAM,QAAQiB;AAAA,UAChB;AAAA,QAAA,CACD;AACD,QAAAp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kE,EACdC,GACAzE,GACA;AACA,QAAM0E,IAAQxE,EAAuB,IAAI;AACzC,MAAIkB,IAAoD;AAExD,SAAAR;AAAA,IACE,MAAM,CAAC6D,EAAA,GAAU,KAAK,UAAUzE,CAAO,CAAC;AAAA,IACxC,CAAC,CAAC2E,CAAI,MAAM;AAEV,UADAvD,KAAA,QAAAA,EAAQ,WACJuD,EAAK,SAAS,GAAG;AACnB,QAAAD,EAAM,QAAQ;AACd;AAAA,MACF;AACA,MAAAtD,IAASwD,EAAgBD,GAAM3E,CAAO,GACtC0E,EAAM,QAAQtD,EAAO;AAAA,IACvB;AAAA,IACA,EAAE,WAAW,GAAA;AAAA,EAAK,GAGpBI,EAAY,MAAM;AAChB,IAAAJ,KAAA,QAAAA,EAAQ,WACRsD,EAAM,QAAQ;AAAA,EAChB,CAAC,GAEM,EAAE,OAAAA,EAAA;AACX;AAEO,MAAMG,KAAgBL,GCvBhBM,KAAUC,GAEVC,KAAaC,GAEbC,KAAcD;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "velo-plot",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"author": "jigonzalez930209",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"pnpm": ">=11"
|
|
23
23
|
},
|
|
24
24
|
"type": "module",
|
|
25
|
+
"sideEffects": false,
|
|
25
26
|
"main": "./dist/velo-plot.js",
|
|
26
27
|
"module": "./dist/velo-plot.js",
|
|
27
28
|
"types": "./dist/index.core.d.ts",
|
|
@@ -232,6 +233,7 @@
|
|
|
232
233
|
"@angular/compiler": "^19.2.25",
|
|
233
234
|
"@angular/core": "^19.2.25",
|
|
234
235
|
"@angular/platform-browser-dynamic": "^19.2.25",
|
|
236
|
+
"@eslint/js": "^10.0.1",
|
|
235
237
|
"@playwright/test": "^1.52.0",
|
|
236
238
|
"@solidjs/testing-library": "^0.8.10",
|
|
237
239
|
"@sveltejs/vite-plugin-svelte": "^7.2.0",
|
|
@@ -246,6 +248,10 @@
|
|
|
246
248
|
"@vitest/coverage-v8": "^3.2.6",
|
|
247
249
|
"@vue/test-utils": "^2.4.11",
|
|
248
250
|
"astro": "^5.18.2",
|
|
251
|
+
"esbuild": "^0.28.1",
|
|
252
|
+
"eslint": "^9.39.4",
|
|
253
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
254
|
+
"globals": "^17.7.0",
|
|
249
255
|
"happy-dom": "^20.10.6",
|
|
250
256
|
"playwright": "^1.52.0",
|
|
251
257
|
"react": "^19.2.3",
|
|
@@ -254,6 +260,7 @@
|
|
|
254
260
|
"svelte": "^5.56.4",
|
|
255
261
|
"typedoc": "^0.28.20",
|
|
256
262
|
"typescript": "^5.2.2",
|
|
263
|
+
"typescript-eslint": "^8.63.0",
|
|
257
264
|
"vite": "^5.0.0",
|
|
258
265
|
"vite-plugin-dts": "^3.6.0",
|
|
259
266
|
"vite-plugin-solid": "^2.11.12",
|
|
@@ -268,6 +275,7 @@
|
|
|
268
275
|
"build": "tsc -p tsconfig.build.json && vite build -c vite.config.lib.ts && node scripts/copy-framework-assets.mjs",
|
|
269
276
|
"preview": "vite preview",
|
|
270
277
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
278
|
+
"check:bundle-size": "node scripts/check-bundle-size.mjs",
|
|
271
279
|
"test": "vitest run && pnpm test:bindings",
|
|
272
280
|
"test:bindings": "vitest run --config vitest.bindings.config.ts",
|
|
273
281
|
"test:coverage": "pnpm test:coverage:bindings && pnpm test:coverage:core",
|