@eox/chart 1.0.1 → 1.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/dist/eox-chart.js +15876 -15837
- package/dist/eox-chart.umd.cjs +26 -50
- package/package.json +10 -6
- package/src/enums/default-opt.js +1 -0
- package/src/main.js +36 -12
- package/src/methods/decode/index.js +1 -0
- package/src/methods/decode/parse-spec.js +65 -0
- package/src/methods/encode/encode-spec-b64.js +15 -0
- package/src/methods/encode/index.js +1 -0
- package/src/methods/render/render-chart.js +2 -0
- package/types/enums/default-opt.d.ts.map +1 -1
- package/types/main.d.ts +34 -11
- package/types/main.d.ts.map +1 -1
- package/types/methods/decode/index.d.ts +2 -0
- package/types/methods/decode/index.d.ts.map +1 -0
- package/types/methods/decode/parse-spec.d.ts +8 -0
- package/types/methods/decode/parse-spec.d.ts.map +1 -0
- package/types/methods/encode/encode-spec-b64.d.ts +8 -0
- package/types/methods/encode/encode-spec-b64.d.ts.map +1 -0
- package/types/methods/encode/index.d.ts +2 -0
- package/types/methods/encode/index.d.ts.map +1 -0
- package/types/methods/render/render-chart.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eox/chart",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git@github.com:EOX-A/EOxElements.git"
|
|
8
|
+
},
|
|
5
9
|
"devDependencies": {
|
|
6
|
-
"vite": "^
|
|
10
|
+
"vite": "^7.1.12"
|
|
7
11
|
},
|
|
8
12
|
"engines": {
|
|
9
13
|
"npm": ">=8.0.0",
|
|
@@ -34,11 +38,11 @@
|
|
|
34
38
|
},
|
|
35
39
|
"dependencies": {
|
|
36
40
|
"@eox/elements-utils": "^1.1.0",
|
|
37
|
-
"@eox/ui": "^0.
|
|
41
|
+
"@eox/ui": "^0.5.0",
|
|
38
42
|
"deepmerge-ts": "^7.1.3",
|
|
39
43
|
"lit": "^3.2.0",
|
|
40
|
-
"vega": "^
|
|
41
|
-
"vega-embed": "^
|
|
42
|
-
"vega-lite": "^
|
|
44
|
+
"vega": "^6.2.0",
|
|
45
|
+
"vega-embed": "^7.1.0",
|
|
46
|
+
"vega-lite": "^6.4.1"
|
|
43
47
|
}
|
|
44
48
|
}
|
package/src/enums/default-opt.js
CHANGED
package/src/main.js
CHANGED
|
@@ -2,19 +2,37 @@ import { LitElement, html } from "lit";
|
|
|
2
2
|
import { style } from "./style";
|
|
3
3
|
import { styleEOX } from "./style.eox";
|
|
4
4
|
import { renderChartMethod } from "./methods/render";
|
|
5
|
+
import { parseSpec } from "./methods/decode";
|
|
6
|
+
import { base64EncodeSpec } from "./methods/encode";
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Chart component based on [Vega-Lite](https://vega.github.io/vega-lite/)/[Vega-Embed](https://github.com/vega/vega-embed).
|
|
8
10
|
* Pass a valid Vega spec as `spec` property in order to render a chart.
|
|
11
|
+
* Optionally for transfer of chart definitions with both single and double quote as attribute, use the `spec` as base64 encoded string.
|
|
9
12
|
*
|
|
10
13
|
* The `eox-chart` provides some default `spec` settings (merged with the provided `spec` property) and helper functionalities on top of Vega-Lite.
|
|
11
14
|
*
|
|
15
|
+
* Default `spec` settings (see the file `src/enums/default-spec.js`):
|
|
16
|
+
* - `width`: "container" (make the chart width responsive to the parent)
|
|
17
|
+
* - `height`: "container" (make the chart height responsive to the parent)
|
|
18
|
+
* - `autosize`: "fit" (automatically adjust the layout in an attempt to force the total visualization size to fit within the given width, height and padding values)
|
|
19
|
+
* - `resize`: true (autosize layout is re-calculated on every view update)
|
|
20
|
+
* - `padding`: 16 (the padding in pixels to add around the visualization)
|
|
21
|
+
*
|
|
22
|
+
* These default `spec` settings can be overwritten by setting them to a differnt value in the `spec` property passed to `eox-chart`. Also, there are default
|
|
23
|
+
* Vega-Embed options (see the file `src/enums/default-opt.js`), which can also be overwritten in the passed `opt` property.
|
|
24
|
+
*
|
|
25
|
+
* Helper functionalities:
|
|
26
|
+
*
|
|
27
|
+
* The `eox-chart` automatically emits mouse/pointer events from the Vega-Lite chart. See below for the emitted events.
|
|
28
|
+
* For working with base64 encoded `spec` or `dataValues` attributes, `eox-chart` exports two helper methods: `base64EncodeSpec` (encoding), `parseSpec` (decoding).
|
|
29
|
+
*
|
|
12
30
|
* @element eox-chart
|
|
13
31
|
*/
|
|
14
32
|
export class EOxChart extends LitElement {
|
|
15
33
|
static properties = {
|
|
16
|
-
dataValues: { attribute: false
|
|
17
|
-
spec: { attribute: false
|
|
34
|
+
dataValues: { attribute: false },
|
|
35
|
+
spec: { attribute: false },
|
|
18
36
|
opt: { attribute: false, type: Object },
|
|
19
37
|
noShadow: { attribute: "no-shadow", type: Boolean },
|
|
20
38
|
unstyled: { type: Boolean },
|
|
@@ -24,9 +42,9 @@ export class EOxChart extends LitElement {
|
|
|
24
42
|
super();
|
|
25
43
|
|
|
26
44
|
/**
|
|
27
|
-
* [Vega-Lite spec](https://vega.github.io/vega-lite/docs/spec.html)
|
|
45
|
+
* [Vega-Lite spec](https://vega.github.io/vega-lite/docs/spec.html) either as an object or base64 encoded string.
|
|
28
46
|
*
|
|
29
|
-
* @type {import("vega-embed").VisualizationSpec}
|
|
47
|
+
* @type {import("vega-embed").VisualizationSpec | string}
|
|
30
48
|
*/
|
|
31
49
|
this.spec = undefined;
|
|
32
50
|
|
|
@@ -38,9 +56,9 @@ export class EOxChart extends LitElement {
|
|
|
38
56
|
this.opt = undefined;
|
|
39
57
|
|
|
40
58
|
/**
|
|
41
|
-
* Data values passed on runtime. Requires a [named data source](https://vega.github.io/vega-lite/docs/data.html#named) in the provided `spec
|
|
59
|
+
* Data values passed on runtime. Requires a [named data source](https://vega.github.io/vega-lite/docs/data.html#named) in the provided `spec`. Either passed as a base64 encoded string or as an object.
|
|
42
60
|
*
|
|
43
|
-
* @type {{[dataSourceName: string]: import("vega-lite/
|
|
61
|
+
* @type {{[dataSourceName: string]: import("vega-lite/types_unstable/data.js").InlineData} | string}
|
|
44
62
|
*/
|
|
45
63
|
this.dataValues = undefined;
|
|
46
64
|
|
|
@@ -59,10 +77,12 @@ export class EOxChart extends LitElement {
|
|
|
59
77
|
this.unstyled = false;
|
|
60
78
|
}
|
|
61
79
|
|
|
80
|
+
/**
|
|
81
|
+
* @private
|
|
82
|
+
*/
|
|
62
83
|
_dispatchItemPointerMoveEvent(detail) {
|
|
63
84
|
/**
|
|
64
|
-
* Chart item is hovered. Event detail includes
|
|
65
|
-
* `event` (pointermove event) and `item` (the hovered item on the chart)
|
|
85
|
+
* Chart item is hovered. Event detail includes `event` (pointermove event) and `item` (the hovered item on the chart)
|
|
66
86
|
*
|
|
67
87
|
*/
|
|
68
88
|
this.dispatchEvent(
|
|
@@ -72,10 +92,12 @@ export class EOxChart extends LitElement {
|
|
|
72
92
|
);
|
|
73
93
|
}
|
|
74
94
|
|
|
95
|
+
/**
|
|
96
|
+
* @private
|
|
97
|
+
*/
|
|
75
98
|
_dispatchItemClickEvent(detail) {
|
|
76
99
|
/**
|
|
77
|
-
* Chart item is clicked. Event detail includes
|
|
78
|
-
* `event` (click event) and `item` (the clicked item on the chart)
|
|
100
|
+
* Chart item is clicked. Event detail includes `event` (click event) and `item` (the clicked item on the chart)
|
|
79
101
|
*
|
|
80
102
|
*/
|
|
81
103
|
this.dispatchEvent(
|
|
@@ -92,7 +114,9 @@ export class EOxChart extends LitElement {
|
|
|
92
114
|
*/
|
|
93
115
|
async updated(changedProperties) {
|
|
94
116
|
if (changedProperties.has("spec") || changedProperties.has("dataValues")) {
|
|
95
|
-
|
|
117
|
+
const spec = parseSpec(this.spec);
|
|
118
|
+
const dataValues = parseSpec(this.dataValues);
|
|
119
|
+
renderChartMethod(this, spec, this.opt, dataValues);
|
|
96
120
|
}
|
|
97
121
|
}
|
|
98
122
|
|
|
@@ -150,5 +174,5 @@ export class EOxChart extends LitElement {
|
|
|
150
174
|
`;
|
|
151
175
|
}
|
|
152
176
|
}
|
|
153
|
-
|
|
177
|
+
export { base64EncodeSpec, parseSpec };
|
|
154
178
|
customElements.define("eox-chart", EOxChart);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as parseSpec } from "./parse-spec";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return if string looks like base64 encoded
|
|
3
|
+
* @param {string } input
|
|
4
|
+
* @returns { boolean }
|
|
5
|
+
*/
|
|
6
|
+
function looksLikeBase64Url(input) {
|
|
7
|
+
return (
|
|
8
|
+
typeof input === "string" &&
|
|
9
|
+
input.length % 4 !== 1 &&
|
|
10
|
+
/^[A-Za-z0-9+/]+[=]{0,2}$/.test(input)
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @param {unknown} value
|
|
16
|
+
* @returns {value is import("vega-embed").VisualizationSpec}
|
|
17
|
+
*/
|
|
18
|
+
function returnDirectly(value) {
|
|
19
|
+
return typeof value === "object" || value === undefined;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Decode base64 endoded spec into Vega spec object
|
|
24
|
+
* @param {string} base64Spec
|
|
25
|
+
* @returns {import("vega-embed").VisualizationSpec} spec
|
|
26
|
+
*/
|
|
27
|
+
const base64DecodeSpec = (base64Spec) => {
|
|
28
|
+
const binaryString = atob(base64Spec);
|
|
29
|
+
const bytes = new Uint8Array(binaryString.length);
|
|
30
|
+
for (let i = 0; i < binaryString.length; i++) {
|
|
31
|
+
bytes[i] = binaryString.charCodeAt(i);
|
|
32
|
+
}
|
|
33
|
+
const decoder = new TextDecoder();
|
|
34
|
+
const decoded = decoder.decode(bytes);
|
|
35
|
+
const vegaSpec = JSON.parse(decoded);
|
|
36
|
+
return vegaSpec;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Parses spec which can be either a base64 encoded string, JSON string or an object
|
|
41
|
+
* @param {string | import("vega-embed").VisualizationSpec} specInput
|
|
42
|
+
* @returns {import("vega-embed").VisualizationSpec} spec
|
|
43
|
+
*/
|
|
44
|
+
function parseSpec(specInput) {
|
|
45
|
+
if (returnDirectly(specInput)) {
|
|
46
|
+
return specInput;
|
|
47
|
+
}
|
|
48
|
+
const spec = specInput;
|
|
49
|
+
if (looksLikeBase64Url(spec)) {
|
|
50
|
+
try {
|
|
51
|
+
const decoded = base64DecodeSpec(spec);
|
|
52
|
+
if (typeof decoded === "object") return decoded;
|
|
53
|
+
} catch (err) {
|
|
54
|
+
console.warn("Failed to decode Base64 spec, trying JSON fallback", err);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
try {
|
|
59
|
+
return JSON.parse(spec);
|
|
60
|
+
} catch {
|
|
61
|
+
throw new Error("Invalid spec format");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export default parseSpec;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encode object to base64 string
|
|
3
|
+
* @param {import("vega-embed").VisualizationSpec} chartSpec
|
|
4
|
+
* @returns {string}
|
|
5
|
+
*/
|
|
6
|
+
const base64EncodeSpec = (chartSpec) => {
|
|
7
|
+
// Function to encode a UTF-8 string to Base64
|
|
8
|
+
const json = JSON.stringify(chartSpec);
|
|
9
|
+
const encoder = new TextEncoder();
|
|
10
|
+
const data = encoder.encode(json);
|
|
11
|
+
// @ts-expect-error Argument of type 'Uint8Array<ArrayBuffer>' is not assignable to parameter of type 'number[]'.
|
|
12
|
+
const binaryString = String.fromCharCode.apply(null, data);
|
|
13
|
+
return btoa(binaryString);
|
|
14
|
+
};
|
|
15
|
+
export default base64EncodeSpec;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as base64EncodeSpec } from "./encode-spec-b64";
|
|
@@ -26,10 +26,12 @@ const renderChartMethod = (EOxChart, spec, opt, dataValues) => {
|
|
|
26
26
|
}
|
|
27
27
|
res.view.addEventListener("pointermove", (event, item) => {
|
|
28
28
|
if (!item) return;
|
|
29
|
+
// @ts-expect-error using private method defined on EOxChart
|
|
29
30
|
EOxChart._dispatchItemPointerMoveEvent({ event, item });
|
|
30
31
|
});
|
|
31
32
|
res.view.addEventListener("click", (event, item) => {
|
|
32
33
|
if (!item) return;
|
|
34
|
+
// @ts-expect-error using private method defined on EOxChart
|
|
33
35
|
EOxChart._dispatchItemClickEvent({ event, item });
|
|
34
36
|
});
|
|
35
37
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-opt.d.ts","sourceRoot":"","sources":["../../src/enums/default-opt.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,0BAFU,OAAO,YAAY,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"default-opt.d.ts","sourceRoot":"","sources":["../../src/enums/default-opt.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,0BAFU,OAAO,YAAY,EAAE,YAAY,CAKzC"}
|
package/types/main.d.ts
CHANGED
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Chart component based on [Vega-Lite](https://vega.github.io/vega-lite/)/[Vega-Embed](https://github.com/vega/vega-embed).
|
|
3
3
|
* Pass a valid Vega spec as `spec` property in order to render a chart.
|
|
4
|
+
* Optionally for transfer of chart definitions with both single and double quote as attribute, use the `spec` as base64 encoded string.
|
|
4
5
|
*
|
|
5
6
|
* The `eox-chart` provides some default `spec` settings (merged with the provided `spec` property) and helper functionalities on top of Vega-Lite.
|
|
6
7
|
*
|
|
8
|
+
* Default `spec` settings (see the file `src/enums/default-spec.js`):
|
|
9
|
+
* - `width`: "container" (make the chart width responsive to the parent)
|
|
10
|
+
* - `height`: "container" (make the chart height responsive to the parent)
|
|
11
|
+
* - `autosize`: "fit" (automatically adjust the layout in an attempt to force the total visualization size to fit within the given width, height and padding values)
|
|
12
|
+
* - `resize`: true (autosize layout is re-calculated on every view update)
|
|
13
|
+
* - `padding`: 16 (the padding in pixels to add around the visualization)
|
|
14
|
+
*
|
|
15
|
+
* These default `spec` settings can be overwritten by setting them to a differnt value in the `spec` property passed to `eox-chart`. Also, there are default
|
|
16
|
+
* Vega-Embed options (see the file `src/enums/default-opt.js`), which can also be overwritten in the passed `opt` property.
|
|
17
|
+
*
|
|
18
|
+
* Helper functionalities:
|
|
19
|
+
*
|
|
20
|
+
* The `eox-chart` automatically emits mouse/pointer events from the Vega-Lite chart. See below for the emitted events.
|
|
21
|
+
* For working with base64 encoded `spec` or `dataValues` attributes, `eox-chart` exports two helper methods: `base64EncodeSpec` (encoding), `parseSpec` (decoding).
|
|
22
|
+
*
|
|
7
23
|
* @element eox-chart
|
|
8
24
|
*/
|
|
9
25
|
export class EOxChart extends LitElement {
|
|
10
26
|
static properties: {
|
|
11
27
|
dataValues: {
|
|
12
28
|
attribute: boolean;
|
|
13
|
-
type: ObjectConstructor;
|
|
14
29
|
};
|
|
15
30
|
spec: {
|
|
16
31
|
attribute: boolean;
|
|
17
|
-
type: ObjectConstructor;
|
|
18
32
|
};
|
|
19
33
|
opt: {
|
|
20
34
|
attribute: boolean;
|
|
@@ -29,11 +43,11 @@ export class EOxChart extends LitElement {
|
|
|
29
43
|
};
|
|
30
44
|
};
|
|
31
45
|
/**
|
|
32
|
-
* [Vega-Lite spec](https://vega.github.io/vega-lite/docs/spec.html)
|
|
46
|
+
* [Vega-Lite spec](https://vega.github.io/vega-lite/docs/spec.html) either as an object or base64 encoded string.
|
|
33
47
|
*
|
|
34
|
-
* @type {import("vega-embed").VisualizationSpec}
|
|
48
|
+
* @type {import("vega-embed").VisualizationSpec | string}
|
|
35
49
|
*/
|
|
36
|
-
spec: import("vega-embed").VisualizationSpec;
|
|
50
|
+
spec: import("vega-embed").VisualizationSpec | string;
|
|
37
51
|
/**
|
|
38
52
|
* [Vega-Embed options](https://github.com/vega/vega-embed?tab=readme-ov-file#options)
|
|
39
53
|
*
|
|
@@ -41,13 +55,13 @@ export class EOxChart extends LitElement {
|
|
|
41
55
|
*/
|
|
42
56
|
opt: import("vega-embed").EmbedOptions;
|
|
43
57
|
/**
|
|
44
|
-
* Data values passed on runtime. Requires a [named data source](https://vega.github.io/vega-lite/docs/data.html#named) in the provided `spec
|
|
58
|
+
* Data values passed on runtime. Requires a [named data source](https://vega.github.io/vega-lite/docs/data.html#named) in the provided `spec`. Either passed as a base64 encoded string or as an object.
|
|
45
59
|
*
|
|
46
|
-
* @type {{[dataSourceName: string]: import("vega-lite/
|
|
60
|
+
* @type {{[dataSourceName: string]: import("vega-lite/types_unstable/data.js").InlineData} | string}
|
|
47
61
|
*/
|
|
48
62
|
dataValues: {
|
|
49
|
-
[dataSourceName: string]: import("vega-lite/
|
|
50
|
-
};
|
|
63
|
+
[dataSourceName: string]: import("vega-lite/types_unstable/data.js").InlineData;
|
|
64
|
+
} | string;
|
|
51
65
|
/**
|
|
52
66
|
* Renders the element without a shadow root
|
|
53
67
|
*
|
|
@@ -60,8 +74,14 @@ export class EOxChart extends LitElement {
|
|
|
60
74
|
* @type {Boolean}
|
|
61
75
|
*/
|
|
62
76
|
unstyled: boolean;
|
|
63
|
-
|
|
64
|
-
|
|
77
|
+
/**
|
|
78
|
+
* @private
|
|
79
|
+
*/
|
|
80
|
+
private _dispatchItemPointerMoveEvent;
|
|
81
|
+
/**
|
|
82
|
+
* @private
|
|
83
|
+
*/
|
|
84
|
+
private _dispatchItemClickEvent;
|
|
65
85
|
/**
|
|
66
86
|
* Lifecycle method called when the element is updated
|
|
67
87
|
*
|
|
@@ -78,4 +98,7 @@ export class EOxChart extends LitElement {
|
|
|
78
98
|
render(): import("lit-html").TemplateResult<1>;
|
|
79
99
|
}
|
|
80
100
|
import { LitElement } from "lit";
|
|
101
|
+
import { base64EncodeSpec } from "./methods/encode";
|
|
102
|
+
import { parseSpec } from "./methods/decode";
|
|
103
|
+
export { base64EncodeSpec, parseSpec };
|
|
81
104
|
//# sourceMappingURL=main.d.ts.map
|
package/types/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IACE;;;;;;;;;;;;;;;;;;MAME;IAKA;;;;OAIG;IACH,MAFU,OAAO,YAAY,EAAE,iBAAiB,GAAG,MAAM,CAEpC;IAErB;;;;OAIG;IACH,KAFU,OAAO,YAAY,EAAE,YAAY,CAEvB;IAEpB;;;;OAIG;IACH,YAFU;QAAC,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,kCAAkC,EAAE,UAAU,CAAA;KAAC,GAAG,MAAM,CAEzE;IAE3B;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAGvB;;OAEG;IACH,sCAUC;IAED;;OAEG;IACH,gCAUC;IAED;;;;OAIG;IACH,2BAFW,OAAO,KAAK,EAAE,cAAc,iBAQtC;IAED;;OAEG;IACH,qBA6BC;IASD;;OAEG;IACH,+CAQC;CACF;2BA/KgC,KAAK;iCAKL,kBAAkB;0BADzB,kBAAkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/methods/decode/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default parseSpec;
|
|
2
|
+
/**
|
|
3
|
+
* Parses spec which can be either a base64 encoded string, JSON string or an object
|
|
4
|
+
* @param {string | import("vega-embed").VisualizationSpec} specInput
|
|
5
|
+
* @returns {import("vega-embed").VisualizationSpec} spec
|
|
6
|
+
*/
|
|
7
|
+
declare function parseSpec(specInput: string | import("vega-embed").VisualizationSpec): import("vega-embed").VisualizationSpec;
|
|
8
|
+
//# sourceMappingURL=parse-spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-spec.d.ts","sourceRoot":"","sources":["../../../src/methods/decode/parse-spec.js"],"names":[],"mappings":";AAsCA;;;;GAIG;AACH,sCAHW,MAAM,GAAG,OAAO,YAAY,EAAE,iBAAiB,GAC7C,OAAO,YAAY,EAAE,iBAAiB,CAqBlD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default base64EncodeSpec;
|
|
2
|
+
/**
|
|
3
|
+
* Encode object to base64 string
|
|
4
|
+
* @param {import("vega-embed").VisualizationSpec} chartSpec
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
declare function base64EncodeSpec(chartSpec: import("vega-embed").VisualizationSpec): string;
|
|
8
|
+
//# sourceMappingURL=encode-spec-b64.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encode-spec-b64.d.ts","sourceRoot":"","sources":["../../../src/methods/encode/encode-spec-b64.js"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,6CAHW,OAAO,YAAY,EAAE,iBAAiB,GACpC,MAAM,CAUlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/methods/encode/index.js"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-chart.d.ts","sourceRoot":"","sources":["../../../src/methods/render/render-chart.js"],"names":[],"mappings":";AAIA;;;;;;;GAOG;AACH,6CALW,OAAO,YAAY,EAAE,QAAQ,QAC7B,OAAO,YAAY,EAAE,iBAAiB,yBACtC,eAAO,
|
|
1
|
+
{"version":3,"file":"render-chart.d.ts","sourceRoot":"","sources":["../../../src/methods/render/render-chart.js"],"names":[],"mappings":";AAIA;;;;;;;GAOG;AACH,6CALW,OAAO,YAAY,EAAE,QAAQ,QAC7B,OAAO,YAAY,EAAE,iBAAiB,yBACtC,eAAO,QA4BjB"}
|