@explorable-viz/fluid 0.7.22 → 0.7.24

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.
Files changed (33) hide show
  1. package/.spago/argonaut/v9.0.0/.editorconfig +13 -0
  2. package/.spago/argonaut/v9.0.0/.gitignore +9 -0
  3. package/.spago/argonaut/v9.0.0/.tidyrc.json +10 -0
  4. package/.spago/argonaut-codecs/v9.0.0/.editorconfig +13 -0
  5. package/.spago/argonaut-codecs/v9.0.0/.gitignore +9 -0
  6. package/.spago/argonaut-codecs/v9.0.0/.tidyrc.json +10 -0
  7. package/.spago/argonaut-traversals/v10.0.0/.editorconfig +13 -0
  8. package/.spago/argonaut-traversals/v10.0.0/.gitignore +9 -0
  9. package/.spago/argonaut-traversals/v10.0.0/.tidyrc.json +10 -0
  10. package/.spago/profunctor-lenses/v8.0.0/.editorconfig +13 -0
  11. package/.spago/profunctor-lenses/v8.0.0/.gitignore +9 -0
  12. package/.spago/profunctor-lenses/v8.0.0/.tidyrc.json +10 -0
  13. package/dist/fluid/css/styles.css +343 -0
  14. package/dist/fluid/css/view-styles.css +182 -0
  15. package/dist/fluid/favicon.ico +0 -0
  16. package/dist/fluid/font/GraphikLight.woff2 +0 -0
  17. package/dist/fluid/font/GraphikLightItalic.woff2 +0 -0
  18. package/dist/fluid/font/GraphikMedium.woff2 +0 -0
  19. package/dist/fluid/font/GraphikMediumItalic.woff2 +0 -0
  20. package/dist/fluid/font/OdiseanTech.woff2 +0 -0
  21. package/dist/fluid/load-fig.js +44294 -0
  22. package/dist/fluid/shared/footer.html +6 -0
  23. package/dist/fluid/shared/header.html +26 -0
  24. package/dist/fluid/shared/sub-header.html +12 -0
  25. package/dist/fluid/shared/util.js +72 -0
  26. package/index.js +42757 -26748
  27. package/package.json +4 -4
  28. package/script/rebundle-website.sh +95 -0
  29. package/script/bundle-page.sh +0 -21
  30. package/script/bundle-website.sh +0 -53
  31. package/script/util/bundle.sh +0 -3
  32. package/script/util/compile.sh +0 -7
  33. package/script/util/lisp-case.sh +0 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explorable-viz/fluid",
3
- "version": "0.7.22",
3
+ "version": "0.7.24",
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": {
@@ -19,9 +19,9 @@
19
19
  "homepage": "https://f.luid.org",
20
20
  "files": [
21
21
  "dist/fluid/",
22
- "script/bundle-website.sh",
23
- "script/util/",
24
- "script/bundle-page.sh"
22
+ "script/rebundle-website.sh",
23
+ "script/util/clean.sh",
24
+ "script/util/lisp_case.sh"
25
25
  ],
