@explorable-viz/fluid 0.7.62 → 0.7.64
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/.spago/affjax-node/v1.0.0/.editorconfig +13 -0
- package/.spago/affjax-node/v1.0.0/.eslintrc.json +30 -0
- package/.spago/affjax-node/v1.0.0/.gitignore +13 -0
- package/.spago/pathy/v9.0.0/.editorconfig +13 -0
- package/.spago/pathy/v9.0.0/.gitignore +9 -0
- package/.spago/pathy/v9.0.0/.tidyrc.json +10 -0
- package/dist/fluid/fluid/lib/convolution.fld +0 -1
- package/dist/fluid/shared/fluid.mjs +59 -13
- package/dist/fluid/shared/load-figure.js +87 -58
- package/package.json +1 -1
- package/script/bundle-website.sh +6 -6
- package/.spago/node-process/v11.0.0/.eslintrc.json +0 -29
- package/.spago/node-process/v11.0.0/.gitignore +0 -8
- package/.spago/node-process/v11.1.0/.eslintrc.json +0 -29
- package/.spago/node-process/v11.1.0/.gitignore +0 -8
- package/.spago/node-process/v11.2.0/.eslintrc.json +0 -29
- package/.spago/node-process/v11.2.0/.gitignore +0 -8
- package/.spago/optparse/v6.0.0/.gitignore +0 -8
- package/.spago/optparse/v6.0.0/.npmrc +0 -1
- package/dist/fluid/fluid/.DS_Store +0 -0
- package/dist/fluid/fluid/example/linked-outputs/pairs.fld +0 -2
@@ -0,0 +1,30 @@
|
|
1
|
+
{
|
2
|
+
"env": { "browser": true },
|
3
|
+
"extends": "eslint:recommended",
|
4
|
+
"parserOptions": { "ecmaVersion": 6, "sourceType": "module" },
|
5
|
+
"rules": {
|
6
|
+
"block-scoped-var": "error",
|
7
|
+
"consistent-return": "error",
|
8
|
+
"eqeqeq": "error",
|
9
|
+
"guard-for-in": "error",
|
10
|
+
"no-bitwise": "error",
|
11
|
+
"no-caller": "error",
|
12
|
+
"no-constant-condition": ["error", { "checkLoops": false }],
|
13
|
+
"no-extra-parens": "off",
|
14
|
+
"no-extend-native": "error",
|
15
|
+
"no-loop-func": "error",
|
16
|
+
"no-new": "error",
|
17
|
+
"no-param-reassign": "error",
|
18
|
+
"no-return-assign": "error",
|
19
|
+
"no-sequences": "error",
|
20
|
+
"no-unused-expressions": "error",
|
21
|
+
"no-use-before-define": "error",
|
22
|
+
"no-undef": "error",
|
23
|
+
"no-eq-null": "error",
|
24
|
+
"radix": ["error", "always"],
|
25
|
+
"indent": ["error", 2, { "SwitchCase": 0 }],
|
26
|
+
"quotes": ["error", "double"],
|
27
|
+
"semi": ["error", "always"],
|
28
|
+
"strict": ["error", "global"]
|
29
|
+
}
|
30
|
+
}
|
@@ -222,6 +222,15 @@ var applyMaybe = {
|
|
222
222
|
},
|
223
223
|
Functor0: () => functorMaybe
|
224
224
|
};
|
225
|
+
var altMaybe = {
|
226
|
+
alt: (v) => (v1) => {
|
227
|
+
if (v.tag === "Nothing") {
|
228
|
+
return v1;
|
229
|
+
}
|
230
|
+
return v;
|
231
|
+
},
|
232
|
+
Functor0: () => functorMaybe
|
233
|
+
};
|
225
234
|
|
226
235
|
// output-es/Data.Either/index.js
|
227
236
|
var $Either = (tag, _1) => ({ tag, _1 });
|
@@ -24821,7 +24830,7 @@ var parse = (dictMonadError) => {
|
|
24821
24830
|
};
|
24822
24831
|
};
|
24823
24832
|
};
|
24824
|
-
var parseProgram = (loadFile2) => (
|
24833
|
+
var parseProgram = (loadFile2) => (folders) => (file) => (dictMonadAff) => (dictMonadError) => dictMonadAff.MonadEffect0().Monad0().Bind1().bind(loadFile2(folders)(file)(dictMonadAff)(dictMonadError))((() => {
|
24825
24834
|
const $0 = parse(dictMonadError);
|
24826
24835
|
return (a) => $0(a)(topLevel(expr_));
|
24827
24836
|
})());
|
@@ -24832,9 +24841,9 @@ var module_2 = (dictMonadAff) => {
|
|
24832
24841
|
return (dictMonadError) => {
|
24833
24842
|
const parse1 = parse(dictMonadError);
|
24834
24843
|
const desugarModuleFwd = moduleFwd(dictMonadError)(boundedLattice2);
|
24835
|
-
return (loadFile2) => (
|
24844
|
+
return (loadFile2) => (folders) => (file) => (v) => {
|
24836
24845
|
const $0 = v.mods;
|
24837
|
-
return Bind1.bind(Applicative0.pure())(() => Bind1.bind(loadFile2(
|
24846
|
+
return Bind1.bind(Applicative0.pure())(() => Bind1.bind(loadFile2(folders)(file)(dictMonadAff)(dictMonadError))((src) => Bind1.bind(Bind1.bind(parse1(src)(module_))(desugarModuleFwd))((mod) => Applicative0.pure({
|
24838
24847
|
primitives: v.primitives,
|
24839
24848
|
mods: $List("Cons", mod, $0),
|
24840
24849
|
datasets: v.datasets
|
@@ -24872,7 +24881,7 @@ var prepConfig = (dictMonadAff) => {
|
|
24872
24881
|
return (dictMonadError) => {
|
24873
24882
|
const desug1 = exprFwd(boundedLattice2)(dictMonadError)(joinSemilatticeUnit);
|
24874
24883
|
const initialConfig1 = initialConfig(dictMonadError)(fVExpr);
|
24875
|
-
return (v) => (file) => (progCxt) => $0.bind(parseProgram(v.loadFile)(v.
|
24884
|
+
return (v) => (file) => (progCxt) => $0.bind(parseProgram(v.loadFile)(v.fluidSrcPaths)(file)(dictMonadAff)(dictMonadError))((s) => $0.bind(desug1(s))((e) => $0.bind(initialConfig1(e)(progCxt))((gconfig) => Monad0.Applicative0().pure({
|
24876
24885
|
s,
|
24877
24886
|
e,
|
24878
24887
|
gconfig
|
@@ -24884,10 +24893,10 @@ var datasetAs = (dictMonadAff) => {
|
|
24884
24893
|
const $0 = Monad0.Bind1();
|
24885
24894
|
return (dictMonadError) => {
|
24886
24895
|
const desug1 = exprFwd(boundedLattice2)(dictMonadError)(joinSemilatticeUnit);
|
24887
|
-
return (loadFile2) => (
|
24896
|
+
return (loadFile2) => (folders) => (v) => (v1) => {
|
24888
24897
|
const $1 = v1.datasets;
|
24889
24898
|
const $2 = v._1;
|
24890
|
-
return $0.bind($0.bind(parseProgram(loadFile2)(
|
24899
|
+
return $0.bind($0.bind(parseProgram(loadFile2)(folders)(v._2)(dictMonadAff)(dictMonadError))(desug1))((e\u03B1) => Monad0.Applicative0().pure({
|
24891
24900
|
primitives: v1.primitives,
|
24892
24901
|
mods: v1.mods,
|
24893
24902
|
datasets: $List("Cons", $Tuple($2, e\u03B1), $1)
|
@@ -24908,8 +24917,8 @@ var loadProgCxt = (dictMonadAff) => {
|
|
24908
24917
|
primitives,
|
24909
24918
|
mods: Nil,
|
24910
24919
|
datasets: Nil
|
24911
|
-
}))(concatM1(arrayMap(module_22(v.loadFile)(v.
|
24912
|
-
const $1 = datasetAs2(v.loadFile)(v.
|
24920
|
+
}))(concatM1(arrayMap(module_22(v.loadFile)(v.fluidSrcPaths))(["lib/prelude", ...mods]))))(concatM1(arrayMap((() => {
|
24921
|
+
const $1 = datasetAs2(v.loadFile)(v.fluidSrcPaths);
|
24913
24922
|
return (x) => $1($Tuple(x._1, x._2));
|
24914
24923
|
})())(datasets)));
|
24915
24924
|
};
|
@@ -25050,8 +25059,19 @@ var readTextFile = (encoding) => (file) => (cb) => {
|
|
25050
25059
|
};
|
25051
25060
|
return () => readFile(file, $0, handleCallback(cb));
|
25052
25061
|
};
|
25062
|
+
var stat2 = (file) => (cb) => () => stat(file, handleCallback(cb));
|
25053
25063
|
|
25054
25064
|
// output-es/Node.FS.Aff/index.js
|
25065
|
+
var toAff1 = (f) => (a) => {
|
25066
|
+
const $0 = f(a);
|
25067
|
+
return makeAff((k) => {
|
25068
|
+
const $1 = $0(k);
|
25069
|
+
return () => {
|
25070
|
+
$1();
|
25071
|
+
return nonCanceler;
|
25072
|
+
};
|
25073
|
+
});
|
25074
|
+
};
|
25055
25075
|
var toAff2 = (f) => (a) => (b) => {
|
25056
25076
|
const $0 = f(a)(b);
|
25057
25077
|
return makeAff((k) => {
|
@@ -25063,23 +25083,48 @@ var toAff2 = (f) => (a) => (b) => {
|
|
25063
25083
|
});
|
25064
25084
|
};
|
25065
25085
|
|
25086
|
+
// output-es/Foreign/foreign.js
|
25087
|
+
var isArray = Array.isArray || function(value) {
|
25088
|
+
return Object.prototype.toString.call(value) === "[object Array]";
|
25089
|
+
};
|
25090
|
+
|
25091
|
+
// output-es/Node.FS.Stats/foreign.js
|
25092
|
+
var isFileImpl = (s) => s.isFile();
|
25093
|
+
|
25066
25094
|
// output-es/Module.Node/index.js
|
25067
|
-
var
|
25095
|
+
var findM = (dictMonad) => {
|
25096
|
+
const $0 = dictMonad.Bind1().Apply0();
|
25097
|
+
return (dictFoldable) => (xs) => (f) => (base) => dictFoldable.foldr((x) => (acc) => $0.apply($0.Functor0().map(altMaybe.alt)(acc))(f(x)))(dictMonad.Applicative0().pure(base))(xs);
|
25098
|
+
};
|
25099
|
+
var loadFile = (folders) => (v) => (dictMonadAff) => {
|
25068
25100
|
const Monad0 = dictMonadAff.MonadEffect0().Monad0();
|
25069
|
-
|
25101
|
+
const $0 = Monad0.Bind1();
|
25102
|
+
const findM1 = findM(Monad0)(foldableArray);
|
25103
|
+
return (dictMonadError) => $0.bind(findM1(arrayMap((() => {
|
25104
|
+
const $1 = v + ".fld";
|
25105
|
+
return (a) => a + "/" + $1;
|
25106
|
+
})())(folders))((v1) => $0.bind(dictMonadAff.liftAff(toAff1(stat2)(v1)))((stats) => Monad0.Applicative0().pure(isFileImpl(stats) ? $Maybe("Just", v1) : Nothing)))(Nothing))((url) => {
|
25107
|
+
if (url.tag === "Nothing") {
|
25108
|
+
return throwException(error("File " + v + " not found."))();
|
25109
|
+
}
|
25110
|
+
if (url.tag === "Just") {
|
25111
|
+
return dictMonadAff.liftAff(toAff2(readTextFile)(ASCII)(url._1));
|
25112
|
+
}
|
25113
|
+
fail();
|
25114
|
+
});
|
25070
25115
|
};
|
25071
25116
|
var loadProgCxt2 = (dictMonadAff) => {
|
25072
25117
|
const loadProgCxt1 = loadProgCxt(dictMonadAff);
|
25073
25118
|
return (dictMonadError) => {
|
25074
25119
|
const loadProgCxt22 = loadProgCxt1(dictMonadError);
|
25075
|
-
return (
|
25120
|
+
return (fluidSrcPaths) => loadProgCxt22({ loadFile, fluidSrcPaths });
|
25076
25121
|
};
|
25077
25122
|
};
|
25078
25123
|
var prepConfig2 = (dictMonadAff) => {
|
25079
25124
|
const prepConfig1 = prepConfig(dictMonadAff);
|
25080
25125
|
return (dictMonadError) => {
|
25081
25126
|
const prepConfig22 = prepConfig1(dictMonadError);
|
25082
|
-
return (
|
25127
|
+
return (fluidSrcPaths) => prepConfig22({ loadFile, fluidSrcPaths });
|
25083
25128
|
};
|
25084
25129
|
};
|
25085
25130
|
|
@@ -28398,7 +28443,8 @@ var parseImports = /* @__PURE__ */ $Parser(
|
|
28398
28443
|
);
|
28399
28444
|
var evaluate = (v) => {
|
28400
28445
|
const $0 = v._1.fileName;
|
28401
|
-
|
28446
|
+
const fluidSrcPaths = ["fluid"];
|
28447
|
+
return _bind(loadProgCxt3(fluidSrcPaths)(v._1.imports)(v._1.datasets))((progCxt) => _bind(prepConfig3(fluidSrcPaths)($0)(progCxt))((v1) => _bind(graphEval2(v1.gconfig)(v1.e))((v2) => _pure($Val(
|
28402
28448
|
void 0,
|
28403
28449
|
functorBaseVal.map((v$1) => {
|
28404
28450
|
})(v2["out\u03B1"]._2)
|
@@ -290,6 +290,15 @@ var applyEither = {
|
|
290
290
|
Functor0: () => functorEither
|
291
291
|
};
|
292
292
|
var applicativeEither = { pure: Right, Apply0: () => applyEither };
|
293
|
+
var altEither = {
|
294
|
+
alt: (v) => (v1) => {
|
295
|
+
if (v.tag === "Left") {
|
296
|
+
return v1;
|
297
|
+
}
|
298
|
+
return v;
|
299
|
+
},
|
300
|
+
Functor0: () => functorEither
|
301
|
+
};
|
293
302
|
|
294
303
|
// output-es/Effect/foreign.js
|
295
304
|
var pureE = function(a) {
|
@@ -1551,6 +1560,7 @@ var encode2 = /* @__PURE__ */ (() => {
|
|
1551
1560
|
// output-es/Data.HTTP.Method/index.js
|
1552
1561
|
var $Method = (tag) => tag;
|
1553
1562
|
var GET = /* @__PURE__ */ $Method("GET");
|
1563
|
+
var HEAD = /* @__PURE__ */ $Method("HEAD");
|
1554
1564
|
var print = (v2) => {
|
1555
1565
|
if (v2.tag === "Left") {
|
1556
1566
|
if (v2._1 === "OPTIONS") {
|
@@ -43598,6 +43608,7 @@ var concatM2 = (dictMonad) => foldrArray((() => {
|
|
43598
43608
|
const $0 = dictMonad.Bind1();
|
43599
43609
|
return (f) => (g) => (a) => $0.bind(f(a))(g);
|
43600
43610
|
})())(dictMonad.Applicative0().pure);
|
43611
|
+
var Folder = (x2) => x2;
|
43601
43612
|
var parse = (dictMonadError) => {
|
43602
43613
|
const $0 = dictMonadError.MonadThrow0();
|
43603
43614
|
const $1 = $0.Monad0().Applicative0().pure;
|
@@ -43615,7 +43626,7 @@ var parse = (dictMonadError) => {
|
|
43615
43626
|
};
|
43616
43627
|
};
|
43617
43628
|
};
|
43618
|
-
var parseProgram = (loadFile2) => (
|
43629
|
+
var parseProgram = (loadFile2) => (folders) => (file) => (dictMonadAff) => (dictMonadError) => dictMonadAff.MonadEffect0().Monad0().Bind1().bind(loadFile2(folders)(file)(dictMonadAff)(dictMonadError))((() => {
|
43619
43630
|
const $0 = parse(dictMonadError);
|
43620
43631
|
return (a) => $0(a)(topLevel(expr_));
|
43621
43632
|
})());
|
@@ -43626,9 +43637,9 @@ var module_2 = (dictMonadAff) => {
|
|
43626
43637
|
return (dictMonadError) => {
|
43627
43638
|
const parse1 = parse(dictMonadError);
|
43628
43639
|
const desugarModuleFwd = moduleFwd(dictMonadError)(boundedLattice2);
|
43629
|
-
return (loadFile2) => (
|
43640
|
+
return (loadFile2) => (folders) => (file) => (v) => {
|
43630
43641
|
const $0 = v.mods;
|
43631
|
-
return Bind1.bind(Applicative0.pure())(() => Bind1.bind(loadFile2(
|
43642
|
+
return Bind1.bind(Applicative0.pure())(() => Bind1.bind(loadFile2(folders)(file)(dictMonadAff)(dictMonadError))((src) => Bind1.bind(Bind1.bind(parse1(src)(module_))(desugarModuleFwd))((mod) => Applicative0.pure({
|
43632
43643
|
primitives: v.primitives,
|
43633
43644
|
mods: $List("Cons", mod, $0),
|
43634
43645
|
datasets: v.datasets
|
@@ -43666,7 +43677,7 @@ var prepConfig = (dictMonadAff) => {
|
|
43666
43677
|
return (dictMonadError) => {
|
43667
43678
|
const desug1 = exprFwd(boundedLattice2)(dictMonadError)(joinSemilatticeUnit);
|
43668
43679
|
const initialConfig1 = initialConfig(dictMonadError)(fVExpr);
|
43669
|
-
return (v) => (file) => (progCxt) => $0.bind(parseProgram(v.loadFile)(v.
|
43680
|
+
return (v) => (file) => (progCxt) => $0.bind(parseProgram(v.loadFile)(v.fluidSrcPaths)(file)(dictMonadAff)(dictMonadError))((s) => $0.bind(desug1(s))((e) => $0.bind(initialConfig1(e)(progCxt))((gconfig) => Monad0.Applicative0().pure({
|
43670
43681
|
s,
|
43671
43682
|
e,
|
43672
43683
|
gconfig
|
@@ -43678,10 +43689,10 @@ var datasetAs = (dictMonadAff) => {
|
|
43678
43689
|
const $0 = Monad0.Bind1();
|
43679
43690
|
return (dictMonadError) => {
|
43680
43691
|
const desug1 = exprFwd(boundedLattice2)(dictMonadError)(joinSemilatticeUnit);
|
43681
|
-
return (loadFile2) => (
|
43692
|
+
return (loadFile2) => (folders) => (v) => (v1) => {
|
43682
43693
|
const $1 = v1.datasets;
|
43683
43694
|
const $2 = v._1;
|
43684
|
-
return $0.bind($0.bind(parseProgram(loadFile2)(
|
43695
|
+
return $0.bind($0.bind(parseProgram(loadFile2)(folders)(v._2)(dictMonadAff)(dictMonadError))(desug1))((e\u03B1) => Monad0.Applicative0().pure({
|
43685
43696
|
primitives: v1.primitives,
|
43686
43697
|
mods: v1.mods,
|
43687
43698
|
datasets: $List("Cons", $Tuple($2, e\u03B1), $1)
|
@@ -43702,22 +43713,26 @@ var loadProgCxt = (dictMonadAff) => {
|
|
43702
43713
|
primitives,
|
43703
43714
|
mods: Nil,
|
43704
43715
|
datasets: Nil
|
43705
|
-
}))(concatM1(arrayMap(module_22(v.loadFile)(v.
|
43706
|
-
const $1 = datasetAs2(v.loadFile)(v.
|
43716
|
+
}))(concatM1(arrayMap(module_22(v.loadFile)(v.fluidSrcPaths))(["lib/prelude", ...mods]))))(concatM1(arrayMap((() => {
|
43717
|
+
const $1 = datasetAs2(v.loadFile)(v.fluidSrcPaths);
|
43707
43718
|
return (x2) => $1($Tuple(x2._1, x2._2));
|
43708
43719
|
})())(datasets)));
|
43709
43720
|
};
|
43710
43721
|
};
|
43711
43722
|
|
43712
43723
|
// output-es/Module.Web/index.js
|
43713
|
-
var
|
43714
|
-
|
43715
|
-
const Monad0 = MonadEffect0.Monad0();
|
43716
|
-
const
|
43717
|
-
const
|
43718
|
-
|
43719
|
-
|
43720
|
-
|
43724
|
+
var findM = (xs) => (f) => (base2) => foldrArray((x2) => (acc) => applyAff.apply(_map(altEither.alt)(acc))(f(x2)))(_pure(base2))(xs);
|
43725
|
+
var loadFile = (folders) => (v) => (dictMonadAff) => {
|
43726
|
+
const Monad0 = dictMonadAff.MonadEffect0().Monad0();
|
43727
|
+
const bindExceptT2 = bindExceptT(Monad0);
|
43728
|
+
const applicativeExceptT2 = applicativeExceptT(Monad0);
|
43729
|
+
const pure22 = Monad0.Applicative0().pure;
|
43730
|
+
return (dictMonadError) => Monad0.Bind1().bind(bindExceptT2.bind(dictMonadAff.liftAff(findM(arrayMap((() => {
|
43731
|
+
const $0 = v + ".fld";
|
43732
|
+
return (a) => a + "/" + $0;
|
43733
|
+
})())(folders))((v1) => _bind(request(driver)({
|
43734
|
+
method: $Either("Left", HEAD),
|
43735
|
+
url: v1,
|
43721
43736
|
headers: [],
|
43722
43737
|
content: Nothing,
|
43723
43738
|
username: Nothing,
|
@@ -43725,31 +43740,53 @@ var loadFile = (v) => (v1) => (dictMonadAff) => {
|
|
43725
43740
|
withCredentials: false,
|
43726
43741
|
responseFormat: $ResponseFormat("String", identity),
|
43727
43742
|
timeout: Nothing
|
43728
|
-
})))((
|
43743
|
+
}))((resp) => _pure((() => {
|
43744
|
+
if (resp.tag === "Right") {
|
43745
|
+
if (resp._1.status === 200) {
|
43746
|
+
return $Either("Right", $Tuple(resp._1, v1));
|
43747
|
+
}
|
43748
|
+
return $Either("Left", RequestFailedError);
|
43749
|
+
}
|
43750
|
+
if (resp.tag === "Left") {
|
43751
|
+
return $Either("Left", resp._1);
|
43752
|
+
}
|
43753
|
+
fail();
|
43754
|
+
})())))($Either("Left", RequestFailedError))))((v1) => {
|
43755
|
+
const $0 = v1._2;
|
43756
|
+
return bindExceptT2.bind(applicativeExceptT2.pure())(() => bindExceptT2.bind(dictMonadAff.liftAff(request(driver)({
|
43757
|
+
method: $Either("Left", GET),
|
43758
|
+
url: $0,
|
43759
|
+
headers: [],
|
43760
|
+
content: Nothing,
|
43761
|
+
username: Nothing,
|
43762
|
+
password: Nothing,
|
43763
|
+
withCredentials: false,
|
43764
|
+
responseFormat: $ResponseFormat("String", identity),
|
43765
|
+
timeout: Nothing
|
43766
|
+
})))((contents) => applicativeExceptT2.pure(contents.body)));
|
43767
|
+
}))((result) => {
|
43729
43768
|
if (result.tag === "Left") {
|
43730
|
-
|
43731
|
-
return Bind1.bind(MonadEffect0.liftEffect(log2("Failed with " + printError($0))))(() => dictMonadError.MonadThrow0().throwError(error(printError($0))));
|
43769
|
+
return dictMonadError.MonadThrow0().throwError(error(printError(result._1)));
|
43732
43770
|
}
|
43733
43771
|
if (result.tag === "Right") {
|
43734
|
-
|
43735
|
-
return Bind1.bind(Applicative0.pure())(() => Applicative0.pure($0.body));
|
43772
|
+
return pure22(result._1);
|
43736
43773
|
}
|
43737
43774
|
fail();
|
43738
43775
|
});
|
43739
43776
|
};
|
43740
|
-
var loadFile$p = (
|
43777
|
+
var loadFile$p = (folders) => (file) => (dictMonadAff) => (dictMonadError) => dictMonadAff.MonadEffect0().Monad0().Bind1().Apply0().Functor0().map((v) => $Tuple(file, v))(loadFile(folders)(file)(dictMonadAff)(dictMonadError));
|
43741
43778
|
var loadProgCxt2 = (dictMonadAff) => {
|
43742
43779
|
const loadProgCxt1 = loadProgCxt(dictMonadAff);
|
43743
43780
|
return (dictMonadError) => {
|
43744
43781
|
const loadProgCxt22 = loadProgCxt1(dictMonadError);
|
43745
|
-
return (
|
43782
|
+
return (fluidSrcPaths) => loadProgCxt22({ loadFile, fluidSrcPaths });
|
43746
43783
|
};
|
43747
43784
|
};
|
43748
43785
|
var prepConfig2 = (dictMonadAff) => {
|
43749
43786
|
const prepConfig1 = prepConfig(dictMonadAff);
|
43750
43787
|
return (dictMonadError) => {
|
43751
43788
|
const prepConfig22 = prepConfig1(dictMonadError);
|
43752
|
-
return (
|
43789
|
+
return (fluidSrcPaths) => prepConfig22({ loadFile, fluidSrcPaths });
|
43753
43790
|
};
|
43754
43791
|
};
|
43755
43792
|
|
@@ -43943,7 +43980,7 @@ var loadFig = (v) => (dictMonadAff) => {
|
|
43943
43980
|
const prepConfig1 = prepConfig3(dictMonadError);
|
43944
43981
|
const graphEval2 = graphEval(dictMonadError);
|
43945
43982
|
const $1 = v.file;
|
43946
|
-
const $2 = v.
|
43983
|
+
const $2 = v.fluidSrcPaths;
|
43947
43984
|
const $3 = v.inputs;
|
43948
43985
|
return $0.bind(loadProgCxt3(dictMonadError)($2)(v.imports)(v.datasets))((progCxt) => $0.bind(prepConfig1($2)($1)(progCxt))((v1) => {
|
43949
43986
|
const $4 = v1.s;
|
@@ -44216,26 +44253,7 @@ var gDecodeJsonCons = (dictDecodeJsonField) => (dictGDecodeJson) => (dictIsSymbo
|
|
44216
44253
|
var monadAffAff = { liftAff: (x2) => x2, MonadEffect0: () => monadEffectAff };
|
44217
44254
|
|
44218
44255
|
// output-es/App.LoadFigure/index.js
|
44219
|
-
var gDecodeJsonCons2 = /* @__PURE__ */ gDecodeJsonCons({
|
44220
|
-
decodeJsonField: (j) => {
|
44221
|
-
if (j.tag === "Just") {
|
44222
|
-
return $Maybe(
|
44223
|
-
"Just",
|
44224
|
-
_caseJson(
|
44225
|
-
(v) => $Either("Left", $JsonDecodeError("TypeMismatch", "String")),
|
44226
|
-
(v) => $Either("Left", $JsonDecodeError("TypeMismatch", "String")),
|
44227
|
-
(v) => $Either("Left", $JsonDecodeError("TypeMismatch", "String")),
|
44228
|
-
Right,
|
44229
|
-
(v) => $Either("Left", $JsonDecodeError("TypeMismatch", "String")),
|
44230
|
-
(v) => $Either("Left", $JsonDecodeError("TypeMismatch", "String")),
|
44231
|
-
j._1
|
44232
|
-
)
|
44233
|
-
);
|
44234
|
-
}
|
44235
|
-
return Nothing;
|
44236
|
-
}
|
44237
|
-
});
|
44238
|
-
var gDecodeJsonCons1 = /* @__PURE__ */ gDecodeJsonCons(/* @__PURE__ */ (() => {
|
44256
|
+
var gDecodeJsonCons2 = /* @__PURE__ */ gDecodeJsonCons(/* @__PURE__ */ (() => {
|
44239
44257
|
const $0 = decodeArray(caseJsonString($Either(
|
44240
44258
|
"Left",
|
44241
44259
|
$JsonDecodeError("TypeMismatch", "String")
|
@@ -44262,10 +44280,28 @@ var decodeJson = /* @__PURE__ */ (() => decodeRecord(gDecodeJsonCons((() => {
|
|
44262
44280
|
return Nothing;
|
44263
44281
|
}
|
44264
44282
|
};
|
44265
|
-
})())(
|
44266
|
-
|
44267
|
-
|
44268
|
-
|
44283
|
+
})())(gDecodeJsonCons({
|
44284
|
+
decodeJsonField: (j) => {
|
44285
|
+
if (j.tag === "Just") {
|
44286
|
+
return $Maybe(
|
44287
|
+
"Just",
|
44288
|
+
_caseJson(
|
44289
|
+
(v) => $Either("Left", $JsonDecodeError("TypeMismatch", "String")),
|
44290
|
+
(v) => $Either("Left", $JsonDecodeError("TypeMismatch", "String")),
|
44291
|
+
(v) => $Either("Left", $JsonDecodeError("TypeMismatch", "String")),
|
44292
|
+
Right,
|
44293
|
+
(v) => $Either("Left", $JsonDecodeError("TypeMismatch", "String")),
|
44294
|
+
(v) => $Either("Left", $JsonDecodeError("TypeMismatch", "String")),
|
44295
|
+
j._1
|
44296
|
+
)
|
44297
|
+
);
|
44298
|
+
}
|
44299
|
+
return Nothing;
|
44300
|
+
}
|
44301
|
+
})(gDecodeJsonCons2(gDecodeJsonCons2(gDecodeJsonCons2(gDecodeJsonNil)({ reflectSymbol: () => "inputs" })()())({ reflectSymbol: () => "imports" })()())({
|
44302
|
+
reflectSymbol: () => "fluidSrcPath"
|
44303
|
+
})()())({ reflectSymbol: () => "file" })()())({ reflectSymbol: () => "datasets" })()())().decodeJson)();
|
44304
|
+
var figSpecFromJson = (spec) => ({ fluidSrcPaths: arrayMap(Folder)(spec.fluidSrcPath), datasets: spec.datasets, imports: spec.imports, file: spec.file, inputs: spec.inputs });
|
44269
44305
|
var loadFigure = (fileName) => runAffs_((v) => drawFig(v._1)(v._2))([
|
44270
44306
|
_bind($$get(driver)($ResponseFormat("Json", identity))(fileName))((result) => {
|
44271
44307
|
if (result.tag === "Left") {
|
@@ -44277,24 +44313,17 @@ var loadFigure = (fileName) => runAffs_((v) => drawFig(v._1)(v._2))([
|
|
44277
44313
|
return throwException(error("JSON decoding failed with " + showJsonDecodeError.show(v._1)))();
|
44278
44314
|
}
|
44279
44315
|
if (v.tag === "Right") {
|
44280
|
-
return _map((v1) => $Tuple("fig", v1))(loadFig(
|
44281
|
-
fluidSrcPath: v._1.fluidSrcPath,
|
44282
|
-
datasets: v._1.datasets,
|
44283
|
-
imports: v._1.imports,
|
44284
|
-
file: v._1.file,
|
44285
|
-
inputs: v._1.inputs
|
44286
|
-
})(monadAffAff)(monadErrorAff));
|
44316
|
+
return _map((v1) => $Tuple("fig", v1))(loadFig(figSpecFromJson(v._1))(monadAffAff)(monadErrorAff));
|
44287
44317
|
}
|
44288
44318
|
}
|
44289
44319
|
fail();
|
44290
44320
|
})
|
44291
44321
|
]);
|
44292
|
-
var drawCode2 = (folder) => (file) => runAffs_(drawFile)([loadFile$p(folder)(file)(monadAffAff)(monadErrorAff)]);
|
44322
|
+
var drawCode2 = (folder) => (file) => runAffs_(drawFile)([loadFile$p([folder])(file)(monadAffAff)(monadErrorAff)]);
|
44293
44323
|
export {
|
44294
44324
|
decodeJson,
|
44295
44325
|
drawCode2 as drawCode,
|
44296
44326
|
figSpecFromJson,
|
44297
44327
|
gDecodeJsonCons2 as gDecodeJsonCons,
|
44298
|
-
gDecodeJsonCons1,
|
44299
44328
|
loadFigure
|
44300
44329
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@explorable-viz/fluid",
|
3
|
-
"version": "0.7.
|
3
|
+
"version": "0.7.64",
|
4
4
|
"description": "Fluid is an experimental programming language which integrates a bidirectional dynamic analysis to connect 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": {
|
package/script/bundle-website.sh
CHANGED
@@ -12,25 +12,24 @@ done
|
|
12
12
|
|
13
13
|
WEBSITE_LISP_CASE=$(./$PREFIX/script/util/lisp-case.sh "$WEBSITE")
|
14
14
|
echo "$WEBSITE -> $WEBSITE_LISP_CASE"
|
15
|
-
|
15
|
+
echo "Cleaning dist/$WEBSITE_LISP_CASE"
|
16
|
+
. "${PREFIX:+$PREFIX/}script/util/clean.sh" $WEBSITE_LISP_CASE
|
16
17
|
|
17
18
|
. "${PREFIX:+$PREFIX/}script/bundle-page.sh" $WEBSITE ${PREFIX:+$PREFIX}
|
18
19
|
|
19
20
|
shopt -s nullglob
|
20
21
|
|
21
22
|
# Only support one level of nesting for now
|
22
|
-
set +x
|
23
23
|
PAGES=($(for FILE in website/$WEBSITE/*.html; do
|
24
24
|
basename "$FILE" | sed 's/\.[^.]*$//'
|
25
25
|
done | sort -u))
|
26
|
-
set -x
|
27
26
|
|
28
27
|
for PAGE in "${PAGES[@]}"; do
|
29
28
|
. "${PREFIX:+$PREFIX/}script/bundle-page.sh" $WEBSITE.$PAGE ${PREFIX:+$PREFIX}
|
30
29
|
done
|
31
30
|
|
32
31
|
echo "Processing other static files:"
|
33
|
-
set +
|
32
|
+
set +u # try to remove +u
|
34
33
|
TO_COPY=()
|
35
34
|
shopt -s extglob
|
36
35
|
for CHILD in website/$WEBSITE/!(.|..); do
|
@@ -40,15 +39,16 @@ for CHILD in website/$WEBSITE/!(.|..); do
|
|
40
39
|
fi
|
41
40
|
done
|
42
41
|
shopt -u extglob
|
43
|
-
set -
|
42
|
+
set -u
|
44
43
|
|
45
44
|
for CHILD in "${TO_COPY[@]}"; do
|
46
45
|
cp -rL "$CHILD" dist/$WEBSITE_LISP_CASE
|
47
46
|
done
|
48
47
|
|
49
48
|
echo "Processing shared js files:"
|
50
|
-
cp -r "${PREFIX:+$PREFIX/}dist/fluid/shared" dist/$WEBSITE_LISP_CASE
|
51
49
|
cp -r fluid dist/$WEBSITE_LISP_CASE
|
50
|
+
cp -r "${PREFIX:+$PREFIX/}dist/fluid/shared" dist/$WEBSITE_LISP_CASE
|
51
|
+
|
52
52
|
|
53
53
|
if [[ -e "website/$SRC_PATH/test.mjs" ]]; then
|
54
54
|
cp website/$SRC_PATH/test.mjs dist/SRC_PATH_LISP_CASE/test.mjs
|
@@ -1,29 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"parserOptions": {
|
3
|
-
"ecmaVersion": 6,
|
4
|
-
"sourceType": "module"
|
5
|
-
},
|
6
|
-
"extends": "eslint:recommended",
|
7
|
-
"env": {
|
8
|
-
"node": true
|
9
|
-
},
|
10
|
-
"rules": {
|
11
|
-
"strict": [2, "global"],
|
12
|
-
"block-scoped-var": 2,
|
13
|
-
"consistent-return": 2,
|
14
|
-
"eqeqeq": [2, "smart"],
|
15
|
-
"guard-for-in": 2,
|
16
|
-
"no-caller": 2,
|
17
|
-
"no-extend-native": 2,
|
18
|
-
"no-loop-func": 2,
|
19
|
-
"no-new": 2,
|
20
|
-
"no-param-reassign": 2,
|
21
|
-
"no-return-assign": 2,
|
22
|
-
"no-unused-expressions": 2,
|
23
|
-
"no-use-before-define": 2,
|
24
|
-
"radix": [2, "always"],
|
25
|
-
"indent": [2, 2],
|
26
|
-
"quotes": [2, "double"],
|
27
|
-
"semi": [2, "always"]
|
28
|
-
}
|
29
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"parserOptions": {
|
3
|
-
"ecmaVersion": 6,
|
4
|
-
"sourceType": "module"
|
5
|
-
},
|
6
|
-
"extends": "eslint:recommended",
|
7
|
-
"env": {
|
8
|
-
"node": true
|
9
|
-
},
|
10
|
-
"rules": {
|
11
|
-
"strict": [2, "global"],
|
12
|
-
"block-scoped-var": 2,
|
13
|
-
"consistent-return": 2,
|
14
|
-
"eqeqeq": [2, "smart"],
|
15
|
-
"guard-for-in": 2,
|
16
|
-
"no-caller": 2,
|
17
|
-
"no-extend-native": 2,
|
18
|
-
"no-loop-func": 2,
|
19
|
-
"no-new": 2,
|
20
|
-
"no-param-reassign": 2,
|
21
|
-
"no-return-assign": 2,
|
22
|
-
"no-unused-expressions": 2,
|
23
|
-
"no-use-before-define": 2,
|
24
|
-
"radix": [2, "always"],
|
25
|
-
"indent": [2, 2],
|
26
|
-
"quotes": [2, "double"],
|
27
|
-
"semi": [2, "always"]
|
28
|
-
}
|
29
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"parserOptions": {
|
3
|
-
"ecmaVersion": 6,
|
4
|
-
"sourceType": "module"
|
5
|
-
},
|
6
|
-
"extends": "eslint:recommended",
|
7
|
-
"env": {
|
8
|
-
"node": true
|
9
|
-
},
|
10
|
-
"rules": {
|
11
|
-
"strict": [2, "global"],
|
12
|
-
"block-scoped-var": 2,
|
13
|
-
"consistent-return": 2,
|
14
|
-
"eqeqeq": [2, "smart"],
|
15
|
-
"guard-for-in": 2,
|
16
|
-
"no-caller": 2,
|
17
|
-
"no-extend-native": 2,
|
18
|
-
"no-loop-func": 2,
|
19
|
-
"no-new": 2,
|
20
|
-
"no-param-reassign": 2,
|
21
|
-
"no-return-assign": 2,
|
22
|
-
"no-unused-expressions": 2,
|
23
|
-
"no-use-before-define": 2,
|
24
|
-
"radix": [2, "always"],
|
25
|
-
"indent": [2, 2],
|
26
|
-
"quotes": [2, "double"],
|
27
|
-
"semi": [2, "always"]
|
28
|
-
}
|
29
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
package-lock=false
|
Binary file
|