vvplot 0.1.3 → 0.2.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # VVPlot
2
2
 
3
- VVPlot is a Vue based graphic library. It provides a grammar of graphics style API to create various types of plots.
3
+ [VVPlot](https://fan-ix.github.io/vvplot/) is a Vue based graphic library. It provides a grammar of graphics style API to create various types of plots.
4
4
 
5
5
  ## Usage
6
6
 
@@ -12,7 +12,7 @@ VVPlot is a Vue based graphic library. It provides a grammar of graphics style A
12
12
  </template>
13
13
 
14
14
  <script setup>
15
- import { VVPlot, VVGeomPoint } from 'vvplot/components'
15
+ import { VVPlot, VVGeomPoint } from 'vvplot'
16
16
 
17
17
  const data = [{ x: 1, y: 2 }, { x: 2, y: 3 }, { x: 3, y: 5 }]
18
18
  </script>
package/dist/style.css CHANGED
@@ -1,16 +1,3 @@
1
- .vvplot {
2
- position: relative;
3
- }
4
-
5
- .vvplot-panel-container {
6
- pointer-events: none;
7
- }
8
-
9
- .vvplot-panel {
10
- display: contents;
11
- pointer-events: auto;
12
- }
13
-
14
1
  .vvplot-legend {
15
2
  display: flex;
16
3
  flex-direction: column;
@@ -0,0 +1,307 @@
1
+ import { ComponentOptionsMixin } from '../../vue/dist/vue.esm-bundler.js';
2
+ import { ComponentOptionsMixin as ComponentOptionsMixin_2 } from '../../../vue/dist/vue.esm-bundler.js';
3
+ import { ComponentProvideOptions } from '../../vue/dist/vue.esm-bundler.js';
4
+ import { ComponentProvideOptions as ComponentProvideOptions_2 } from '../../../vue/dist/vue.esm-bundler.js';
5
+ import { DefineComponent } from '../../vue/dist/vue.esm-bundler.js';
6
+ import { DefineComponent as DefineComponent_2 } from '../../../vue/dist/vue.esm-bundler.js';
7
+ import { PublicProps } from '../../vue/dist/vue.esm-bundler.js';
8
+ import { PublicProps as PublicProps_2 } from '../../../vue/dist/vue.esm-bundler.js';
9
+
10
+ export declare namespace components {
11
+ export {
12
+ VVPlot,
13
+ VVAction,
14
+ VVSelection,
15
+ VVAxis,
16
+ VVAxisX,
17
+ VVAxisY,
18
+ VVGeom,
19
+ VVGeomBar,
20
+ VVGeomBlank,
21
+ VVGeomBoxplot,
22
+ VVGeomCurve,
23
+ VVGeomDensity,
24
+ VVGeomHistogram,
25
+ VVGeomLine,
26
+ VVGeomLinerange,
27
+ VVGeomPath,
28
+ VVGeomPoint,
29
+ VVGeomPolygon,
30
+ VVGeomRect,
31
+ VVGeomSegment,
32
+ VVGeomStick,
33
+ VVGeomText,
34
+ VVGeomTextsegment,
35
+ VVGeomTile
36
+ }
37
+ }
38
+
39
+ export declare namespace number_cut {
40
+ let _default: {
41
+ '': number;
42
+ k: number;
43
+ M: number;
44
+ G: number;
45
+ T: number;
46
+ P: number;
47
+ E: number;
48
+ Z: number;
49
+ Y: number;
50
+ };
51
+ { _default as default };
52
+ let si: {
53
+ y: number;
54
+ z: number;
55
+ a: number;
56
+ f: number;
57
+ p: number;
58
+ n: number;
59
+ μ: number;
60
+ m: number;
61
+ '': number;
62
+ k: number;
63
+ M: number;
64
+ G: number;
65
+ T: number;
66
+ P: number;
67
+ E: number;
68
+ Z: number;
69
+ Y: number;
70
+ };
71
+ let binary: {
72
+ '': number;
73
+ Ki: number;
74
+ Mi: number;
75
+ Gi: number;
76
+ Ti: number;
77
+ Pi: number;
78
+ Ei: number;
79
+ Zi: number;
80
+ Yi: number;
81
+ };
82
+ export namespace time {
83
+ let ns: number;
84
+ let μs: number;
85
+ let ms: number;
86
+ let s: number;
87
+ let m: number;
88
+ let h: number;
89
+ let d: number;
90
+ let w: number;
91
+ let M: number;
92
+ let y: number;
93
+ }
94
+ }
95
+
96
+ export declare namespace oob {
97
+ { oob_censor as censor };
98
+ export function squish(value: any, { min, max }: {
99
+ min: any;
100
+ max: any;
101
+ }): any;
102
+ { oob_squish_any as squish_any };
103
+ { oob_squish_infinite as squish_infinite };
104
+ export function discard(value: any, { min, max }: {
105
+ min: any;
106
+ max: any;
107
+ }): any;
108
+ }
109
+
110
+ /**
111
+ * turn out-of-bounds values to NaN
112
+ * @param {number} value
113
+ * @param {Object} option
114
+ * @param {number} option.min lower bound
115
+ * @param {number} option.max upper bound
116
+ * @returns {number}
117
+ */
118
+ declare function oob_censor(value: number, { min, max }: {
119
+ min: number;
120
+ max: number;
121
+ }): number;
122
+
123
+ export declare const VVAction: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
124
+
125
+ export declare const VVAxis: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
126
+
127
+ export declare const VVAxisX: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
128
+
129
+ export declare const VVAxisY: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
130
+
131
+ export declare namespace vvbreak {
132
+ { break_number as number };
133
+ { break_datetime as datetime };
134
+ }
135
+
136
+ export declare const VVGeom: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
137
+
138
+ export declare const VVGeomBar: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
139
+
140
+ export declare const VVGeomBlank: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
141
+
142
+ export declare const VVGeomBoxplot: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
143
+
144
+ export declare const VVGeomCurve: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
145
+
146
+ export declare const VVGeomDensity: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
147
+
148
+ export declare const VVGeomHistogram: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
149
+
150
+ export declare const VVGeomLine: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
151
+
152
+ export declare const VVGeomLinerange: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
153
+
154
+ export declare const VVGeomPath: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
155
+
156
+ export declare const VVGeomPoint: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
157
+
158
+ export declare const VVGeomPolygon: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
159
+
160
+ export declare const VVGeomRect: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
161
+
162
+ export declare const VVGeomSegment: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
163
+
164
+ export declare const VVGeomStick: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
165
+
166
+ export declare const VVGeomText: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
167
+
168
+ export declare const VVGeomTextsegment: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
169
+
170
+ export declare const VVGeomTile: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
171
+
172
+ export declare namespace vvlabel {
173
+ { format_number as number };
174
+ { format_datetime as datetime };
175
+ { format_datetime as timestamp };
176
+ { format_asis as asis };
177
+ { format_auto as auto };
178
+ export function _default_1(opts: any): (x: any, i: any, arr?: any[]) => string;
179
+ { _default_1 as default };
180
+ }
181
+
182
+ export declare const VVPlot: DefineComponent< {}, {
183
+ svg: any;
184
+ serialize(): string | null;
185
+ $emit: (event: "resize" | "select" | "rangechange" | "update:range" | "update:rangePreview", ...args: any[]) => void;
186
+ flip: boolean;
187
+ clip: boolean;
188
+ reverse?: Record<string, any> | undefined;
189
+ resize?: any;
190
+ theme?: Record<string, any> | unknown[] | undefined;
191
+ action?: Record<string, any> | unknown[] | undefined;
192
+ data?: unknown[] | undefined;
193
+ render?: string | undefined;
194
+ scales?: Record<string, any> | undefined;
195
+ minRange?: Record<string, any> | undefined;
196
+ expandAdd?: Record<string, any> | undefined;
197
+ expandMult?: Record<string, any> | undefined;
198
+ levels?: Record<string, any> | undefined;
199
+ axes?: Record<string, any> | unknown[] | undefined;
200
+ legendTeleport?: any;
201
+ range?: Record<string, any> | undefined;
202
+ rangePreview?: Record<string, any> | undefined;
203
+ aes?: Record<string, any> | undefined;
204
+ extend?: Record<string, any> | undefined;
205
+ $props: {
206
+ readonly flip?: boolean | undefined;
207
+ readonly clip?: boolean | undefined;
208
+ readonly reverse?: Record<string, any> | undefined;
209
+ readonly resize?: any;
210
+ readonly theme?: Record<string, any> | unknown[] | undefined;
211
+ readonly action?: Record<string, any> | unknown[] | undefined;
212
+ readonly data?: unknown[] | undefined;
213
+ readonly render?: string | undefined;
214
+ readonly scales?: Record<string, any> | undefined;
215
+ readonly minRange?: Record<string, any> | undefined;
216
+ readonly expandAdd?: Record<string, any> | undefined;
217
+ readonly expandMult?: Record<string, any> | undefined;
218
+ readonly levels?: Record<string, any> | undefined;
219
+ readonly axes?: Record<string, any> | unknown[] | undefined;
220
+ readonly legendTeleport?: any;
221
+ readonly range?: Record<string, any> | undefined;
222
+ readonly rangePreview?: Record<string, any> | undefined;
223
+ readonly aes?: Record<string, any> | undefined;
224
+ readonly extend?: Record<string, any> | undefined;
225
+ };
226
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, any, any>;
227
+
228
+ export declare namespace vvscale {
229
+ { palette_scales as color };
230
+ { palette_scales as stroke };
231
+ { palette_scales as fill };
232
+ export namespace alpha {
233
+ { continuous_scale as continuous };
234
+ { custom_scale as custom };
235
+ export function _default({ title, ...etc }?: {}): ((arr: any) => any) & {
236
+ title: any;
237
+ limits: any;
238
+ oob: typeof oob_censor;
239
+ };
240
+ { _default as default };
241
+ }
242
+ export namespace size {
243
+ export function identity({ title, ...etc }?: {}): ((arr: any) => any) & {
244
+ asis: boolean;
245
+ title: any;
246
+ };
247
+ { continuous_scale as continuous };
248
+ { custom_scale as custom };
249
+ export function _default_1({ title, ...etc }?: {}): ((arr: any) => any) & {
250
+ title: any;
251
+ limits: any;
252
+ oob: typeof oob_censor;
253
+ };
254
+ { _default_1 as default };
255
+ }
256
+ export namespace linewidth {
257
+ export function identity_1({ title, ...etc }?: {}): ((arr: any) => any) & {
258
+ asis: boolean;
259
+ title: any;
260
+ };
261
+ { identity_1 as identity };
262
+ { continuous_scale as continuous };
263
+ { manual_scale as manual };
264
+ { custom_scale as custom };
265
+ export function _default_2({ title, ...etc }?: {}): ((arr: any) => any) & {
266
+ title: any;
267
+ limits: any;
268
+ oob: typeof oob_censor;
269
+ };
270
+ { _default_2 as default };
271
+ }
272
+ export namespace linetype {
273
+ export function identity_2({ title, ...etc }?: {}): ((arr: any) => any) & {
274
+ asis: boolean;
275
+ title: any;
276
+ };
277
+ { identity_2 as identity };
278
+ { linetype_scale_discrete as discrete };
279
+ { linetype_scale_discrete as default };
280
+ { custom_scale as custom };
281
+ }
282
+ export namespace shape {
283
+ export function identity_3({ title, ...etc }?: {}): ((arr: any) => any) & {
284
+ asis: boolean;
285
+ title: any;
286
+ };
287
+ { identity_3 as identity };
288
+ { shape_scale_discrete as discrete };
289
+ { shape_scale_discrete as default };
290
+ { custom_scale as custom };
291
+ }
292
+ }
293
+
294
+ export declare const VVSelection: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
295
+
296
+ export declare namespace vvtheme {
297
+ { theme_base as base };
298
+ { theme_default as default };
299
+ { theme_light as light };
300
+ { theme_classic as classic };
301
+ { theme_gray as gray };
302
+ { theme_dark as dark };
303
+ { theme_linedraw as linedraw };
304
+ { theme_void as void };
305
+ }
306
+
307
+ export { }