26
26
  "scripts": {
27
27
  "tidy": "./script/tidy.sh",
@@ -0,0 +1,95 @@
1
+ #!/usr/bin/env bash
2
+ set -xe
3
+
4
+ WEBSITE="Misc"
5
+ SCRIPT_ROOT=false
6
+
7
+
8
+ while getopts "w:r:" opt; do
9
+ case $opt in
10
+ w) WEBSITE="$OPTARG";;
11
+ r) SCRIPT_ROOT="$OPTARG";;
12
+ esac
13
+ done
14
+
15
+ if [[ "$SCRIPT_ROOT" = true ]]; then
16
+ CLEAN=./node_modules/@explorable-viz/fluid/script/util/clean.sh
17
+ LISP_CASE=./node_modules/@explorable-viz/fluid/script/util/lisp-case.sh
18
+ DIST="node_modules/@explorable-viz/fluid/dist"
19
+ else
20
+ CLEAN=./script/util/clean.sh
21
+ LISP_CASE=./script/util/lisp-case.sh
22
+ DIST="dist"
23
+ fi
24
+
25
+
26
+ SRC_PATH=${WEBSITE//./\/}
27
+ SRC_PATH_LISP_CASE=$($LISP_CASE "$SRC_PATH")
28
+ echo "$SRC_PATH -> $SRC_PATH_LISP_CASE"
29
+
30
+ shopt -s nullglob
31
+
32
+ set +x
33
+ PAGES=($(for FILE in website/$WEBSITE/*.html; do
34
+ basename "$FILE" | sed 's/\.[^.]*$//'
35
+ done | sort -u))
36
+ set -x
37
+ for PAGE in "${PAGES[@]}"; do
38
+ MODULE=$WEBSITE.$PAGE
39
+ SRC_PATH=${MODULE//./\/}
40
+ SRC_PATH_LISP_CASE=$($LISP_CASE "$SRC_PATH")
41
+ echo "$SRC_PATH -> $SRC_PATH_LISP_CASE"
42
+
43
+ if [[ ! -e "website/$SRC_PATH.purs" ]]; then
44
+ $CLEAN $SRC_PATH_LISP_CASE
45
+
46
+ cp website/$SRC_PATH.html dist/$SRC_PATH_LISP_CASE/index.html
47
+ else
48
+ if [[ -e "website/$SRC_PATH.html" ]]; then
49
+ $CLEAN $SRC_PATH_LISP_CASE
50
+
51
+ cp website/$SRC_PATH.html dist/$SRC_PATH_LISP_CASE/index.html
52
+ fi
53
+ fi
54
+
55
+ if [[ -e "website/$SRC_PATH.json" ]]; then
56
+ echo "exists"
57
+ cp website/$SRC_PATH.json dist/$SRC_PATH_LISP_CASE/spec.json
58
+ else
59
+ if [[ ! -e "website/$SRC_PATH.json" ]]; then
60
+ echo "doesn't exist"
61
+ fi
62
+ fi
63
+ done
64
+
65
+
66
+ WEBSITE_LISP_CASE=$($LISP_CASE "$WEBSITE")
67
+
68
+ set +x
69
+ TO_COPY=()
70
+ for CHILD in website/$WEBSITE/*; do
71
+ BASENAME="$(basename "$CHILD")"
72
+ if [[ "$BASENAME" =~ ^[a-z] ]]; then
73
+ TO_COPY+=("$CHILD")
74
+ fi
75
+ done
76
+ set -x
77
+
78
+ echo "Processing shared files:"
79
+ cp -r $DIST/fluid/shared dist/$WEBSITE_LISP_CASE/shared
80
+ cp $DIST/fluid/load-fig.js dist/$WEBSITE_LISP_CASE/shared/load-fig.js
81
+
82
+ cp -r $DIST/fluid/font dist/$WEBSITE_LISP_CASE/font
83
+ cp -r $DIST/fluid/css dist/$WEBSITE_LISP_CASE/css
84
+ cp $DIST/fluid/favicon.ico dist/$WEBSITE_LISP_CASE/favicon.ico
85
+
86
+ echo "Processing static files:"
87
+
88
+ for CHILD in "${TO_COPY[@]}"; do
89
+ BASENAME="$(basename "$CHILD")"
90
+ cp -r "$CHILD" "dist/$WEBSITE_LISP_CASE/$BASENAME"
91
+ done
92
+
93
+ shopt -u nullglob
94
+ cp -r fluid dist/$WEBSITE_LISP_CASE
95
+ echo "Bundled website $WEBSITE"
@@ -1,21 +0,0 @@
1
- #!/usr/bin/env bash
2
- # run from project root
3
- set -xe
4
-
5
- MODULE=$1
6
- SRC_PATH=${MODULE//./\/}
7
- SRC_PATH_LISP_CASE=$(./script/util/lisp-case.sh "$SRC_PATH")
8
- echo "$SRC_PATH -> $SRC_PATH_LISP_CASE"
9
-
10
- if [[ ! -e "website/$SRC_PATH.purs" ]]; then
11
- ./script/util/clean.sh $SRC_PATH_LISP_CASE
12
- cp website/$SRC_PATH.html dist/$SRC_PATH_LISP_CASE/index.html
13
- else
14
- ./script/util/bundle.sh $SRC_PATH_LISP_CASE Website.$MODULE
15
-
16
- if [[ -e "website/$SRC_PATH.html" ]]; then
17
- cp website/$SRC_PATH.html dist/$SRC_PATH_LISP_CASE/index.html
18
- else
19
- cp website/FluidOrg/template.html dist/$SRC_PATH_LISP_CASE/index.html
20
- fi
21
- fi
@@ -1,53 +0,0 @@
1
- #!/usr/bin/env bash
2
- # run from project root
3
- set -xe
4
-
5
- ROOT_DIR=""
6
- WEBSITE="Misc"
7
-
8
- while getopts "r:w:" opt; do
9
- case $opt in
10
- r) ROOT_DIR="$OPTARG";;
11
- w) WEBSITE="$OPTARG";;
12
- esac
13
- done
14
-
15
- . $ROOT_DIR script/bundle-page.sh $WEBSITE
16
-
17
- # Only support one level of nesting for now
18
- shopt -s nullglob
19
-
20
- set +x
21
- PAGES=($(for FILE in website/$WEBSITE/*.purs; do
22
- basename "$FILE" | sed 's/\.[^.]*$//'
23
- done | sort -u))
24
- set -x
25
-
26
- echo "Processing ${WEBSITE} pages: ${PAGES[@]}"
27
-
28
- for PAGE in "${PAGES[@]}"; do
29
- . script/bundle-page.sh $WEBSITE.$PAGE
30
- done
31
-
32
- WEBSITE_LISP_CASE=$(./script/util/lisp-case.sh "$WEBSITE")
33
-
34
- set +x
35
- TO_COPY=()
36
- for CHILD in website/$WEBSITE/*; do
37
- BASENAME="$(basename "$CHILD")"
38
- if [[ "$BASENAME" =~ ^[a-z] ]]; then
39
- TO_COPY+=("$CHILD")
40
- fi
41
- done
42
- set -x
43
-
44
- echo "Processing static files:"
45
-
46
- for CHILD in "${TO_COPY[@]}"; do
47
- BASENAME="$(basename "$CHILD")"
48
- cp -rL "$CHILD" "dist/$WEBSITE_LISP_CASE/$BASENAME"
49
- done
50
-
51
- shopt -u nullglob
52
- cp -r fluid dist/$WEBSITE_LISP_CASE
53
- echo "Bundled website $WEBSITE"
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -xe
3
- yarn purs-backend-es bundle-app --main $2 --to dist/$1/fluid.js ${@:3} > /dev/null
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -xe
3
-
4
- rm -rf output
5
- rm -rf output-es
6
- yarn tidy
7
- yarn spago build --purs-args '--strict --censor-codes=UserDefinedWarning'
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -e
3
-
4
- toLispCase() {
5
- INPUT="$1"
6
- RESULT=$(echo "$INPUT" | sed -E 's/([a-z0-9])([A-Z])/\1-\2/g' | tr '[:upper:]' '[:lower:]')
7
- echo "$RESULT"
8
- }
9
-
10
- toLispCase "$1"