@flowtools/uplot 0.0.17 → 0.0.18
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/dist/index.es.js +176 -177
- package/dist/index.umd.js +1 -1
- package/dist/src/App.vue.d.ts +4 -6
- package/dist/uplot.css +2 -1
- package/package.json +14 -14
package/dist/index.es.js
CHANGED
|
@@ -1,181 +1,180 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useElementSize as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { Fragment as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createTextVNode as i, defineComponent as a, mergeModels as o, nextTick as s, normalizeClass as c, normalizeStyle as l, onMounted as u, openBlock as d, ref as f, renderList as p, renderSlot as m, toDisplayString as h, unref as g, useModel as _, useTemplateRef as v, watch as y } from "vue";
|
|
2
|
+
import { useElementSize as b } from "@vueuse/core";
|
|
3
|
+
import x from "uplot";
|
|
4
|
+
//#region src/utils/deepmerge.ts
|
|
5
|
+
// istanbul ignore next
|
|
6
|
+
function S(e) {
|
|
7
|
+
if (typeof e == "object" && e) {
|
|
8
|
+
if (typeof Object.getPrototypeOf == "function") {
|
|
9
|
+
let t = Object.getPrototypeOf(e);
|
|
10
|
+
return t === Object.prototype || t === null;
|
|
11
|
+
}
|
|
12
|
+
return Object.prototype.toString.call(e) === "[object Object]";
|
|
13
|
+
}
|
|
14
|
+
return !1;
|
|
13
15
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
function C(...e) {
|
|
17
|
+
return e.reduce((e, t) => {
|
|
18
|
+
if (Array.isArray(t)) throw TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");
|
|
19
|
+
return t && Object.keys(t).forEach((n) => {
|
|
20
|
+
[
|
|
21
|
+
"__proto__",
|
|
22
|
+
"constructor",
|
|
23
|
+
"prototype"
|
|
24
|
+
].includes(n) || (Array.isArray(e[n]) && Array.isArray(t[n]) ? e[n] = C.options.mergeArrays ? Array.from(new Set(e[n].concat(t[n]))) : t[n] : S(e[n]) && S(t[n]) ? e[n] = C(e[n], t[n]) : e[n] = t[n]);
|
|
25
|
+
}), e;
|
|
26
|
+
}, {});
|
|
24
27
|
}
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
var w = { mergeArrays: !0 };
|
|
29
|
+
C.options = w, C.withOptions = (e, ...t) => {
|
|
30
|
+
C.options = {
|
|
31
|
+
mergeArrays: !0,
|
|
32
|
+
...e
|
|
33
|
+
};
|
|
34
|
+
let n = C(...t);
|
|
35
|
+
return C.options = w, n;
|
|
27
36
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
style: C({ color: s.stroke || "black" }),
|
|
170
|
-
class: "__uplot-legend-label"
|
|
171
|
-
}, d(s.label), 5)) : w("", !0),
|
|
172
|
-
s.value ? (p(), f("span", X, d(s.value), 1)) : (p(), f("span", Y, "--"))
|
|
173
|
-
], 14, W))), 128))
|
|
174
|
-
])
|
|
175
|
-
])
|
|
176
|
-
]));
|
|
177
|
-
}
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/components/uplot.vue?vue&type=script&setup=true&lang.ts
|
|
39
|
+
var T = { class: "__uplot-root" }, E = {
|
|
40
|
+
key: 0,
|
|
41
|
+
class: "extra-info"
|
|
42
|
+
}, D = { style: { "text-align": "left" } }, O = { class: "__uplot-legend" }, k = ["onClick"], A = {
|
|
43
|
+
key: 1,
|
|
44
|
+
class: "__uplot-legend-value"
|
|
45
|
+
}, j = {
|
|
46
|
+
key: 2,
|
|
47
|
+
class: "__uplot-legend-value"
|
|
48
|
+
}, M = /* @__PURE__ */ a({
|
|
49
|
+
__name: "uplot",
|
|
50
|
+
props: /* @__PURE__ */ o({
|
|
51
|
+
options: {},
|
|
52
|
+
data: {},
|
|
53
|
+
noResetScale: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: !1
|
|
56
|
+
},
|
|
57
|
+
showDebug: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: !1
|
|
60
|
+
},
|
|
61
|
+
noFooter: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: !1
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
zoom: { default: () => [null, null] },
|
|
67
|
+
zoomModifiers: {},
|
|
68
|
+
series: { default: () => [] },
|
|
69
|
+
seriesModifiers: {}
|
|
70
|
+
}),
|
|
71
|
+
emits: /* @__PURE__ */ o(["select", "cursor"], ["update:zoom", "update:series"]),
|
|
72
|
+
setup(a, { expose: o, emit: S }) {
|
|
73
|
+
let w = a, M = S, N = v("el"), { width: P, height: F } = b(N), I = _(a, "zoom"), L = _(a, "series"), R = {
|
|
74
|
+
title: void 0,
|
|
75
|
+
legend: { show: !1 },
|
|
76
|
+
hooks: {
|
|
77
|
+
init: [(e) => {
|
|
78
|
+
w.showDebug && console.log("init", e), L.value = e.series.map((t, n) => ({
|
|
79
|
+
label: t.label,
|
|
80
|
+
stroke: typeof t.stroke == "function" ? t.stroke(e, n) : null,
|
|
81
|
+
value: null,
|
|
82
|
+
data: null,
|
|
83
|
+
show: t.show
|
|
84
|
+
}));
|
|
85
|
+
}],
|
|
86
|
+
setCursor: [(e) => {
|
|
87
|
+
M("cursor", e.cursor), L.value = e.series.map((t, n) => ({
|
|
88
|
+
label: t.label,
|
|
89
|
+
stroke: typeof t.stroke == "function" ? t.stroke(e, n) : null,
|
|
90
|
+
value: e.cursor.idx && e.data[n][e.cursor.idx] ? typeof t.value == "function" ? t.value(e, e.data[n][e.cursor.idx], n, e.cursor.idx) : e.data[n][e.cursor.idx] : null,
|
|
91
|
+
data: e.cursor?.idx ? e.data[n][e.cursor?.idx] : null,
|
|
92
|
+
show: t.show
|
|
93
|
+
}));
|
|
94
|
+
}],
|
|
95
|
+
setSelect: [(e) => {
|
|
96
|
+
M("select", e.select), w.showDebug && console.log("setSelect", e.select), I.value = [e.posToVal(e.select.left, "x"), e.posToVal(e.select.left + e.select.width, "x")];
|
|
97
|
+
}],
|
|
98
|
+
setScale: [(e) => {
|
|
99
|
+
w.showDebug && console.log("setScale", e.scales), I.value = [e.scales.x.min || null, e.scales.x.max || null];
|
|
100
|
+
}]
|
|
101
|
+
}
|
|
102
|
+
}, z, B = f();
|
|
103
|
+
function V() {
|
|
104
|
+
z && z.destroy(), z = new x({
|
|
105
|
+
width: 100,
|
|
106
|
+
height: 100,
|
|
107
|
+
...C(w.options, R)
|
|
108
|
+
}, w.data, N.value), B.value = z, I.value && I.value[0] !== null && I.value[1] !== null && z.setScale("x", {
|
|
109
|
+
min: I.value[0],
|
|
110
|
+
max: I.value[1]
|
|
111
|
+
}), setTimeout(() => {
|
|
112
|
+
H();
|
|
113
|
+
}, 0);
|
|
114
|
+
}
|
|
115
|
+
u(() => {
|
|
116
|
+
V();
|
|
117
|
+
}), y([P, F], () => {
|
|
118
|
+
s(() => {
|
|
119
|
+
H();
|
|
120
|
+
});
|
|
121
|
+
}), y(w.data, (e) => {
|
|
122
|
+
if (w.noResetScale) {
|
|
123
|
+
z.setData(e, !1), z.redraw(!1);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
z.setData(e, !0);
|
|
127
|
+
}), y(w.options, (e, t) => {
|
|
128
|
+
w.showDebug && console.log("watch options", e, t), V();
|
|
129
|
+
}), y(() => I.value, (e) => {
|
|
130
|
+
e && e[0] !== null && e[1] !== null && (z.scales.x.min !== e[0] || z.scales.x.max !== e[1]) && (w.showDebug && console.log("watch zoom setScale", z.scales.x.min, e[0], z.scales.x.max, e[1]), z.setScale("x", {
|
|
131
|
+
min: e[0],
|
|
132
|
+
max: e[1]
|
|
133
|
+
}));
|
|
134
|
+
});
|
|
135
|
+
function H() {
|
|
136
|
+
z.setSize({
|
|
137
|
+
width: P.value,
|
|
138
|
+
height: F.value
|
|
139
|
+
}), w.showDebug && console.log("resize", z);
|
|
140
|
+
}
|
|
141
|
+
function U(e) {
|
|
142
|
+
typeof e == "object" && (e = L.value?.indexOf(e) || -1), z.setSeries(e, { show: !z.series[e].show }), L.value?.[e] && (L.value[e].show = z.series[e].show);
|
|
143
|
+
}
|
|
144
|
+
return o({
|
|
145
|
+
toggleShow: U,
|
|
146
|
+
uplot: B
|
|
147
|
+
}), (o, s) => (d(), n("div", T, [
|
|
148
|
+
m(o.$slots, "header", {
|
|
149
|
+
series: L.value,
|
|
150
|
+
toggleShow: U
|
|
151
|
+
}),
|
|
152
|
+
r("div", {
|
|
153
|
+
ref_key: "el",
|
|
154
|
+
ref: N,
|
|
155
|
+
class: "__uplot"
|
|
156
|
+
}, null, 512),
|
|
157
|
+
a.showDebug ? (d(), n("div", E, [
|
|
158
|
+
i(h(g(P)) + " x " + h(g(F)) + " ", 1),
|
|
159
|
+
s[0] ||= r("br", null, null, -1),
|
|
160
|
+
r("pre", D, h(L.value), 1)
|
|
161
|
+
])) : t("", !0),
|
|
162
|
+
a.noFooter ? t("", !0) : m(o.$slots, "footer", {
|
|
163
|
+
key: 1,
|
|
164
|
+
series: L.value,
|
|
165
|
+
toggleShow: U
|
|
166
|
+
}, () => [r("div", O, [(d(!0), n(e, null, p(L.value, (e, r) => (d(), n("div", {
|
|
167
|
+
key: e.label,
|
|
168
|
+
class: c(["__uplot-legend-series", [`__uplot-${e.label?.toLowerCase()}`, `__uplot-i-${r}`]]),
|
|
169
|
+
style: l({ backgroundColor: e.show ? "" : "lightgrey" }),
|
|
170
|
+
onClick: (e) => U(r)
|
|
171
|
+
}, [r === 0 ? t("", !0) : (d(), n("span", {
|
|
172
|
+
key: 0,
|
|
173
|
+
style: l({ color: e.stroke || "black" }),
|
|
174
|
+
class: "__uplot-legend-label"
|
|
175
|
+
}, h(e.label), 5)), e.value ? (d(), n("span", A, h(e.value), 1)) : (d(), n("span", j, "--"))], 14, k))), 128))])])
|
|
176
|
+
]));
|
|
177
|
+
}
|
|
178
178
|
});
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
};
|
|
179
|
+
//#endregion
|
|
180
|
+
export { M as Uplot };
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`),require(`@vueuse/core`),require(`uplot`)):typeof define==`function`&&define.amd?define([`exports`,`vue`,`@vueuse/core`,`uplot`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`change-name`]={},e.Vue,e.VueUseCore,e.uPlot))})(this,function(e,t,n,r){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=s(t),c=0,u=i.length,d;c<u;c++)d=i[c],!l.call(e,d)&&d!==n&&a(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=o(t,d))||r.enumerable});return e};r=((e,t,n)=>(n=e==null?{}:i(c(e)),u(t||!e||!e.__esModule?a(n,`default`,{value:e,enumerable:!0}):n,e)))(r,1);function d(e){if(typeof e==`object`&&e){if(typeof Object.getPrototypeOf==`function`){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}return Object.prototype.toString.call(e)===`[object Object]`}return!1}function f(...e){return e.reduce((e,t)=>{if(Array.isArray(t))throw TypeError(`Arguments provided to ts-deepmerge must be objects, not arrays.`);return t&&Object.keys(t).forEach(n=>{[`__proto__`,`constructor`,`prototype`].includes(n)||(Array.isArray(e[n])&&Array.isArray(t[n])?e[n]=f.options.mergeArrays?Array.from(new Set(e[n].concat(t[n]))):t[n]:d(e[n])&&d(t[n])?e[n]=f(e[n],t[n]):e[n]=t[n])}),e},{})}var p={mergeArrays:!0};f.options=p,f.withOptions=(e,...t)=>{f.options={mergeArrays:!0,...e};let n=f(...t);return f.options=p,n};var m={class:`__uplot-root`},h={key:0,class:`extra-info`},g={style:{"text-align":`left`}},_={class:`__uplot-legend`},v=[`onClick`],y={key:1,class:`__uplot-legend-value`},b={key:2,class:`__uplot-legend-value`};e.Uplot=(0,t.defineComponent)({__name:`uplot`,props:(0,t.mergeModels)({options:{},data:{},noResetScale:{type:Boolean,default:!1},showDebug:{type:Boolean,default:!1},noFooter:{type:Boolean,default:!1}},{zoom:{default:()=>[null,null]},zoomModifiers:{},series:{default:()=>[]},seriesModifiers:{}}),emits:(0,t.mergeModels)([`select`,`cursor`],[`update:zoom`,`update:series`]),setup(e,{expose:i,emit:a}){let o=e,s=a,c=(0,t.useTemplateRef)(`el`),{width:l,height:u}=(0,n.useElementSize)(c),d=(0,t.useModel)(e,`zoom`),p=(0,t.useModel)(e,`series`),x={title:void 0,legend:{show:!1},hooks:{init:[e=>{o.showDebug&&console.log(`init`,e),p.value=e.series.map((t,n)=>({label:t.label,stroke:typeof t.stroke==`function`?t.stroke(e,n):null,value:null,data:null,show:t.show}))}],setCursor:[e=>{s(`cursor`,e.cursor),p.value=e.series.map((t,n)=>({label:t.label,stroke:typeof t.stroke==`function`?t.stroke(e,n):null,value:e.cursor.idx&&e.data[n][e.cursor.idx]?typeof t.value==`function`?t.value(e,e.data[n][e.cursor.idx],n,e.cursor.idx):e.data[n][e.cursor.idx]:null,data:e.cursor?.idx?e.data[n][e.cursor?.idx]:null,show:t.show}))}],setSelect:[e=>{s(`select`,e.select),o.showDebug&&console.log(`setSelect`,e.select),d.value=[e.posToVal(e.select.left,`x`),e.posToVal(e.select.left+e.select.width,`x`)]}],setScale:[e=>{o.showDebug&&console.log(`setScale`,e.scales),d.value=[e.scales.x.min||null,e.scales.x.max||null]}]}},S,C=(0,t.ref)();function w(){S&&S.destroy(),S=new r.default({width:100,height:100,...f(o.options,x)},o.data,c.value),C.value=S,d.value&&d.value[0]!==null&&d.value[1]!==null&&S.setScale(`x`,{min:d.value[0],max:d.value[1]}),setTimeout(()=>{T()},0)}(0,t.onMounted)(()=>{w()}),(0,t.watch)([l,u],()=>{(0,t.nextTick)(()=>{T()})}),(0,t.watch)(o.data,e=>{if(o.noResetScale){S.setData(e,!1),S.redraw(!1);return}S.setData(e,!0)}),(0,t.watch)(o.options,(e,t)=>{o.showDebug&&console.log(`watch options`,e,t),w()}),(0,t.watch)(()=>d.value,e=>{e&&e[0]!==null&&e[1]!==null&&(S.scales.x.min!==e[0]||S.scales.x.max!==e[1])&&(o.showDebug&&console.log(`watch zoom setScale`,S.scales.x.min,e[0],S.scales.x.max,e[1]),S.setScale(`x`,{min:e[0],max:e[1]}))});function T(){S.setSize({width:l.value,height:u.value}),o.showDebug&&console.log(`resize`,S)}function E(e){typeof e==`object`&&(e=p.value?.indexOf(e)||-1),S.setSeries(e,{show:!S.series[e].show}),p.value?.[e]&&(p.value[e].show=S.series[e].show)}return i({toggleShow:E,uplot:C}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,m,[(0,t.renderSlot)(n.$slots,`header`,{series:p.value,toggleShow:E}),(0,t.createElementVNode)(`div`,{ref_key:`el`,ref:c,class:`__uplot`},null,512),e.showDebug?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,h,[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(l))+` x `+(0,t.toDisplayString)((0,t.unref)(u))+` `,1),r[0]||=(0,t.createElementVNode)(`br`,null,null,-1),(0,t.createElementVNode)(`pre`,g,(0,t.toDisplayString)(p.value),1)])):(0,t.createCommentVNode)(``,!0),e.noFooter?(0,t.createCommentVNode)(``,!0):(0,t.renderSlot)(n.$slots,`footer`,{key:1,series:p.value,toggleShow:E},()=>[(0,t.createElementVNode)(`div`,_,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(p.value,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e.label,class:(0,t.normalizeClass)([`__uplot-legend-series`,[`__uplot-${e.label?.toLowerCase()}`,`__uplot-i-${n}`]]),style:(0,t.normalizeStyle)({backgroundColor:e.show?``:`lightgrey`}),onClick:e=>E(n)},[n===0?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,style:(0,t.normalizeStyle)({color:e.stroke||`black`}),class:`__uplot-legend-label`},(0,t.toDisplayString)(e.label),5)),e.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,y,(0,t.toDisplayString)(e.value),1)):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,b,`--`))],14,v))),128))])])]))}})});
|
package/dist/src/App.vue.d.ts
CHANGED
|
@@ -16,9 +16,7 @@ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
16
16
|
readonly "onUpdate:zoom"?: ((value: number[] | null[]) => any) | undefined;
|
|
17
17
|
readonly "onUpdate:series"?: ((value: Series[]) => any) | undefined;
|
|
18
18
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
19
|
-
$attrs:
|
|
20
|
-
[x: string]: unknown;
|
|
21
|
-
};
|
|
19
|
+
$attrs: import('vue').Attrs;
|
|
22
20
|
$refs: {
|
|
23
21
|
[x: string]: unknown;
|
|
24
22
|
} & {
|
|
@@ -85,10 +83,10 @@ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
85
83
|
onCursor?: ((cursor: import('uplot').Cursor) => any) | undefined;
|
|
86
84
|
"onUpdate:zoom"?: ((value: number[] | null[]) => any) | undefined;
|
|
87
85
|
"onUpdate:series"?: ((value: Series[]) => any) | undefined;
|
|
88
|
-
}>, "toggleShow" | "uplot" | ("noResetScale" | "showDebug" | "noFooter")> &
|
|
86
|
+
}>, "toggleShow" | "uplot" | ("noResetScale" | "showDebug" | "noFooter")> & {
|
|
89
87
|
toggleShow: (idx: number | Series) => void;
|
|
90
|
-
uplot:
|
|
91
|
-
}
|
|
88
|
+
uplot: any;
|
|
89
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
92
90
|
$slots: {
|
|
93
91
|
header?(_: {
|
|
94
92
|
series: Series[];
|
package/dist/uplot.css
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
.uplot,.uplot *,.uplot
|
|
1
|
+
.uplot,.uplot *,.uplot :before,.uplot :after{box-sizing:border-box}.uplot{width:min-content;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}.u-title{text-align:center;font-size:18px;font-weight:700}.u-wrap{-webkit-user-select:none;user-select:none;position:relative}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{width:100%;height:100%;display:block;position:relative}.u-axis{position:absolute}.u-legend{text-align:center;margin:auto;font-size:14px}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{vertical-align:middle;display:inline-block}.u-legend .u-marker{width:1em;height:1em;margin-right:4px;background-clip:padding-box!important}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{pointer-events:none;background:#00000012;position:absolute}.u-cursor-x,.u-cursor-y{pointer-events:none;will-change:transform;position:absolute;top:0;left:0}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{pointer-events:none;will-change:transform;border:0 solid;border-radius:50%;position:absolute;top:0;left:0;background-clip:padding-box!important}.u-axis.u-off,.u-select.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-cursor-pt.u-off{display:none}.__uplot{flex:auto;min-height:120px;position:relative}.__uplot-root{flex-direction:column;width:100%;height:100%;display:flex}.__uplot .uplot{position:absolute;inset:0}.__uplot-legend{flex-flow:wrap;place-content:center space-between;align-items:center;gap:.25em;padding:.5em;font-size:10px;display:flex}.__uplot-legend-series{color:#000;background-color:#fff;border:1px solid #d3d3d3;border-radius:5px;flex-flow:column;place-content:center space-between;align-items:center;min-width:6em;min-height:4em;padding:5px;display:flex}.__uplot-i-0{justify-content:end;min-width:12em}.extra-info{color:#000;background-color:#fff;border:1px solid #000;padding:5px;position:absolute;bottom:0;left:0}
|
|
2
|
+
/*$vite$:1*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowtools/uplot",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.18",
|
|
5
5
|
"description": "Modern vue component for uplot",
|
|
6
6
|
"author": "Jukka Raimovaara <roska@mentalhouse.fi> (Mentalhouse Oy)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -41,24 +41,24 @@
|
|
|
41
41
|
"vue": "^3.5.18"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@antfu/eslint-config": "^
|
|
44
|
+
"@antfu/eslint-config": "^8.1.1",
|
|
45
45
|
"@types/node": "^24.1.0",
|
|
46
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
47
|
-
"@vitest/coverage-v8": "^
|
|
46
|
+
"@vitejs/plugin-vue": "^6.0.5",
|
|
47
|
+
"@vitest/coverage-v8": "^4.1.4",
|
|
48
48
|
"@vue/test-utils": "^2.4.6",
|
|
49
|
-
"@vueuse/core": "^
|
|
50
|
-
"bumpp": "^
|
|
51
|
-
"eslint": "^
|
|
52
|
-
"jsdom": "^
|
|
53
|
-
"lint-staged": "^16.
|
|
54
|
-
"simple-git-hooks": "^2.
|
|
55
|
-
"typescript": "^
|
|
49
|
+
"@vueuse/core": "^14.2.1",
|
|
50
|
+
"bumpp": "^11.0.1",
|
|
51
|
+
"eslint": "^10.2.0",
|
|
52
|
+
"jsdom": "^29.0.2",
|
|
53
|
+
"lint-staged": "^16.4.0",
|
|
54
|
+
"simple-git-hooks": "^2.13.1",
|
|
55
|
+
"typescript": "^6.0.2",
|
|
56
56
|
"uplot": "^1.6.31",
|
|
57
57
|
"vi-canvas-mock": "^1.0.0",
|
|
58
|
-
"vite": "^
|
|
58
|
+
"vite": "^8.0.8",
|
|
59
59
|
"vite-plugin-dts": "^4.3.0",
|
|
60
|
-
"vitest": "^
|
|
61
|
-
"vue": "^3.5.
|
|
60
|
+
"vitest": "^4.1.4",
|
|
61
|
+
"vue": "^3.5.32"
|
|
62
62
|
},
|
|
63
63
|
"simple-git-hooks": {
|
|
64
64
|
"pre-commit": "pnpm lint-staged"
|