@explorable-viz/fluid 0.8.2 → 0.8.3
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 +4 -3
- package/dist/fluid/shared/load-figure.js +185 -87
- package/dist/fluid/shared/webtest-lib.js +1 -4
- package/package.json +2 -3
- package/website/article/fluid/1805.02474v1-10.fld +0 -33
- package/website/article/fluid/scigen.fld +0 -50
- package/website/article/transparent-text/index.html +0 -44
- package/website/article/transparent-text/spec.json +0 -8
package/README.md
CHANGED
@@ -62,11 +62,12 @@ After building, tests can be run from the command line via `yarn test-all`
|
|
62
62
|
a browser window.
|
63
63
|
- To observe the status of tests, click `Debug` in the browser window, and then open the JavaScript Console for your browser (e.g., via the Developer Tools).
|
64
64
|
|
65
|
-
### Run Puppeteer tests for
|
65
|
+
### Run Puppeteer tests for website X
|
66
66
|
|
67
|
-
Rebuild with `puppeteerTests.headless` set to `false` to run in browser. Then:
|
68
67
|
- `yarn bundle-website X`
|
69
|
-
-
|
68
|
+
- `yarn test-website X`
|
69
|
+
|
70
|
+
Rebuild with `puppeteerTests.headless` set to `false` to run in browser.
|
70
71
|
|
71
72
|
## Development via VS Code
|
72
73
|
|
@@ -233,6 +233,14 @@ var intercalate = function(separator) {
|
|
233
233
|
var showString = { show: showStringImpl };
|
234
234
|
var showNumber = { show: showNumberImpl };
|
235
235
|
var showInt = { show: showIntImpl };
|
236
|
+
var showBoolean = {
|
237
|
+
show: (v) => {
|
238
|
+
if (v) {
|
239
|
+
return "true";
|
240
|
+
}
|
241
|
+
return "false";
|
242
|
+
}
|
243
|
+
};
|
236
244
|
|
237
245
|
// output-es/Affjax.RequestHeader/index.js
|
238
246
|
var $RequestHeader = (tag, _1, _2) => ({ tag, _1, _2 });
|
@@ -4108,9 +4116,9 @@ function creator_default(name3) {
|
|
4108
4116
|
// node_modules/d3-selection/src/selector.js
|
4109
4117
|
function none() {
|
4110
4118
|
}
|
4111
|
-
function selector_default(
|
4112
|
-
return
|
4113
|
-
return this.querySelector(
|
4119
|
+
function selector_default(selector2) {
|
4120
|
+
return selector2 == null ? none : function() {
|
4121
|
+
return this.querySelector(selector2);
|
4114
4122
|
};
|
4115
4123
|
}
|
4116
4124
|
|
@@ -4139,9 +4147,9 @@ function array(x2) {
|
|
4139
4147
|
function empty2() {
|
4140
4148
|
return [];
|
4141
4149
|
}
|
4142
|
-
function selectorAll_default(
|
4143
|
-
return
|
4144
|
-
return this.querySelectorAll(
|
4150
|
+
function selectorAll_default(selector2) {
|
4151
|
+
return selector2 == null ? empty2 : function() {
|
4152
|
+
return this.querySelectorAll(selector2);
|
4145
4153
|
};
|
4146
4154
|
}
|
4147
4155
|
|
@@ -4168,14 +4176,14 @@ function selectAll_default(select2) {
|
|
4168
4176
|
}
|
4169
4177
|
|
4170
4178
|
// node_modules/d3-selection/src/matcher.js
|
4171
|
-
function matcher_default(
|
4179
|
+
function matcher_default(selector2) {
|
4172
4180
|
return function() {
|
4173
|
-
return this.matches(
|
4181
|
+
return this.matches(selector2);
|
4174
4182
|
};
|
4175
4183
|
}
|
4176
|
-
function childMatcher(
|
4184
|
+
function childMatcher(selector2) {
|
4177
4185
|
return function(node) {
|
4178
|
-
return node.matches(
|
4186
|
+
return node.matches(selector2);
|
4179
4187
|
};
|
4180
4188
|
}
|
4181
4189
|
|
@@ -4245,11 +4253,11 @@ EnterNode.prototype = {
|
|
4245
4253
|
insertBefore: function(child, next) {
|
4246
4254
|
return this._parent.insertBefore(child, next);
|
4247
4255
|
},
|
4248
|
-
querySelector: function(
|
4249
|
-
return this._parent.querySelector(
|
4256
|
+
querySelector: function(selector2) {
|
4257
|
+
return this._parent.querySelector(selector2);
|
4250
4258
|
},
|
4251
|
-
querySelectorAll: function(
|
4252
|
-
return this._parent.querySelectorAll(
|
4259
|
+
querySelectorAll: function(selector2) {
|
4260
|
+
return this._parent.querySelectorAll(selector2);
|
4253
4261
|
}
|
4254
4262
|
};
|
4255
4263
|
|
@@ -4900,8 +4908,8 @@ Selection.prototype = selection.prototype = {
|
|
4900
4908
|
var selection_default = selection;
|
4901
4909
|
|
4902
4910
|
// node_modules/d3-selection/src/select.js
|
4903
|
-
function select_default2(
|
4904
|
-
return typeof
|
4911
|
+
function select_default2(selector2) {
|
4912
|
+
return typeof selector2 === "string" ? new Selection([[document.querySelector(selector2)]], [document.documentElement]) : new Selection([[selector2]], root);
|
4905
4913
|
}
|
4906
4914
|
|
4907
4915
|
// node_modules/d3-color/src/define.js
|
@@ -9999,8 +10007,8 @@ var StyleModule = class {
|
|
9999
10007
|
constructor(spec, options) {
|
10000
10008
|
this.rules = [];
|
10001
10009
|
let { finish } = options || {};
|
10002
|
-
function splitSelector(
|
10003
|
-
return /^@/.test(
|
10010
|
+
function splitSelector(selector2) {
|
10011
|
+
return /^@/.test(selector2) ? [selector2] : selector2.split(/,\s*/);
|
10004
10012
|
}
|
10005
10013
|
function render(selectors, spec2, target, isKeyframes) {
|
10006
10014
|
let local = [], isAt = /^@(\w+)\b/.exec(selectors[0]), keyframes = isAt && isAt[1] == "keyframes";
|
@@ -22467,6 +22475,11 @@ var boolConj = function(b1) {
|
|
22467
22475
|
return b1 && b2;
|
22468
22476
|
};
|
22469
22477
|
};
|
22478
|
+
var boolDisj = function(b1) {
|
22479
|
+
return function(b2) {
|
22480
|
+
return b1 || b2;
|
22481
|
+
};
|
22482
|
+
};
|
22470
22483
|
var boolNot = function(b) {
|
22471
22484
|
return !b;
|
22472
22485
|
};
|
@@ -22514,6 +22527,7 @@ var identity21 = (x2) => x2;
|
|
22514
22527
|
var meetSemilatticeUnit = { meet: (v) => identity21 };
|
22515
22528
|
var meetSemilatticeBoolean = { meet: boolConj };
|
22516
22529
|
var joinSemilatticeUnit = { join: (v) => identity21 };
|
22530
|
+
var joinSemilatticeBoolean = { join: boolDisj };
|
22517
22531
|
var boundedMeetSemilatticeUni = { top: void 0, MeetSemilattice0: () => meetSemilatticeUnit };
|
22518
22532
|
var boundedMeetSemilatticeBoo = { top: true, MeetSemilattice0: () => meetSemilatticeBoolean };
|
22519
22533
|
var boundedJoinSemilatticeUni = { bot: void 0, JoinSemilattice0: () => joinSemilatticeUnit };
|
@@ -34681,6 +34695,7 @@ var removeDocWS = (v) => ({
|
|
34681
34695
|
height: v.height,
|
34682
34696
|
lines: arrayMap((x2) => foldlArray((curr) => (v$1) => replaceAll(v$1._1)(v$1._2)(curr))(drop(length2(take3(1)(x2)))(x2))(pattRepPairs))(v.lines)
|
34683
34697
|
});
|
34698
|
+
var prettyP = (dictPretty) => (x2) => intercalate4("\n")(removeDocWS(dictPretty.pretty(x2)).lines);
|
34684
34699
|
var nil2 = /* @__PURE__ */ checkOneLine(/* @__PURE__ */ split("\n")(" []"));
|
34685
34700
|
var intersperse$p = (v) => (v1) => {
|
34686
34701
|
if (v.tag === "Cons") {
|
@@ -35390,6 +35405,17 @@ var highlightableVertex = {
|
|
35390
35405
|
highlightIf: (v) => (doc2) => beside(beside(doc2)(checkOneLine(split("\n")(" _"))))(checkOneLine(split("\n")(" \u27E8" + v + "\u27E9")))
|
35391
35406
|
};
|
35392
35407
|
var highlightableUnit = { highlightIf: (v) => identity28 };
|
35408
|
+
var highlightableBoolean = {
|
35409
|
+
highlightIf: (v) => {
|
35410
|
+
if (!v) {
|
35411
|
+
return identity28;
|
35412
|
+
}
|
35413
|
+
if (v) {
|
35414
|
+
return (doc2) => beside(beside(checkOneLine(split("\n")(" \u2E28")))(doc2))(checkOneLine(split("\n")(" \u2E29")));
|
35415
|
+
}
|
35416
|
+
fail();
|
35417
|
+
}
|
35418
|
+
};
|
35393
35419
|
var functorMatrixDim = { map: (f) => (m) => $Tuple(m._1, f(m._2)) };
|
35394
35420
|
var functorVal = { map: (f) => (m) => $Val(f(m._1), functorDocOpt(functorVal).map(f)(m._2), functorBaseVal.map(f)(m._3)) };
|
35395
35421
|
var functorMatrixRep = {
|
@@ -36469,6 +36495,22 @@ function type_(e) {
|
|
36469
36495
|
var $SelState = (tag, _1) => ({ tag, _1 });
|
36470
36496
|
var $SelectionType = (tag) => tag;
|
36471
36497
|
var $\u{1D54A} = (tag) => tag;
|
36498
|
+
var genericShowSum6 = /* @__PURE__ */ (() => {
|
36499
|
+
const $0 = genericShowConstructor(genericShowArgsNoArguments)({ reflectSymbol: () => "Inert" });
|
36500
|
+
return (dictGenericShow1) => ({
|
36501
|
+
"genericShow'": (v) => {
|
36502
|
+
if (v.tag === "Inl") {
|
36503
|
+
return $0["genericShow'"](v._1);
|
36504
|
+
}
|
36505
|
+
if (v.tag === "Inr") {
|
36506
|
+
return dictGenericShow1["genericShow'"](v._1);
|
36507
|
+
}
|
36508
|
+
fail();
|
36509
|
+
}
|
36510
|
+
});
|
36511
|
+
})();
|
36512
|
+
var ReactiveIsSymbol = { reflectSymbol: () => "Reactive" };
|
36513
|
+
var SelStatesIsSymbol = { reflectSymbol: () => "SelStates" };
|
36472
36514
|
var sequence = /* @__PURE__ */ (() => traversableArray.traverse(applicativeAff)(identity5))();
|
36473
36515
|
var sequence_ = /* @__PURE__ */ traverse_(applicativeEffect)(foldableArray)(identity4);
|
36474
36516
|
var clamp = (low) => (hi) => (x2) => {
|
@@ -36521,6 +36563,49 @@ var meetSemilatticeSelStates = (dictMeetSemilattice) => ({
|
|
36521
36563
|
fail();
|
36522
36564
|
}
|
36523
36565
|
});
|
36566
|
+
var highlightableSelStates = (dictHighlightable) => (dictJoinSemilattice) => ({
|
36567
|
+
highlightIf: (v) => {
|
36568
|
+
if (v.tag === "Inert") {
|
36569
|
+
return highlightableBoolean.highlightIf(false);
|
36570
|
+
}
|
36571
|
+
if (v.tag === "Reactive") {
|
36572
|
+
return dictHighlightable.highlightIf(dictJoinSemilattice.join(v._1.persistent)(v._1.transient));
|
36573
|
+
}
|
36574
|
+
fail();
|
36575
|
+
}
|
36576
|
+
});
|
36577
|
+
var prettyP2 = /* @__PURE__ */ prettyP(/* @__PURE__ */ prettyVal(/* @__PURE__ */ highlightableSelStates(highlightableBoolean)(joinSemilatticeBoolean)));
|
36578
|
+
var genericShow1 = (dictGenericShow) => (x2) => dictGenericShow["genericShow'"]((() => {
|
36579
|
+
if (x2.tag === "Inert") {
|
36580
|
+
return $Sum("Inl", NoArguments);
|
36581
|
+
}
|
36582
|
+
if (x2.tag === "Reactive") {
|
36583
|
+
return $Sum("Inr", x2._1);
|
36584
|
+
}
|
36585
|
+
fail();
|
36586
|
+
})());
|
36587
|
+
var showSelState = (dictShow) => ({ show: genericShow1(genericShowSum6(genericShowConstructor({ genericShowArgs: (v) => [dictShow.show(v)] })(ReactiveIsSymbol))) });
|
36588
|
+
var showSelStates = (dictShow) => ({
|
36589
|
+
show: (() => {
|
36590
|
+
const $0 = genericShowConstructor((() => {
|
36591
|
+
const $02 = showSelState({
|
36592
|
+
show: (record) => {
|
36593
|
+
const v = cons(intercalate(": ")(["persistent", dictShow.show(record.persistent)]))(cons(intercalate(": ")([
|
36594
|
+
"transient",
|
36595
|
+
dictShow.show(record.transient)
|
36596
|
+
]))([]));
|
36597
|
+
if (v.length === 0) {
|
36598
|
+
return "{}";
|
36599
|
+
}
|
36600
|
+
return intercalate(" ")(["{", intercalate(", ")(v), "}"]);
|
36601
|
+
}
|
36602
|
+
});
|
36603
|
+
return { genericShowArgs: (v) => [$02.show(v)] };
|
36604
|
+
})())(SelStatesIsSymbol);
|
36605
|
+
return (x2) => $0["genericShow'"](x2);
|
36606
|
+
})()
|
36607
|
+
});
|
36608
|
+
var show1 = /* @__PURE__ */ (() => showSelStates(showBoolean).show)();
|
36524
36609
|
var functorSelState = {
|
36525
36610
|
map: (f) => (m) => {
|
36526
36611
|
if (m.tag === "Inert") {
|
@@ -36591,25 +36676,25 @@ var to\u{1D539} = (v) => {
|
|
36591
36676
|
}
|
36592
36677
|
fail();
|
36593
36678
|
};
|
36594
|
-
var selector
|
36595
|
-
functorVal.map((
|
36596
|
-
if (
|
36679
|
+
var selector = (v) => (v1) => $Tuple(
|
36680
|
+
functorVal.map((x2) => spyWhen(true)("to ")(show1)((() => {
|
36681
|
+
if (x2.tag === "Inert") {
|
36597
36682
|
return Inert;
|
36598
36683
|
}
|
36599
|
-
if (
|
36684
|
+
if (x2.tag === "Reactive") {
|
36600
36685
|
if (v === "mousedown") {
|
36601
|
-
return $SelState("Reactive", { persistent: !
|
36686
|
+
return $SelState("Reactive", { persistent: !x2._1.persistent, transient: x2._1.transient });
|
36602
36687
|
}
|
36603
36688
|
if (v === "mouseenter") {
|
36604
|
-
return $SelState("Reactive", { transient: true, persistent:
|
36689
|
+
return $SelState("Reactive", { transient: true, persistent: x2._1.persistent });
|
36605
36690
|
}
|
36606
36691
|
if (v === "mouseleave") {
|
36607
|
-
return $SelState("Reactive", { transient: false, persistent:
|
36692
|
+
return $SelState("Reactive", { transient: false, persistent: x2._1.persistent });
|
36608
36693
|
}
|
36609
36694
|
return throwException(error("Unsupported event type"))();
|
36610
36695
|
}
|
36611
36696
|
fail();
|
36612
|
-
})(v1),
|
36697
|
+
})()))(spyWhen(true)("Setting selStates of ")(prettyP2)(v1)),
|
36613
36698
|
(() => {
|
36614
36699
|
if (v === "mousedown") {
|
36615
36700
|
return Persistent;
|
@@ -36693,7 +36778,7 @@ var getSel = (selType) => (s) => {
|
|
36693
36778
|
fail();
|
36694
36779
|
};
|
36695
36780
|
var eventData = (x2) => definitely("absurd")(nullable(_target(x2), Nothing, Just)).__data__;
|
36696
|
-
var selectionEventData$p = /* @__PURE__ */ fanout(categoryFn)(strongFn)(eventData)((x2) => selector
|
36781
|
+
var selectionEventData$p = /* @__PURE__ */ fanout(categoryFn)(strongFn)(eventData)((x2) => selector(type_(x2)));
|
36697
36782
|
var dict = (toDict) => (v) => toDict(v._3.tag === "Dictionary" ? v._3._1 : typeError(v._3)("Dictionary"));
|
36698
36783
|
var css = {
|
36699
36784
|
sel: {
|
@@ -37025,6 +37110,11 @@ function computed(element, prop) {
|
|
37025
37110
|
function canvasFont(el) {
|
37026
37111
|
return `${computed(el, "font-weight")} ${computed(el, "font-size")} ${computed(el, "font-family")}`;
|
37027
37112
|
}
|
37113
|
+
function assertNonEmpty(sel) {
|
37114
|
+
if (sel.empty()) {
|
37115
|
+
throw new Error("Assertion failed: D3 selection is empty");
|
37116
|
+
}
|
37117
|
+
}
|
37028
37118
|
function textDimensions(class_) {
|
37029
37119
|
return (text2) => {
|
37030
37120
|
const element = document.createElement("text");
|
@@ -37110,23 +37200,24 @@ function isEmpty3(sel) {
|
|
37110
37200
|
return sel.empty();
|
37111
37201
|
};
|
37112
37202
|
}
|
37113
|
-
function rootSelect(
|
37203
|
+
function rootSelect(selector2) {
|
37114
37204
|
return () => {
|
37115
|
-
return select_default2(
|
37205
|
+
return select_default2(selector2);
|
37116
37206
|
};
|
37117
37207
|
}
|
37118
|
-
function select(
|
37208
|
+
function select(selector2) {
|
37119
37209
|
return (sel) => {
|
37210
|
+
assertNonEmpty(sel);
|
37120
37211
|
return () => {
|
37121
|
-
return sel.select(
|
37212
|
+
return sel.select(selector2);
|
37122
37213
|
};
|
37123
37214
|
};
|
37124
37215
|
}
|
37125
|
-
function selectAll2(
|
37216
|
+
function selectAll2(selector2) {
|
37126
37217
|
return (sel) => {
|
37127
37218
|
return () => {
|
37128
37219
|
const sels = [];
|
37129
|
-
sel.selectAll(
|
37220
|
+
sel.selectAll(selector2).each(function() {
|
37130
37221
|
sels.push(select_default2(this));
|
37131
37222
|
});
|
37132
37223
|
return sels;
|
@@ -37197,6 +37288,7 @@ function setDatum(d) {
|
|
37197
37288
|
function on(eventType) {
|
37198
37289
|
return (listener) => {
|
37199
37290
|
return (sel) => {
|
37291
|
+
assertNonEmpty(sel);
|
37200
37292
|
return () => {
|
37201
37293
|
return sel.on(eventType, (e) => {
|
37202
37294
|
if (e.button == 0) {
|
@@ -38232,25 +38324,32 @@ var viewBarChartUnit = {
|
|
38232
38324
|
// output-es/App.View.Paragraph/index.js
|
38233
38325
|
var $Paragraph = (_1, _2) => ({ tag: "Paragraph", _1, _2 });
|
38234
38326
|
var sequence_2 = /* @__PURE__ */ traverse_(applicativeEffect)(foldableArray)(identity4);
|
38235
|
-
var
|
38236
|
-
|
38237
|
-
|
38238
|
-
const $1 =
|
38239
|
-
|
38240
|
-
|
38241
|
-
|
38242
|
-
|
38243
|
-
|
38244
|
-
|
38245
|
-
|
38246
|
-
|
38247
|
-
|
38248
|
-
const
|
38249
|
-
sequence_2(
|
38250
|
-
|
38251
|
-
|
38327
|
+
var viewParagraphUnit = {
|
38328
|
+
createElement: (v) => (v1) => (parent) => {
|
38329
|
+
const $0 = v1._2;
|
38330
|
+
const $1 = createChild(parent)(showElementType.show(Div))(fromFoldable9([
|
38331
|
+
$Tuple("class", "para-text")
|
38332
|
+
]));
|
38333
|
+
return () => {
|
38334
|
+
const rootElement = $1();
|
38335
|
+
sequence_2(arrayMap((view2) => view2((dictView) => (v2) => dictView.createElement()(v2)(rootElement)))($0))();
|
38336
|
+
return rootElement;
|
38337
|
+
};
|
38338
|
+
},
|
38339
|
+
setSelection: (v) => (v1) => (select2) => (rootElement) => {
|
38340
|
+
const $0 = v1._1;
|
38341
|
+
return sequence_2(zipWith((i) => (view2) => {
|
38342
|
+
const $1 = select(":scope > :nth-child(" + showIntImpl(i + 1 | 0) + ")")(rootElement);
|
38343
|
+
return () => {
|
38344
|
+
const child = $1();
|
38345
|
+
return view2((dictView) => (v2) => dictView.setSelection()(v2)((() => {
|
38346
|
+
const $2 = $0 ? docElement(i) : (x2) => constrArg("Paragraph")(0)(listElement(i)(x2));
|
38347
|
+
return (x2) => select2($2(x2));
|
38348
|
+
})())(child))();
|
38349
|
+
};
|
38350
|
+
})(range(0)(v1._2.length - 1 | 0))(v1._2));
|
38351
|
+
}
|
38252
38352
|
};
|
38253
|
-
var viewParagraphUnit = { createElement: (v) => createRootElement$p, setSelection: (v) => setSelStates$p };
|
38254
38353
|
|
38255
38354
|
// output-es/App.View.DocView/index.js
|
38256
38355
|
var viewDocViewUnit = {
|
@@ -38261,7 +38360,7 @@ var viewDocViewUnit = {
|
|
38261
38360
|
return () => {
|
38262
38361
|
const rootElement = $1();
|
38263
38362
|
v1.view((dictView) => (v3) => dictView.createElement()(v3)(rootElement))();
|
38264
|
-
|
38363
|
+
viewParagraphUnit.createElement()($0)(rootElement)();
|
38265
38364
|
return rootElement;
|
38266
38365
|
};
|
38267
38366
|
}
|
@@ -38273,12 +38372,12 @@ var viewDocViewUnit = {
|
|
38273
38372
|
setSelection: (v) => (v1) => (v2) => (v3) => {
|
38274
38373
|
if (v1.doc.tag === "Just") {
|
38275
38374
|
const $0 = v1.doc._1;
|
38276
|
-
const $1 = select(":nth-child(1)")(v3);
|
38375
|
+
const $1 = select(":scope > :nth-child(1)")(v3);
|
38277
38376
|
return () => {
|
38278
38377
|
const viewElem = $1();
|
38279
38378
|
v1.view((dictView) => (v4) => dictView.setSelection()(v4)(v2)(viewElem))();
|
38280
|
-
const docElem = select(":nth-child(2)")(v3)();
|
38281
|
-
|
38379
|
+
const docElem = select(":scope > :nth-child(2)")(v3)();
|
38380
|
+
viewParagraphUnit.setSelection()($0)(v2)(docElem)();
|
38282
38381
|
};
|
38283
38382
|
}
|
38284
38383
|
if (v1.doc.tag === "Nothing") {
|
@@ -38714,29 +38813,30 @@ var matrixRep = (v) => ({
|
|
38714
38813
|
|
38715
38814
|
// output-es/App.View.MultiView/index.js
|
38716
38815
|
var $MultiView = (_1) => ({ tag: "MultiView", _1 });
|
38717
|
-
var toUnfoldable9 = /* @__PURE__ */ toAscUnfoldable(unfoldableArray);
|
38718
38816
|
var sequence_3 = /* @__PURE__ */ traverse_(applicativeEffect)(foldableArray)(identity4);
|
38719
|
-
var
|
38720
|
-
|
38721
|
-
|
38722
|
-
const $
|
38723
|
-
const $
|
38817
|
+
var toUnfoldable9 = /* @__PURE__ */ toAscUnfoldable(unfoldableArray);
|
38818
|
+
var viewMultiViewUnit = {
|
38819
|
+
createElement: (v) => (v1) => (parent) => {
|
38820
|
+
const $0 = v1._1;
|
38821
|
+
const $1 = createChild(parent)(showElementType.show(Div))(fromFoldable9([]));
|
38724
38822
|
return () => {
|
38725
|
-
const
|
38726
|
-
|
38823
|
+
const rootElement = $1();
|
38824
|
+
sequence_3(arrayMap((v2) => v2._2((dictView) => (v3) => dictView.createElement()(v3)(rootElement)))(toUnfoldable9($0)))();
|
38825
|
+
return rootElement;
|
38727
38826
|
};
|
38728
|
-
}
|
38729
|
-
|
38730
|
-
|
38731
|
-
|
38732
|
-
|
38733
|
-
|
38734
|
-
|
38735
|
-
|
38736
|
-
|
38737
|
-
|
38827
|
+
},
|
38828
|
+
setSelection: (v) => (v1) => (select2) => (rootElement) => sequence_3((() => {
|
38829
|
+
const $0 = toUnfoldable9(v1._1);
|
38830
|
+
return zipWith((i) => (v2) => {
|
38831
|
+
const $1 = v2._1;
|
38832
|
+
const $2 = select(":scope > :nth-child(" + showIntImpl(i + 1 | 0) + ")")(rootElement);
|
38833
|
+
return () => {
|
38834
|
+
const child = $2();
|
38835
|
+
v2._2((dictView) => (v3) => dictView.setSelection()(v3)((x2) => select2(multiViewEntry($1)(x2)))(child))();
|
38836
|
+
};
|
38837
|
+
})(range(0)($0.length - 1 | 0))($0);
|
38838
|
+
})())
|
38738
38839
|
};
|
38739
|
-
var viewMultiViewUnit = { createElement: (v) => createRootElement$p2, setSelection: (v) => setSelStates$p2 };
|
38740
38840
|
|
38741
38841
|
// output-es/App.View.ScatterPlot/foreign.js
|
38742
38842
|
function setSelection_2({ point_attrs, eventListener: eventListener2, withScatterPlotPoint }, {
|
@@ -39118,9 +39218,9 @@ var viewTableViewUnit = {
|
|
39118
39218
|
var arrayDictToArray2 = (x2) => arrayMap((a) => arrayMap((a$1) => $$get2(showString)(mapDictString)(a$1)(a))(x2));
|
39119
39219
|
|
39120
39220
|
// output-es/App.View.Text/index.js
|
39121
|
-
var
|
39122
|
-
var textAttrs = (dictTextual) => (
|
39123
|
-
const $0 = dictTextual.getText(
|
39221
|
+
var textualText = { getText: unsafeCoerce };
|
39222
|
+
var textAttrs = (dictTextual) => (text2) => {
|
39223
|
+
const $0 = dictTextual.getText(text2);
|
39124
39224
|
return [
|
39125
39225
|
$Tuple("border-bottom", isTransient($0._2) ? "1px solid blue" : "none"),
|
39126
39226
|
$Tuple(
|
@@ -39158,14 +39258,12 @@ var viewTextUnit = {
|
|
39158
39258
|
return setText($0)(rootElement)();
|
39159
39259
|
};
|
39160
39260
|
},
|
39161
|
-
setSelection: (v) => (
|
39162
|
-
const $0 =
|
39163
|
-
const $1 = select(":nth-child(1)")(rootElement);
|
39261
|
+
setSelection: (v) => (text2) => (redraw) => (rootElement) => {
|
39262
|
+
const $0 = eventListener((x2) => redraw(selectionEventData$p(x2)._2));
|
39164
39263
|
return () => {
|
39165
|
-
const
|
39166
|
-
const
|
39167
|
-
|
39168
|
-
return for_2(["mousedown", "mouseenter", "mouseleave"])((ev) => on(ev)(listener)($2))();
|
39264
|
+
const listener = $0();
|
39265
|
+
const $1 = styles(rootElement)(fromFoldable9(textAttrs(textualText)(text2)))();
|
39266
|
+
return for_2(["mousedown", "mouseenter", "mouseleave"])((ev) => on(ev)(listener)($1))();
|
39169
39267
|
};
|
39170
39268
|
}
|
39171
39269
|
};
|
@@ -40847,13 +40945,13 @@ var string3 = (str) => consumeWith((input) => {
|
|
40847
40945
|
});
|
40848
40946
|
|
40849
40947
|
// output-es/Parsing.String.Basic/index.js
|
40850
|
-
var
|
40948
|
+
var show12 = /* @__PURE__ */ showArrayImpl(showCharImpl);
|
40851
40949
|
var satisfyCP = (p) => satisfy((x2) => p(toCharCode(x2)));
|
40852
40950
|
var space = /* @__PURE__ */ withErrorMessage(/* @__PURE__ */ satisfyCP(isSpace))("space");
|
40853
40951
|
var upper2 = /* @__PURE__ */ withErrorMessage(/* @__PURE__ */ satisfyCP(isUpper))("uppercase letter");
|
40854
|
-
var oneOf = (ss) => withLazyErrorMessage(satisfy((a) => elem(eqChar)(a)(ss)))((v) => "one of " +
|
40952
|
+
var oneOf = (ss) => withLazyErrorMessage(satisfy((a) => elem(eqChar)(a)(ss)))((v) => "one of " + show12(ss));
|
40855
40953
|
var octDigit = /* @__PURE__ */ withErrorMessage(/* @__PURE__ */ satisfyCP(isOctDigit))("oct digit");
|
40856
|
-
var noneOf = (ss) => withLazyErrorMessage(satisfy((a) => notElem(eqChar)(a)(ss)))((v) => "none of " +
|
40954
|
+
var noneOf = (ss) => withLazyErrorMessage(satisfy((a) => notElem(eqChar)(a)(ss)))((v) => "none of " + show12(ss));
|
40857
40955
|
var letter = /* @__PURE__ */ withErrorMessage(/* @__PURE__ */ satisfyCP(isAlpha))("letter");
|
40858
40956
|
var hexDigit = /* @__PURE__ */ withErrorMessage(/* @__PURE__ */ satisfyCP(isHexDigit))("hex digit");
|
40859
40957
|
var digit = /* @__PURE__ */ withErrorMessage(/* @__PURE__ */ satisfyCP(isDecDigit))("digit");
|
@@ -265326,7 +265326,6 @@ __export(Test_Util_exports, {
|
|
265326
265326
|
textContentValue: () => textContentValue,
|
265327
265327
|
timeout: () => timeout2,
|
265328
265328
|
waitFor: () => waitFor,
|
265329
|
-
waitForFigure: () => waitForFigure,
|
265330
265329
|
waitForHidden: () => waitForHidden
|
265331
265330
|
});
|
265332
265331
|
module.exports = __toCommonJS(Test_Util_exports);
|
@@ -278702,7 +278701,6 @@ var waitFor = (selector2) => (page2) => {
|
|
278702
278701
|
visible: true
|
278703
278702
|
})(page2)))(() => _bind(_liftEffect(log2("-> found")))(() => report(true)("exists"))))((e) => report(false)(showErrorImpl(e))));
|
278704
278703
|
};
|
278705
|
-
var waitForFigure = (page2) => (selector2) => waitFor("svg" + selector2)(page2);
|
278706
278704
|
var waitForHidden = (selector2) => (page2) => _bind(_liftEffect(log2("Waiting for " + selector2)))(() => _bind(_map((v) => {
|
278707
278705
|
})(runPromiseAffE3(_pageWaitForSelector)(selector2)({
|
278708
278706
|
timeout: 24e4,
|
@@ -278725,7 +278723,7 @@ var checkAttributeContains = (page2) => (sel) => (attr) => (expected) => _bind(g
|
|
278725
278723
|
const success = contains(expected)(found);
|
278726
278724
|
return testCondition2(sel)(success)(attr + " contains " + showStringImpl(expected) + (success ? "" : " (got " + found + ")"));
|
278727
278725
|
});
|
278728
|
-
var checkAttribute = (page2) => (sel) => (attr) => (expected) => _bind(getAttributeValue(page2)(sel)(attr))((found) => testCondition2(sel)(found === expected)(attr + " == " + showStringImpl(expected) + (found === expected ? "" :
|
278726
|
+
var checkAttribute = (page2) => (sel) => (attr) => (expected) => _bind(getAttributeValue(page2)(sel)(attr))((found) => testCondition2(sel)(found === expected)(attr + " == " + showStringImpl(expected) + (found === expected ? "" : ' (got "' + found + '")')));
|
278729
278727
|
var browserTests = (suffix) => (browserName) => (launchBrowser) => (tests) => _bind(_liftEffect(log2("browserTests: " + browserName)))(() => _bind(launchBrowser)((browser) => _bind(_bind(_liftEffect(_newPage(browser)))(toAff$p(coerce)))((page2) => {
|
278730
278728
|
const url = "http://127.0.0.1:8080/" + suffix;
|
278731
278729
|
return _bind(for_2(tests)((test2) => _bind($$goto(url)(page2))(() => test2(page2))))(() => _bind(_liftEffect(_close(browser)))(toAff$p(coerce)));
|
@@ -278758,7 +278756,6 @@ var testURL = (suffix) => (tests) => {
|
|
278758
278756
|
textContentValue,
|
278759
278757
|
timeout,
|
278760
278758
|
waitFor,
|
278761
|
-
waitForFigure,
|
278762
278759
|
waitForHidden
|
278763
278760
|
});
|
278764
278761
|
/* istanbul ignore if -- @preserve */
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@explorable-viz/fluid",
|
3
|
-
"version": "0.8.
|
4
|
-
"description": "
|
3
|
+
"version": "0.8.3",
|
4
|
+
"description": "A functional programming language which integrates a bidirectional dynamic analysis, connecting outputs to data sources in a fine-grained way. Fluid is implemented in PureScript and runs in the browser.",
|
5
5
|
"main": "index.js",
|
6
6
|
"repository": {
|
7
7
|
"type": "git",
|
@@ -46,7 +46,6 @@
|
|
46
46
|
"test": "./script/test.sh",
|
47
47
|
"test-all": "./script/test-all.sh",
|
48
48
|
"test-browser": "./script/test.sh --browsers=Chrome --singleRun=false",
|
49
|
-
"test-page": "./script/test-page.sh",
|
50
49
|
"test-website": "./script/test-website.sh",
|
51
50
|
"test-website-all": "./script/test-website-all.sh",
|
52
51
|
"tidy": "./script/tidy.sh"
|
@@ -1,33 +0,0 @@
|
|
1
|
-
Paragraph [
|
2
|
-
Text "As shown in Table 3, BiLSTM gives significantly ",
|
3
|
-
Text (trendWord (findWithKey' "model" "BiLSTM" tableData).acc (findWithKey' "model" "LSTM" tableData).acc betterWorse),
|
4
|
-
Text " accuracies compared to uni-directional LSTM2, with the training time per epoch ",
|
5
|
-
Text (trendWord (findWithKey' "model" "BiLSTM" tableData).time_s (findWithKey' "model" "LSTM" tableData).time_s growShrink),
|
6
|
-
Text " from ",
|
7
|
-
Text (numToStr (findWithKey' "model" "LSTM" tableData).time_s),
|
8
|
-
Text " seconds to ",
|
9
|
-
Text (numToStr (findWithKey' "model" "BiLSTM" tableData).time_s),
|
10
|
-
Text " seconds. Stacking 2 layers of BiLSTM gives further improvements to development results, with a ",
|
11
|
-
Text (trendWord (findWithKey' "model" "2 stacked BiLSTM" tableData).time_s (findWithKey' "model" "BiLSTM" tableData).time_s smallerHigher),
|
12
|
-
Text " time of ",
|
13
|
-
Text (numToStr (findWithKey' "model" "2 stacked BiLSTM" tableData).time_s),
|
14
|
-
Text " seconds. 3 layers of stacked BiLSTM does not further improve the results. In contrast, S-LSTM gives a development result of ",
|
15
|
-
Text (numToStr (findWithKey' "model" "S-LSTM" tableData).acc),
|
16
|
-
Text "%, which is significantly better compared to 2-layer stacked BiLSTM, with a ",
|
17
|
-
Text (trendWord (findWithKey' "model" "S-LSTM" tableData).param (findWithKey' "model" "2 stacked BiLSTM" tableData).param smallerHigher),
|
18
|
-
Text " number of model parameters and a ",
|
19
|
-
Text (trendWord (findWithKey' "model" "S-LSTM" tableData).time_s (findWithKey' "model" "2 stacked BiLSTM" tableData).time_s shorterLonger),
|
20
|
-
Text " time of ",
|
21
|
-
Text (numToStr (findWithKey' "model" "S-LSTM" tableData).time_s),
|
22
|
-
Text " seconds. We additionally make comparisons with stacked CNNs and hierarchical attention (Vaswani et al., 2017), shown in Table 3 (the CNN and Transformer rows), ",
|
23
|
-
Text ((findWithKey' "time_s" (minimum (map (fun y -> y.time_s) tableData)) tableData).model),
|
24
|
-
Text " is the most efficient among all models compared, with the ",
|
25
|
-
Text (let pos = findIndex "model" "CNN" (insertionSort cmpParam tableData) in rankLabel "smallest" pos),
|
26
|
-
Text " model size. On the other hand, a 3-layer stacked CNN gives an accuracy of ",
|
27
|
-
Text (numToStr (fromSome (findWithKey "model" "3 stacked CNN" tableData)).acc),
|
28
|
-
Text "%, which is also the ",
|
29
|
-
Text (let pos = findIndex "model" "CNN" (insertionSort cmpTime tableData) in rankLabel "lowest" pos),
|
30
|
-
Text " compared with BiLSTM, hierarchical attention and S-LSTM. The best performance of hierarchical attention is between single-layer and two-layer BiLSTMs in terms of both accuracy and efficiency. S-LSTM gives significantly better accuracies compared with both CNN and hierarchical attention. Table 3 additionally shows the results of BiLSTM and S-LSTM when external attention is used Attention leads to improved accuracies for both BiLSTM and S-LSTM in classification, with S-LSTM still ",
|
31
|
-
Text (trendWord (findWithKey' "model" "S-LSTM" tableData).acc (findWithKey' "model" "BiLSTM" tableData).acc underOverPerforming),
|
32
|
-
Text " BiLSTM significantly."
|
33
|
-
]
|
@@ -1,50 +0,0 @@
|
|
1
|
-
let ordinalMap = [
|
2
|
-
{ lastDigit: 1, suffix: "st" },
|
3
|
-
{ lastDigit: 2, suffix: "nd" },
|
4
|
-
{ lastDigit: 3, suffix: "rd" }
|
5
|
-
];
|
6
|
-
|
7
|
-
let ordinal n =
|
8
|
-
if n <= 0 then error "n <= 0 not supported"
|
9
|
-
else if (n < 4) then
|
10
|
-
(findWithKey' "lastDigit" n ordinalMap).suffix
|
11
|
-
else if (n >= 4) `and` (n <= 20) then "th"
|
12
|
-
else error "n > 20 not supported";
|
13
|
-
|
14
|
-
let rankLabel word n =
|
15
|
-
if n == 1 then word
|
16
|
-
else ordinal n ++ "-" ++ word;
|
17
|
-
|
18
|
-
let trendWord n1 n2 compareWord =
|
19
|
-
compareWord (compare n1 n2);
|
20
|
-
|
21
|
-
let growShrink EQ = "unchanging";
|
22
|
-
growShrink LT = "shrinking";
|
23
|
-
growShrink GT = "growing";
|
24
|
-
|
25
|
-
let smallerHigher EQ = "equal";
|
26
|
-
smallerHigher LT = "smaller";
|
27
|
-
smallerHigher GT = "larger";
|
28
|
-
|
29
|
-
let shorterLonger EQ = "equal";
|
30
|
-
shorterLonger LT = "shorter";
|
31
|
-
shorterLonger GT = "longer";
|
32
|
-
|
33
|
-
let betterWorse EQ = "equal";
|
34
|
-
betterWorse LT = "worse";
|
35
|
-
betterWorse GT = "better";
|
36
|
-
|
37
|
-
let underOverPerforming EQ = "equal performance to that of";
|
38
|
-
underOverPerforming LT = "underperforming";
|
39
|
-
underOverPerforming GT = "outperforming";
|
40
|
-
|
41
|
-
-- (a -> Number) -> List a -> a
|
42
|
-
let maximumBy f lst =
|
43
|
-
let helper [] current = current;
|
44
|
-
helper (x: xs) current =
|
45
|
-
if f x > f current then helper xs x else helper xs current
|
46
|
-
in match lst as {
|
47
|
-
[] -> error "Empty list!";
|
48
|
-
(x: xs) -> helper xs x
|
49
|
-
};
|
50
|
-
|
@@ -1,44 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html lang="en">
|
3
|
-
<head>
|
4
|
-
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
-
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
8
|
-
<title>Fluid: scigen-multiple-replace</title>
|
9
|
-
<link href="../css/styles.css" rel="stylesheet" type="text/css">
|
10
|
-
<link href="../css/view-styles.css" rel="stylesheet" type="text/css">
|
11
|
-
<script src="https://kit.fontawesome.com/20cf8b42c0.js" crossorigin="anonymous"></script>
|
12
|
-
<script src="../shared/util.js"></script>
|
13
|
-
<style>
|
14
|
-
.data-pane {
|
15
|
-
max-width: 400px;
|
16
|
-
}
|
17
|
-
</style>
|
18
|
-
</head>
|
19
|
-
<body>
|
20
|
-
<div id="grid" class="grid-container data-pane-hidden">
|
21
|
-
<div></div>
|
22
|
-
<div></div>
|
23
|
-
<div class="flex-left-align">
|
24
|
-
<h3>1805.02474v1-10</h3>
|
25
|
-
<p>---</p>
|
26
|
-
</div>
|
27
|
-
|
28
|
-
<div class="flex-right-align data-pane">
|
29
|
-
<div id="fig-input"></div>
|
30
|
-
</div>
|
31
|
-
<div onclick="toggleDataPane('grid')">
|
32
|
-
<i class="data-pane-button toggle-button fa-solid fa-eye-slash"></i>
|
33
|
-
</div>
|
34
|
-
<div id="fig">
|
35
|
-
<div class="fig-loading">loading figure(s)</div>
|
36
|
-
</div>
|
37
|
-
</div>
|
38
|
-
|
39
|
-
<script type="module">
|
40
|
-
import { loadFigure } from "../shared/load-figure.js";
|
41
|
-
loadFigure("spec.json")("../fluid/1805.02474v1-10.fld")();
|
42
|
-
</script>
|
43
|
-
</body>
|
44
|
-
</html>
|