@opendata-ai/openchart-vanilla 9.0.0-rc.1 → 9.0.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 +10 -0
- package/dist/{chunk-T6IPHUN4.js → chunk-42WVDS3V.js} +186 -38
- package/dist/chunk-42WVDS3V.js.map +1 -0
- package/dist/{chunk-46E3QB6O.js → chunk-6GRMMSQA.js} +2 -2
- package/dist/{chunk-A5C4VCUO.js → chunk-7XFFPRQ7.js} +13 -4
- package/dist/chunk-7XFFPRQ7.js.map +1 -0
- package/dist/chunk-E3ETKTJQ.js +130 -0
- package/dist/chunk-E3ETKTJQ.js.map +1 -0
- package/dist/{chunk-5ZLSMZRM.js → chunk-HQ5GADZ4.js} +9 -8
- package/dist/{chunk-5ZLSMZRM.js.map → chunk-HQ5GADZ4.js.map} +1 -1
- package/dist/{chunk-ERPYVYFW.js → chunk-NGNHQOXO.js} +1065 -972
- package/dist/chunk-NGNHQOXO.js.map +1 -0
- package/dist/{chunk-RBXIZJPE.js → chunk-OEJHSKFZ.js} +2 -2
- package/dist/{chunk-CMIJA63X.js → chunk-RWP23N4D.js} +3 -3
- package/dist/chunk-SKQAAHHR.js +533 -0
- package/dist/chunk-SKQAAHHR.js.map +1 -0
- package/dist/{chunk-NLKQ5AOA.js → chunk-XR4B3SPC.js} +70 -30
- package/dist/chunk-XR4B3SPC.js.map +1 -0
- package/dist/export-gif.js +4 -4
- package/dist/graph-3d/index.js +4 -4
- package/dist/index.d.ts +41 -51
- package/dist/index.js +85 -216
- package/dist/index.js.map +1 -1
- package/dist/simulation-worker.js +26 -26
- package/dist/static.d.ts +10 -21
- package/dist/static.js +417 -118
- package/dist/static.js.map +1 -1
- package/dist/story/index.js +7 -7
- package/dist/styles.css.map +1 -1
- package/package.json +4 -7
- package/dist/chunk-6YPRYQKD.js +0 -297
- package/dist/chunk-6YPRYQKD.js.map +0 -1
- package/dist/chunk-A5C4VCUO.js.map +0 -1
- package/dist/chunk-ERPYVYFW.js.map +0 -1
- package/dist/chunk-FFP5GXIP.js +0 -45
- package/dist/chunk-FFP5GXIP.js.map +0 -1
- package/dist/chunk-NLKQ5AOA.js.map +0 -1
- package/dist/chunk-T6IPHUN4.js.map +0 -1
- /package/dist/{chunk-46E3QB6O.js.map → chunk-6GRMMSQA.js.map} +0 -0
- /package/dist/{chunk-RBXIZJPE.js.map → chunk-OEJHSKFZ.js.map} +0 -0
- /package/dist/{chunk-CMIJA63X.js.map → chunk-RWP23N4D.js.map} +0 -0
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
-
// ../../node_modules
|
|
42
|
+
// ../../node_modules/d3-force/src/center.js
|
|
43
43
|
function center_default(x, y) {
|
|
44
44
|
var nodes, strength = 1;
|
|
45
45
|
if (x == null)
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
};
|
|
70
70
|
return force;
|
|
71
71
|
}
|
|
72
|
-
// ../../node_modules
|
|
72
|
+
// ../../node_modules/d3-quadtree/src/add.js
|
|
73
73
|
function add_default(d) {
|
|
74
74
|
const x = +this._x.call(null, d), y = +this._y.call(null, d);
|
|
75
75
|
return add(this.cover(x, y), x, y, d);
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
return this;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
// ../../node_modules
|
|
137
|
+
// ../../node_modules/d3-quadtree/src/cover.js
|
|
138
138
|
function cover_default(x, y) {
|
|
139
139
|
if (isNaN(x = +x) || isNaN(y = +y))
|
|
140
140
|
return this;
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
return this;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
// ../../node_modules
|
|
175
|
+
// ../../node_modules/d3-quadtree/src/data.js
|
|
176
176
|
function data_default() {
|
|
177
177
|
var data = [];
|
|
178
178
|
this.visit(function(node) {
|
|
@@ -184,12 +184,12 @@
|
|
|
184
184
|
return data;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
// ../../node_modules
|
|
187
|
+
// ../../node_modules/d3-quadtree/src/extent.js
|
|
188
188
|
function extent_default(_) {
|
|
189
189
|
return arguments.length ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
// ../../node_modules
|
|
192
|
+
// ../../node_modules/d3-quadtree/src/quad.js
|
|
193
193
|
function quad_default(node, x0, y0, x1, y1) {
|
|
194
194
|
this.node = node;
|
|
195
195
|
this.x0 = x0;
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
this.y1 = y1;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
// ../../node_modules
|
|
201
|
+
// ../../node_modules/d3-quadtree/src/find.js
|
|
202
202
|
function find_default(x, y, radius) {
|
|
203
203
|
var data, x0 = this._x0, y0 = this._y0, x1, y1, x2, y2, x3 = this._x1, y3 = this._y1, quads = [], node = this._root, q, i;
|
|
204
204
|
if (node)
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
return data;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
// ../../node_modules
|
|
237
|
+
// ../../node_modules/d3-quadtree/src/remove.js
|
|
238
238
|
function remove_default(d) {
|
|
239
239
|
if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d)))
|
|
240
240
|
return this;
|
|
@@ -282,12 +282,12 @@
|
|
|
282
282
|
return this;
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
// ../../node_modules
|
|
285
|
+
// ../../node_modules/d3-quadtree/src/root.js
|
|
286
286
|
function root_default() {
|
|
287
287
|
return this._root;
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
-
// ../../node_modules
|
|
290
|
+
// ../../node_modules/d3-quadtree/src/size.js
|
|
291
291
|
function size_default() {
|
|
292
292
|
var size = 0;
|
|
293
293
|
this.visit(function(node) {
|
|
@@ -299,7 +299,7 @@
|
|
|
299
299
|
return size;
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
// ../../node_modules
|
|
302
|
+
// ../../node_modules/d3-quadtree/src/visit.js
|
|
303
303
|
function visit_default(callback) {
|
|
304
304
|
var quads = [], q, node = this._root, child, x0, y0, x1, y1;
|
|
305
305
|
if (node)
|
|
@@ -320,7 +320,7 @@
|
|
|
320
320
|
return this;
|
|
321
321
|
}
|
|
322
322
|
|
|
323
|
-
// ../../node_modules
|
|
323
|
+
// ../../node_modules/d3-quadtree/src/visitAfter.js
|
|
324
324
|
function visitAfter_default(callback) {
|
|
325
325
|
var quads = [], next = [], q;
|
|
326
326
|
if (this._root)
|
|
@@ -346,7 +346,7 @@
|
|
|
346
346
|
return this;
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
// ../../node_modules
|
|
349
|
+
// ../../node_modules/d3-quadtree/src/x.js
|
|
350
350
|
function defaultX(d) {
|
|
351
351
|
return d[0];
|
|
352
352
|
}
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
return arguments.length ? (this._x = _, this) : this._x;
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
// ../../node_modules
|
|
357
|
+
// ../../node_modules/d3-quadtree/src/y.js
|
|
358
358
|
function defaultY(d) {
|
|
359
359
|
return d[1];
|
|
360
360
|
}
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
return arguments.length ? (this._y = _, this) : this._y;
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
// ../../node_modules
|
|
365
|
+
// ../../node_modules/d3-quadtree/src/quadtree.js
|
|
366
366
|
function quadtree(nodes, x, y) {
|
|
367
367
|
var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);
|
|
368
368
|
return nodes == null ? tree : tree.addAll(nodes);
|
|
@@ -416,19 +416,19 @@
|
|
|
416
416
|
treeProto.visitAfter = visitAfter_default;
|
|
417
417
|
treeProto.x = x_default;
|
|
418
418
|
treeProto.y = y_default;
|
|
419
|
-
// ../../node_modules
|
|
419
|
+
// ../../node_modules/d3-force/src/constant.js
|
|
420
420
|
function constant_default(x) {
|
|
421
421
|
return function() {
|
|
422
422
|
return x;
|
|
423
423
|
};
|
|
424
424
|
}
|
|
425
425
|
|
|
426
|
-
// ../../node_modules
|
|
426
|
+
// ../../node_modules/d3-force/src/jiggle.js
|
|
427
427
|
function jiggle_default(random) {
|
|
428
428
|
return (random() - 0.5) * 0.000001;
|
|
429
429
|
}
|
|
430
430
|
|
|
431
|
-
// ../../node_modules
|
|
431
|
+
// ../../node_modules/d3-force/src/collide.js
|
|
432
432
|
function x(d) {
|
|
433
433
|
return d.x + d.vx;
|
|
434
434
|
}
|
|
@@ -506,7 +506,7 @@
|
|
|
506
506
|
};
|
|
507
507
|
return force;
|
|
508
508
|
}
|
|
509
|
-
// ../../node_modules
|
|
509
|
+
// ../../node_modules/d3-force/src/link.js
|
|
510
510
|
function index(d) {
|
|
511
511
|
return d.index;
|
|
512
512
|
}
|
|
@@ -594,7 +594,7 @@
|
|
|
594
594
|
};
|
|
595
595
|
return force;
|
|
596
596
|
}
|
|
597
|
-
// ../../node_modules
|
|
597
|
+
// ../../node_modules/d3-dispatch/src/dispatch.js
|
|
598
598
|
var noop = { value: () => {} };
|
|
599
599
|
function dispatch() {
|
|
600
600
|
for (var i = 0, n = arguments.length, _ = {}, t;i < n; ++i) {
|
|
@@ -679,7 +679,7 @@
|
|
|
679
679
|
return type;
|
|
680
680
|
}
|
|
681
681
|
var dispatch_default = dispatch;
|
|
682
|
-
// ../../node_modules
|
|
682
|
+
// ../../node_modules/d3-timer/src/timer.js
|
|
683
683
|
var frame = 0;
|
|
684
684
|
var timeout = 0;
|
|
685
685
|
var interval = 0;
|
|
@@ -791,7 +791,7 @@
|
|
|
791
791
|
frame = 1, setFrame(wake);
|
|
792
792
|
}
|
|
793
793
|
}
|
|
794
|
-
// ../../node_modules
|
|
794
|
+
// ../../node_modules/d3-force/src/lcg.js
|
|
795
795
|
var a = 1664525;
|
|
796
796
|
var c = 1013904223;
|
|
797
797
|
var m = 4294967296;
|
|
@@ -800,7 +800,7 @@
|
|
|
800
800
|
return () => (s = (a * s + c) % m) / m;
|
|
801
801
|
}
|
|
802
802
|
|
|
803
|
-
// ../../node_modules
|
|
803
|
+
// ../../node_modules/d3-force/src/simulation.js
|
|
804
804
|
function x2(d) {
|
|
805
805
|
return d.x;
|
|
806
806
|
}
|
|
@@ -921,7 +921,7 @@
|
|
|
921
921
|
};
|
|
922
922
|
}
|
|
923
923
|
|
|
924
|
-
// ../../node_modules
|
|
924
|
+
// ../../node_modules/d3-force/src/manyBody.js
|
|
925
925
|
function manyBody_default() {
|
|
926
926
|
var nodes, node, random, alpha, strength = constant_default(-30), strengths, distanceMin2 = 1, distanceMax2 = Infinity, theta2 = 0.81;
|
|
927
927
|
function force(_) {
|
|
@@ -1010,7 +1010,7 @@
|
|
|
1010
1010
|
};
|
|
1011
1011
|
return force;
|
|
1012
1012
|
}
|
|
1013
|
-
// ../../node_modules
|
|
1013
|
+
// ../../node_modules/d3-force/src/x.js
|
|
1014
1014
|
function x_default2(x) {
|
|
1015
1015
|
var strength = constant_default(0.1), nodes, strengths, xz;
|
|
1016
1016
|
if (typeof x !== "function")
|
|
@@ -1042,7 +1042,7 @@
|
|
|
1042
1042
|
};
|
|
1043
1043
|
return force;
|
|
1044
1044
|
}
|
|
1045
|
-
// ../../node_modules
|
|
1045
|
+
// ../../node_modules/d3-force/src/y.js
|
|
1046
1046
|
function y_default2(y) {
|
|
1047
1047
|
var strength = constant_default(0.1), nodes, strengths, yz;
|
|
1048
1048
|
if (typeof y !== "function")
|
package/dist/static.d.ts
CHANGED
|
@@ -1,33 +1,22 @@
|
|
|
1
|
-
import { ThemeConfig, DarkMode, ChartSpec, LayerSpec, TileMapSpec, GeoMapSpec } from '@opendata-ai/openchart-core';
|
|
1
|
+
import { ThemeConfig, DarkMode, CompileOptions, ChartSpec, LayerSpec, TileMapSpec, GeoMapSpec, BarListSpec } from '@opendata-ai/openchart-core';
|
|
2
2
|
|
|
3
3
|
interface StaticRenderOptions {
|
|
4
|
-
/** Stable XML-safe prefix
|
|
4
|
+
/** Stable XML-safe prefix, unique for figures sharing one document. Defaults to `ocs-<hash of spec and options>`. */
|
|
5
5
|
idPrefix?: string;
|
|
6
6
|
width?: number;
|
|
7
7
|
height?: number;
|
|
8
8
|
theme?: ThemeConfig;
|
|
9
|
-
/**
|
|
10
|
-
* Dark mode setting. In static rendering `'auto'` resolves to light mode
|
|
11
|
-
* since there is no `matchMedia` to query. Use `'force'` for dark output.
|
|
12
|
-
*/
|
|
9
|
+
/** `auto` resolves to light without a browser. */
|
|
13
10
|
darkMode?: DarkMode;
|
|
14
|
-
/** Rendering backend for point marks; see `MountOptions.renderer`. */
|
|
15
11
|
renderer?: 'auto' | 'svg' | 'canvas';
|
|
16
12
|
watermark?: boolean;
|
|
13
|
+
measureText?: CompileOptions['measureText'];
|
|
14
|
+
/** Geometry decimal places; null preserves raw doubles. Default 3. */
|
|
15
|
+
precision?: number | null;
|
|
17
16
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*
|
|
23
|
-
* Not safe for concurrent invocation: the render pipeline relies on a global
|
|
24
|
-
* SVG ID counter and a temporary global `document` swap, both of which are
|
|
25
|
-
* single-threaded. In a server handling parallel requests, serialize calls
|
|
26
|
-
* through a queue or mutex.
|
|
27
|
-
*
|
|
28
|
-
* The entire render pipeline is synchronous; the global swap is safe as long
|
|
29
|
-
* as no code schedules microtasks that outlive the call.
|
|
30
|
-
*/
|
|
31
|
-
declare function renderStaticSVG(spec: ChartSpec | LayerSpec | TileMapSpec | GeoMapSpec, options?: StaticRenderOptions): string;
|
|
17
|
+
type StaticSpec = ChartSpec | LayerSpec | TileMapSpec | GeoMapSpec | BarListSpec;
|
|
18
|
+
|
|
19
|
+
/** Render standalone SVG using a per-call element tree and id scope. */
|
|
20
|
+
declare function renderStaticSVG(spec: StaticSpec, options?: StaticRenderOptions): string;
|
|
32
21
|
|
|
33
22
|
export { type StaticRenderOptions, renderStaticSVG };
|