@timescope/vue 0.0.0-alpha.3 → 0.0.0-alpha.5
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/index.d.ts +10 -5
- package/index.js +1 -1
- package/package.json +8 -8
package/index.d.ts
CHANGED
|
@@ -3,11 +3,10 @@ import { Decimal, Decimal as Decimal$1, FieldDefLike, Timescope, TimescopeNumber
|
|
|
3
3
|
import * as vue0 from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/Timescope.vue.d.ts
|
|
6
|
-
declare const __VLS_export: <Source extends Record<string, TimescopeSourceInput>, SourceName extends Record<string, keyof Source>, TimeDef extends Record<string, FieldDefLike<TimescopeTimeLike<never>>>, ValueDef extends Record<string, FieldDefLike<TimescopeNumberLike | null>>, Track extends string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>,
|
|
6
|
+
declare const __VLS_export: <Source extends Record<string, TimescopeSourceInput>, SourceName extends Record<string, keyof Source>, TimeDef extends Record<string, FieldDefLike<TimescopeTimeLike<never>>>, ValueDef extends Record<string, FieldDefLike<TimescopeNumberLike | null>>, Track extends string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
7
7
|
props: __VLS_PrettifyLocal<{
|
|
8
8
|
width?: string;
|
|
9
9
|
height?: string;
|
|
10
|
-
stack?: "vertical" | "horizontal";
|
|
11
10
|
time?: Decimal$1 | number | null | string | Date;
|
|
12
11
|
timeRange?: [Decimal$1 | number | null | string | Date | undefined, Decimal$1 | number | null | string | Date | undefined];
|
|
13
12
|
zoom?: number;
|
|
@@ -22,12 +21,18 @@ declare const __VLS_export: <Source extends Record<string, TimescopeSourceInput>
|
|
|
22
21
|
} & {
|
|
23
22
|
onTimechanged?: ((args_0: Decimal$1 | null) => any) | undefined;
|
|
24
23
|
onTimechanging?: ((args_0: Decimal$1 | null) => any) | undefined;
|
|
24
|
+
onTimeanimating?: ((args_0: Decimal$1 | null) => any) | undefined;
|
|
25
25
|
onZoomchanged?: ((args_0: number) => any) | undefined;
|
|
26
26
|
onZoomchanging?: ((args_0: number) => any) | undefined;
|
|
27
|
+
onZoomanimating?: ((args_0: number) => any) | undefined;
|
|
27
28
|
onRangechanging?: ((args_0: [Decimal$1, Decimal$1]) => any) | undefined;
|
|
28
29
|
onRangechanged?: ((args_0: [Decimal$1, Decimal$1] | null) => any) | undefined;
|
|
29
30
|
"onUpdate:time"?: ((args_0: Decimal$1 | null) => any) | undefined;
|
|
30
31
|
"onUpdate:zoom"?: ((args_0: number) => any) | undefined;
|
|
32
|
+
"onUpdate:timechanging"?: ((args_0: Decimal$1 | null) => any) | undefined;
|
|
33
|
+
"onUpdate:zoomchanging"?: ((args_0: number) => any) | undefined;
|
|
34
|
+
"onUpdate:timeanimating"?: ((args_0: Decimal$1 | null) => any) | undefined;
|
|
35
|
+
"onUpdate:zoomanimating"?: ((args_0: number) => any) | undefined;
|
|
31
36
|
}> & vue0.PublicProps & (typeof globalThis extends {
|
|
32
37
|
__VLS_PROPS_FALLBACK: infer P;
|
|
33
38
|
} ? P : {});
|
|
@@ -35,13 +40,13 @@ declare const __VLS_export: <Source extends Record<string, TimescopeSourceInput>
|
|
|
35
40
|
api: vue0.Raw<Timescope<Record<string, TimescopeSourceInput>, Record<string, string>, Record<string, FieldDefLike<TimescopeTimeLike<never>>>, Record<string, FieldDefLike<TimescopeNumberLike | null>>, string>>;
|
|
36
41
|
}>) => void;
|
|
37
42
|
attrs: any;
|
|
38
|
-
slots:
|
|
39
|
-
emit: ((evt: "timechanged", args_0: Decimal$1 | null) => void) & ((evt: "timechanging", args_0: Decimal$1 | null) => void) & ((evt: "zoomchanged", args_0: number) => void) & ((evt: "zoomchanging", args_0: number) => void) & ((evt: "rangechanging", args_0: [Decimal$1, Decimal$1]) => void) & ((evt: "rangechanged", args_0: [Decimal$1, Decimal$1] | null) => void) & ((evt: "update:time", args_0: Decimal$1 | null) => void) & ((evt: "update:zoom", args_0: number) => void);
|
|
43
|
+
slots: __VLS_Slots;
|
|
44
|
+
emit: ((evt: "timechanged", args_0: Decimal$1 | null) => void) & ((evt: "timechanging", args_0: Decimal$1 | null) => void) & ((evt: "timeanimating", args_0: Decimal$1 | null) => void) & ((evt: "zoomchanged", args_0: number) => void) & ((evt: "zoomchanging", args_0: number) => void) & ((evt: "zoomanimating", args_0: number) => void) & ((evt: "rangechanging", args_0: [Decimal$1, Decimal$1]) => void) & ((evt: "rangechanged", args_0: [Decimal$1, Decimal$1] | null) => void) & ((evt: "update:time", args_0: Decimal$1 | null) => void) & ((evt: "update:zoom", args_0: number) => void) & ((evt: "update:timechanging", args_0: Decimal$1 | null) => void) & ((evt: "update:zoomchanging", args_0: number) => void) & ((evt: "update:timeanimating", args_0: Decimal$1 | null) => void) & ((evt: "update:zoomanimating", args_0: number) => void);
|
|
40
45
|
}>) => vue0.VNode & {
|
|
41
46
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
42
47
|
};
|
|
43
48
|
declare const _default: typeof __VLS_export;
|
|
44
|
-
type __VLS_PrettifyLocal<T> = { [K in keyof T as K]: T[K] } & {};
|
|
49
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
45
50
|
//#endregion
|
|
46
51
|
//#region src/index.d.ts
|
|
47
52
|
declare const defineTimescopeOptions: <Source extends Record<string, timescope0.TimescopeSourceInput>, SourceName extends Record<string, keyof Source>, TimeDef extends Record<string, timescope0.FieldDefLike<timescope0.TimescopeTimeLike<never>>>, ValueDef extends Record<string, timescope0.FieldDefLike<timescope0.TimescopeNumberLike | null>>, Track extends string>(opts: timescope0.TimescopeOptions<Source, SourceName, TimeDef, ValueDef, Track>) => typeof opts;
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Decimal as e,Decimal as t,Timescope as n,createDefineTimescopeOptions as r,createDefineTimescopeSeries as i,createDefineTimescopeSources as a,createDefineTimescopeTracks as o}from"timescope";import{createElementBlock as s,
|
|
1
|
+
import{Decimal as e,Decimal as t,Timescope as n,createDefineTimescopeOptions as r,createDefineTimescopeSeries as i,createDefineTimescopeSources as a,createDefineTimescopeTracks as o}from"timescope";import{createElementBlock as s,defineComponent as c,markRaw as l,onBeforeUnmount as u,openBlock as d,provide as f,reactive as p,useTemplateRef as m,watch as h}from"vue";var g=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};const _=c({__name:`Timescope`,props:{width:{type:String,required:!1,default:`100%`},height:{type:String,required:!1,default:`36px`},time:{type:[Object,Number,null,String,Date],required:!1},timeRange:{type:Array,required:!1},zoom:{type:Number,required:!1},zoomRange:{type:Array,required:!1},sources:{type:null,required:!1},series:{type:null,required:!1},tracks:{type:null,required:!1},indicator:{type:Boolean,required:!1,default:!0},selection:{type:[Boolean,Object],required:!1},showFps:{type:Boolean,required:!1},fonts:{type:Array,required:!1}},emits:[`timechanged`,`timechanging`,`timeanimating`,`zoomchanged`,`zoomchanging`,`zoomanimating`,`rangechanging`,`rangechanged`,`update:time`,`update:zoom`,`update:timechanging`,`update:zoomchanging`,`update:timeanimating`,`update:zoomanimating`],setup(e,{expose:t,emit:r}){let i=r,a=e,o=l(new n({time:a.time??null,timeRange:a.timeRange,zoom:a.zoom??0,zoomRange:a.zoomRange,fonts:a.fonts}));o.on(`timechanging`,e=>i(`timechanging`,e.value)),o.on(`timechanged`,e=>i(`timechanged`,e.value)),o.on(`timeanimating`,e=>i(`timeanimating`,e.value)),o.on(`zoomchanging`,e=>i(`zoomchanging`,e.value)),o.on(`zoomchanged`,e=>i(`zoomchanged`,e.value)),o.on(`zoomanimating`,e=>i(`zoomanimating`,e.value)),o.on(`rangechanging`,e=>i(`rangechanging`,e.value)),o.on(`rangechanged`,e=>i(`rangechanged`,e.value)),o.on(`timechanged`,e=>i(`update:time`,e.value)),o.on(`zoomchanged`,e=>i(`update:zoom`,e.value)),o.on(`timechanging`,e=>i(`update:timechanging`,e.value)),o.on(`zoomchanging`,e=>i(`update:zoomchanging`,e.value)),o.on(`timeanimating`,e=>i(`update:timeanimating`,e.value)),o.on(`zoomanimating`,e=>i(`update:zoomanimating`,e.value)),a.time===void 0&&(i(`update:time`,o.time),i(`update:timechanging`,o.time),i(`update:timeanimating`,o.time)),a.zoom===void 0&&(i(`update:zoom`,o.zoom),i(`update:zoomchanging`,o.zoom),i(`update:zoomanimating`,o.zoom)),h(()=>a.time,()=>o?.setTime(a.time??null)),h(()=>a.timeRange,()=>o?.setTimeRange(a.timeRange)),h(()=>a.zoom,()=>o?.setZoom(a.zoom??0)),h(()=>a.zoomRange,()=>o?.setZoomRange(a.zoomRange)),h(()=>[a.width,a.height],()=>o.updateOptions({style:{width:a.width,height:a.height}}),{immediate:!0}),h(()=>a.sources,()=>o.updateOptions({sources:a.sources}),{immediate:!0,deep:!0}),h(()=>a.series,()=>o.updateOptions({series:a.series}),{immediate:!0,deep:!0}),h(()=>a.tracks,()=>o.updateOptions({tracks:a.tracks}),{immediate:!0,deep:!0}),h(()=>a.indicator,()=>o.updateOptions({indicator:a.indicator}),{immediate:!0,deep:!0}),h(()=>a.selection,()=>o.updateOptions({selection:a.selection}),{immediate:!0,deep:!0}),h(()=>a.showFps,()=>o.updateOptions({showFps:a.showFps}),{immediate:!0});let s=m(`container-ref`);h(s,()=>{o?.unmount(),s.value&&o?.mount(s.value)}),u(()=>{o?.dispose()});let c=o;f(`timescope-api`,c),t({api:c});let d={emit:i,props:a,timescope:o,el:s,api:c};return Object.defineProperty(d,`__isScriptSetup`,{enumerable:!1,value:!0}),d}}),v={ref:`container-ref`};function y(e,t,n,r,i,a){return d(),s(`div`,v,null,512)}var b=g(_,[[`render`,y],[`__file`,`/home/runner/work/timescope/timescope/packages/timescope-vue/src/Timescope.vue`]]);const x=r(p),S=a(p),C=o(p),w=i(p);export{e as Decimal,b as Timescope,x as defineTimescopeOptions,w as defineTimescopeSeries,S as defineTimescopeSources,C as defineTimescopeTracks};
|
package/package.json
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@timescope/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-alpha.
|
|
4
|
+
"version": "0.0.0-alpha.5",
|
|
5
5
|
"description": "",
|
|
6
|
+
"author": "Xenodrive, Inc.",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://xenodrive.github.io/timescope/",
|
|
9
|
+
"repository": {
|
|
10
|
+
"url": "https://github.com/xenodrive/timescope/"
|
|
11
|
+
},
|
|
6
12
|
"keywords": [
|
|
7
13
|
"time-series",
|
|
8
14
|
"timeseries",
|
|
@@ -13,12 +19,6 @@
|
|
|
13
19
|
"javascript",
|
|
14
20
|
"vue"
|
|
15
21
|
],
|
|
16
|
-
"author": "Xenodrive, Inc.",
|
|
17
|
-
"license": "MIT",
|
|
18
|
-
"homepage": "https://xenodrive.github.io/timescope/",
|
|
19
|
-
"repository": {
|
|
20
|
-
"url": "https://github.com/xenodrive/timescope/"
|
|
21
|
-
},
|
|
22
22
|
"main": "./index.js",
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"vue": "^3.5.25",
|
|
32
|
-
"timescope": "^0.0.0-alpha.
|
|
32
|
+
"timescope": "^0.0.0-alpha.5"
|
|
33
33
|
},
|
|
34
34
|
"types": "./index.d.ts"
|
|
35
35
|
}
|