diff options
author | 2023-09-14 19:29:36 +0200 | |
---|---|---|
committer | 2023-09-14 19:29:36 +0200 | |
commit | 98ed3b6db5f4e51961a161050cc31c66015116e8 (patch) | |
tree | 8bfd6d9bc8d6ed23b9eb0f889dd40b6c24fe8f92 /.yarn/patches | |
parent | Merge pull request #38 from nagilooh/design-space-exploration (diff) | |
parent | Merge remote-tracking branch 'upstream/main' into partial-interpretation (diff) | |
download | refinery-98ed3b6db5f4e51961a161050cc31c66015116e8.tar.gz refinery-98ed3b6db5f4e51961a161050cc31c66015116e8.tar.zst refinery-98ed3b6db5f4e51961a161050cc31c66015116e8.zip |
Merge pull request #39 from kris7t/partial-interpretation
Implement partial interpretation based model generation
Diffstat (limited to '.yarn/patches')
4 files changed, 254 insertions, 0 deletions
diff --git a/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch b/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch new file mode 100644 index 00000000..0a4110c5 --- /dev/null +++ b/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch | |||
@@ -0,0 +1,95 @@ | |||
1 | diff --git a/src/dot.js b/src/dot.js | ||
2 | index 96ae02b6edd947ac9086f3108986c08d91470cba..c4422b08d73f7fe73dc52ad905cf981d1f3cbcc5 100644 | ||
3 | --- a/src/dot.js | ||
4 | +++ b/src/dot.js | ||
5 | @@ -1,4 +1,3 @@ | ||
6 | -import { Graphviz } from "@hpcc-js/wasm/graphviz"; | ||
7 | import * as d3 from "d3-selection"; | ||
8 | import {extractAllElementsData, extractElementData, createElementWithAttributes} from "./element.js"; | ||
9 | import {convertToPathData} from "./svg.js"; | ||
10 | @@ -8,31 +7,6 @@ import {getEdgeTitle} from "./data.js"; | ||
11 | |||
12 | |||
13 | export function initViz() { | ||
14 | - | ||
15 | - // force JIT compilation of @hpcc-js/wasm | ||
16 | - try { | ||
17 | - Graphviz.load().then(graphviz => { | ||
18 | - graphviz.layout("", "svg", "dot"); | ||
19 | - this.layoutSync = graphviz.layout.bind(graphviz); | ||
20 | - if (this._worker == null) { | ||
21 | - this._dispatch.call("initEnd", this); | ||
22 | - } | ||
23 | - if (this._afterInit) { | ||
24 | - this._afterInit(); | ||
25 | - } | ||
26 | - }); | ||
27 | -// after the port to ESM modules, we don't know how to trigger this so | ||
28 | -// we just disable it from coverage | ||
29 | -/* c8 ignore start */ | ||
30 | - } catch(error) { | ||
31 | - // we end up here when the the script tag type used to load | ||
32 | - // the "@hpcc-js/wasm" script is not "application/javascript" | ||
33 | - // or "text/javascript", but typically "javascript/worker". In | ||
34 | - // this case the browser does not load the script since it's | ||
35 | - // unnecessary because it's loaded by the web worker | ||
36 | - // instead. This is expected so we just ignore the error. | ||
37 | - } | ||
38 | -/* c8 ignore stop */ | ||
39 | if (this._worker != null) { | ||
40 | var vizURL = this._vizURL; | ||
41 | var graphvizInstance = this; | ||
42 | @@ -337,7 +311,8 @@ function layoutDone(svgDoc, callback) { | ||
43 | |||
44 | var newSvg = newDoc | ||
45 | .select('svg'); | ||
46 | - | ||
47 | + | ||
48 | + this._dispatch.call('postProcessSVG', this, newSvg); | ||
49 | var data = extractAllElementsData(newSvg); | ||
50 | this._dispatch.call('dataExtractEnd', this); | ||
51 | postProcessDataPass1Local(data); | ||
52 | diff --git a/src/element.js b/src/element.js | ||
53 | index 5aa398a6cf2550e15f642aea4eaa5a1c69af69ad..5d799e38566e8f847aa1ba80f4c575911e9851cf 100644 | ||
54 | --- a/src/element.js | ||
55 | +++ b/src/element.js | ||
56 | @@ -108,6 +108,8 @@ export function createElement(data) { | ||
57 | return document.createTextNode(""); | ||
58 | } else if (data.tag == '#comment') { | ||
59 | return document.createComment(data.comment); | ||
60 | + } else if (data.tag == 'div' || data.tag == 'DIV') { | ||
61 | + return document.createElement('div'); | ||
62 | } else { | ||
63 | return document.createElementNS('http://www.w3.org/2000/svg', data.tag); | ||
64 | } | ||
65 | diff --git a/src/graphviz.js b/src/graphviz.js | ||
66 | index c4638cb0e4042844c59c52dfe4749e13999fef6e..28dcfb71ad787c78645c460a29e9c52295c5f6bf 100644 | ||
67 | --- a/src/graphviz.js | ||
68 | +++ b/src/graphviz.js | ||
69 | @@ -49,7 +49,6 @@ import {drawnNodeSelection} from "./drawNode.js"; | ||
70 | import {workerCode} from "./workerCode.js"; | ||
71 | import {sharedWorkerCode} from "./workerCode.js"; | ||
72 | import {workerCodeBody} from "./workerCode.js"; | ||
73 | -import {Graphviz as hpccWasmGraphviz} from "@hpcc-js/wasm/graphviz"; | ||
74 | |||
75 | export function Graphviz(selection, options) { | ||
76 | this._options = { | ||
77 | @@ -119,10 +118,6 @@ export function Graphviz(selection, options) { | ||
78 | this._workerPort = this._worker; | ||
79 | this._workerPortClose = this._worker.terminate.bind(this._worker); | ||
80 | this._workerCallbacks = []; | ||
81 | - } else { | ||
82 | - hpccWasmGraphviz.load().then(((graphviz) => { | ||
83 | - this._graphvizVersion = graphviz.version(); | ||
84 | - }).bind(this)); | ||
85 | } | ||
86 | this._selection = selection; | ||
87 | this._active = false; | ||
88 | @@ -143,6 +138,7 @@ export function Graphviz(selection, options) { | ||
89 | 'start', | ||
90 | 'layoutStart', | ||
91 | 'layoutEnd', | ||
92 | + 'postProcessSVG', | ||
93 | 'dataExtractEnd', | ||
94 | 'dataProcessPass1End', | ||
95 | 'dataProcessPass2End', | ||
diff --git a/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch.license b/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch.license new file mode 100644 index 00000000..0c7bddfb --- /dev/null +++ b/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch.license | |||
@@ -0,0 +1,14 @@ | |||
1 | Copyright 2017, Magnus Jacobsson | ||
2 | Copyright 2023, The Refinery Authors <https://refinery.tools/> | ||
3 | |||
4 | SPDX-License-Identifier: BSD-3-Clause | ||
5 | |||
6 | This file Incorporates patches from the Refinery authors. | ||
7 | |||
8 | However, but redistribution and use is only permitted if neither | ||
9 | the name of the copyright holder Magnus Jacobsson nor the names of other | ||
10 | contributors to the d3-graphviz project are used to endorse or promote | ||
11 | products derived from this software as per the 3rd clause of the | ||
12 | 3-clause BSD license. | ||
13 | |||
14 | See LICENSES/BSD-3-Clause.txt for more details. | ||
diff --git a/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch b/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch new file mode 100644 index 00000000..88d32c72 --- /dev/null +++ b/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch | |||
@@ -0,0 +1,134 @@ | |||
1 | diff --git a/src/zoom.js b/src/zoom.js | ||
2 | index d56438823b2882856f156b0915ccbac038d6923e..50936066a3597c46ad65f690e9c8417e9d3375f8 100644 | ||
3 | --- a/src/zoom.js | ||
4 | +++ b/src/zoom.js | ||
5 | @@ -14,6 +14,10 @@ function defaultFilter(event) { | ||
6 | return (!event.ctrlKey || event.type === 'wheel') && !event.button; | ||
7 | } | ||
8 | |||
9 | +function defaultCenter(event) { | ||
10 | + return pointer(event, this); | ||
11 | +} | ||
12 | + | ||
13 | function defaultExtent() { | ||
14 | var e = this; | ||
15 | if (e instanceof SVGElement) { | ||
16 | @@ -27,6 +31,10 @@ function defaultExtent() { | ||
17 | return [[0, 0], [e.clientWidth, e.clientHeight]]; | ||
18 | } | ||
19 | |||
20 | +function defaultCentroid(extent) { | ||
21 | + return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2]; | ||
22 | +} | ||
23 | + | ||
24 | function defaultTransform() { | ||
25 | return this.__zoom || identity; | ||
26 | } | ||
27 | @@ -52,7 +60,9 @@ function defaultConstrain(transform, extent, translateExtent) { | ||
28 | |||
29 | export default function() { | ||
30 | var filter = defaultFilter, | ||
31 | + center = defaultCenter, | ||
32 | extent = defaultExtent, | ||
33 | + centroid = defaultCentroid, | ||
34 | constrain = defaultConstrain, | ||
35 | wheelDelta = defaultWheelDelta, | ||
36 | touchable = defaultTouchable, | ||
37 | @@ -148,9 +158,6 @@ export default function() { | ||
38 | return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y); | ||
39 | } | ||
40 | |||
41 | - function centroid(extent) { | ||
42 | - return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2]; | ||
43 | - } | ||
44 | |||
45 | function schedule(transition, transform, point, event) { | ||
46 | transition | ||
47 | @@ -243,6 +250,7 @@ export default function() { | ||
48 | if (g.wheel) { | ||
49 | if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) { | ||
50 | g.mouse[1] = t.invert(g.mouse[0] = p); | ||
51 | + g.mouse[2] = center.apply(this, arguments); | ||
52 | } | ||
53 | clearTimeout(g.wheel); | ||
54 | } | ||
55 | @@ -252,14 +260,14 @@ export default function() { | ||
56 | |||
57 | // Otherwise, capture the mouse point and location at the start. | ||
58 | else { | ||
59 | - g.mouse = [p, t.invert(p)]; | ||
60 | + g.mouse = [p, t.invert(p), center.apply(this, arguments)]; | ||
61 | interrupt(this); | ||
62 | g.start(); | ||
63 | } | ||
64 | |||
65 | noevent(event); | ||
66 | g.wheel = setTimeout(wheelidled, wheelDelay); | ||
67 | - g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent)); | ||
68 | + g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[2], t.invert(g.mouse[2])), g.extent, translateExtent)); | ||
69 | |||
70 | function wheelidled() { | ||
71 | g.wheel = null; | ||
72 | @@ -278,7 +286,7 @@ export default function() { | ||
73 | |||
74 | dragDisable(event.view); | ||
75 | nopropagation(event); | ||
76 | - g.mouse = [p, this.__zoom.invert(p)]; | ||
77 | + g.prev = p; | ||
78 | interrupt(this); | ||
79 | g.start(); | ||
80 | |||
81 | @@ -288,8 +296,10 @@ export default function() { | ||
82 | var dx = event.clientX - x0, dy = event.clientY - y0; | ||
83 | g.moved = dx * dx + dy * dy > clickDistance2; | ||
84 | } | ||
85 | + var p = pointer(event, currentTarget); | ||
86 | g.event(event) | ||
87 | - .zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent)); | ||
88 | + .zoom("mouse", constrain(translate(g.that.__zoom, p, g.that.__zoom.invert(g.prev)), g.extent, translateExtent)); | ||
89 | + g.prev = p; | ||
90 | } | ||
91 | |||
92 | function mouseupped(event) { | ||
93 | @@ -303,7 +313,7 @@ export default function() { | ||
94 | function dblclicked(event, ...args) { | ||
95 | if (!filter.apply(this, arguments)) return; | ||
96 | var t0 = this.__zoom, | ||
97 | - p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this), | ||
98 | + p0 = center.call(this, event.changedTouches ? event.changedTouches[0] : event), | ||
99 | p1 = t0.invert(p0), | ||
100 | k1 = t0.k * (event.shiftKey ? 0.5 : 2), | ||
101 | t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent); | ||
102 | @@ -322,7 +332,7 @@ export default function() { | ||
103 | |||
104 | nopropagation(event); | ||
105 | for (i = 0; i < n; ++i) { | ||
106 | - t = touches[i], p = pointer(t, this); | ||
107 | + t = touches[i], p = center.call(this, t); | ||
108 | p = [p, this.__zoom.invert(p), t.identifier]; | ||
109 | if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting; | ||
110 | else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0; | ||
111 | @@ -345,7 +355,7 @@ export default function() { | ||
112 | |||
113 | noevent(event); | ||
114 | for (i = 0; i < n; ++i) { | ||
115 | - t = touches[i], p = pointer(t, this); | ||
116 | + t = touches[i], p = center.call(this, t); | ||
117 | if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p; | ||
118 | else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p; | ||
119 | } | ||
120 | @@ -406,6 +416,14 @@ export default function() { | ||
121 | return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(!!_), zoom) : touchable; | ||
122 | }; | ||
123 | |||
124 | + zoom.center = function(_) { | ||
125 | + return arguments.length ? (center = typeof _ === "function" ? _ : constant([+_[0], +_[1]]), zoom) : center; | ||
126 | + }; | ||
127 | + | ||
128 | + zoom.centroid = function(_) { | ||
129 | + return arguments.length ? (centroid = typeof _ === "function" ? _ : constant([+_[0], +_[1]]), zoom) : centroid; | ||
130 | + }; | ||
131 | + | ||
132 | zoom.extent = function(_) { | ||
133 | return arguments.length ? (extent = typeof _ === "function" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent; | ||
134 | }; | ||
diff --git a/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch.license b/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch.license new file mode 100644 index 00000000..d95053c1 --- /dev/null +++ b/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch.license | |||
@@ -0,0 +1,11 @@ | |||
1 | Copyright 2010-2021 Mike Bostock | ||
2 | Copyright 2020-2023 Philippe Rivière | ||
3 | Copyright 2023 The Refinery Authors <https://refinery.tools/> | ||
4 | |||
5 | SPDX-License-Identifier: ISC OR EPL-2.0 | ||
6 | |||
7 | This file ncorporates patches from | ||
8 | https://github.com/d3/d3-zoom/tree/3afbe2ae2dfb3129231c5567db56dafb2d6a56a6 | ||
9 | by Philippe Rivière. | ||
10 | |||
11 | Morevoer, it includes other modifications by the Refinery authors. | ||