@graphty/graphty-element 2.2.5 → 2.3.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/catalog.js +3 -3
- package/dist/chunks/{DataSource-Dag8H5US.js → DataSource-bt0DhBjG.js} +1 -1
- package/dist/chunks/{GraphSession-mfo75G0q.js → GraphSession-iNyKm7Ds.js} +2 -2
- package/dist/chunks/{XRPivotCameraController-BdoMFcON.js → XRPivotCameraController-XtxbbZ-D.js} +1 -1
- package/dist/chunks/{capability-check-CdoqmrF0.js → capability-check-BqIEXcun.js} +1 -1
- package/dist/chunks/{detect-LAOOaxY_.js → detect-DM29BEaB.js} +1 -1
- package/dist/chunks/{format-detection-a0bD5PIB.js → format-detection-BEdmtvsy.js} +1 -1
- package/dist/chunks/{index-BY1gnMiZ.js → index-CD0_RJv-.js} +9 -9
- package/dist/chunks/{paletteRegistry-YSpPryiT.js → paletteRegistry-DnWHQsAD.js} +156 -154
- package/dist/chunks/{scales-DOpwlWuz.js → scales-DyuwlJKI.js} +236 -235
- package/dist/extend.js +3 -3
- package/dist/graphty-catalog.json +1 -1
- package/dist/graphty.bundle.js +9955 -9953
- package/dist/graphty.js +3 -3
- package/dist/session.js +4 -4
- package/dist/src/algorithms/metrics/context.d.ts +7 -5
- package/dist/src/algorithms/results/types.d.ts +17 -1
- package/package.json +1 -1
package/dist/graphty.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as e, a as E, b as r, D as O, E as o, d as S, G as R, e as _, I as t, L, N as C, O as A, R as N, S as n, f as I, g as T, h as g, U as i, i as l } from "./chunks/index-
|
|
2
|
-
import { a as p, S as G, b as f } from "./chunks/paletteRegistry-
|
|
3
|
-
import { D as y, E as D } from "./chunks/DataSource-
|
|
1
|
+
import { A as e, a as E, b as r, D as O, E as o, d as S, G as R, e as _, I as t, L, N as C, O as A, R as N, S as n, f as I, g as T, h as g, U as i, i as l } from "./chunks/index-CD0_RJv-.js";
|
|
2
|
+
import { a as p, S as G, b as f } from "./chunks/paletteRegistry-DnWHQsAD.js";
|
|
3
|
+
import { D as y, E as D } from "./chunks/DataSource-bt0DhBjG.js";
|
|
4
4
|
import { k as P, l as U, g as c, h as m, A as u, C as x, i as B } from "./chunks/Algorithm-RQ629NLb.js";
|
|
5
5
|
import { e as H, E as b, N as Y, a as F, P as W, R as k, S as K, d as v, b as w, c as Q } from "./chunks/NodeStyle-DKj7HjMJ.js";
|
|
6
6
|
import { A as j, a as q, G as z, i as J, b as Z } from "./chunks/GraphtyError-BwcnblTH.js";
|
package/dist/session.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { R, e as _ } from "./chunks/types-B7bX5c0K.js";
|
|
2
2
|
import { A as c, a as C, G as p, i as m, b as g } from "./chunks/GraphtyError-BwcnblTH.js";
|
|
3
3
|
import { g as O, h as U, i as I } from "./chunks/Algorithm-RQ629NLb.js";
|
|
4
|
-
import { D as h } from "./chunks/GraphSession-
|
|
5
|
-
import { a as N, b as y, c as D, d as v, Q as w, R as G, e as b, f as x, S as F, T as M, g as z, i as k, h as H, j as Y, k as j } from "./chunks/GraphSession-
|
|
6
|
-
import { R as Q, t as X, u as B, v as J, w as K, x as V } from "./chunks/paletteRegistry-
|
|
7
|
-
import { L as s } from "./chunks/scales-
|
|
4
|
+
import { D as h } from "./chunks/GraphSession-iNyKm7Ds.js";
|
|
5
|
+
import { a as N, b as y, c as D, d as v, Q as w, R as G, e as b, f as x, S as F, T as M, g as z, i as k, h as H, j as Y, k as j } from "./chunks/GraphSession-iNyKm7Ds.js";
|
|
6
|
+
import { R as Q, t as X, u as B, v as J, w as K, x as V } from "./chunks/paletteRegistry-DnWHQsAD.js";
|
|
7
|
+
import { L as s } from "./chunks/scales-DyuwlJKI.js";
|
|
8
8
|
const u = [
|
|
9
9
|
{
|
|
10
10
|
id: "fixed",
|
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import type { MetricRunContext } from "./types";
|
|
15
15
|
/**
|
|
16
|
-
* How many nodes a measurement visits between
|
|
16
|
+
* How many nodes a measurement visits between progress reports.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* The frame is NOT given back at every chunk: a yield costs the host a whole frame, which on a
|
|
19
|
+
* large scene is far more than a chunk of work, so it is given back only once a frame's worth of
|
|
20
|
+
* work has built up since the last one -- the same budget every declared algorithm's pass uses,
|
|
21
|
+
* for the same reason (see `YIELD_BUDGET_MS`).
|
|
20
22
|
*/
|
|
21
23
|
export declare const METRIC_CHUNK_SIZE = 2048;
|
|
22
24
|
/**
|
|
@@ -31,8 +33,8 @@ export declare const METRIC_CHUNK_SIZE = 2048;
|
|
|
31
33
|
*/
|
|
32
34
|
export declare function detachedRunContext(runId: string): MetricRunContext;
|
|
33
35
|
/**
|
|
34
|
-
* Visit every item, checking the signal, reporting progress and giving the host a
|
|
35
|
-
*
|
|
36
|
+
* Visit every item, checking the signal, reporting progress between chunks and giving the host a
|
|
37
|
+
* turn once a frame's worth of work has built up.
|
|
36
38
|
* @param items - What to visit, in order.
|
|
37
39
|
* @param context - Where progress goes and where cancellation arrives.
|
|
38
40
|
* @param phase - What to call this step in a progress line.
|
|
@@ -100,6 +100,21 @@ export interface AlgorithmRunContext {
|
|
|
100
100
|
*/
|
|
101
101
|
yieldNow(): Promise<void>;
|
|
102
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* How long a per-element pass works before it hands the frame back.
|
|
105
|
+
*
|
|
106
|
+
* THE YIELD IS PRICED IN FRAMES, NOT IN ELEMENTS. Handing the frame back is a `setTimeout(0)`,
|
|
107
|
+
* and by the time the timer fires the host has drawn a frame -- which is the whole point of
|
|
108
|
+
* yielding, and also what it costs: on a scene of a thousand nodes and ten thousand edges a frame
|
|
109
|
+
* is about a hundred milliseconds on a discrete GPU and half a second on a software renderer.
|
|
110
|
+
* Yielding every 1,024 elements, as this used to, charged that frame for a chunk of work that
|
|
111
|
+
* took a few microseconds: a shortest-path run over 10,000 edges spent 0.5 ms searching and
|
|
112
|
+
* nine frames yielding, and came back after a second (issue #389). The frame is given back only
|
|
113
|
+
* once this much work has accumulated since the last one, so a pass that finishes inside a
|
|
114
|
+
* frame's budget never yields at all and a pass that takes seconds still yields several times a
|
|
115
|
+
* second.
|
|
116
|
+
*/
|
|
117
|
+
export declare const YIELD_BUDGET_MS = 16;
|
|
103
118
|
/**
|
|
104
119
|
* A context for work nobody is watching.
|
|
105
120
|
*
|
|
@@ -118,7 +133,8 @@ export interface AlgorithmRunContext {
|
|
|
118
133
|
*/
|
|
119
134
|
export declare function detachedRunContext(): AlgorithmRunContext;
|
|
120
135
|
/**
|
|
121
|
-
* Walk a list in chunks, reporting progress and yielding
|
|
136
|
+
* Walk a list in chunks, reporting progress between them and yielding once a frame's worth of
|
|
137
|
+
* work has built up (see `YIELD_BUDGET_MS`, a module constant; TypeDoc cannot link an unexported name).
|
|
122
138
|
*
|
|
123
139
|
* Every per-element pass in every algorithm goes through this, so "report progress and yield"
|
|
124
140
|
* is one decision made once rather than a loop each author writes their own way.
|
package/package.json
CHANGED