@loveluthien/carta-frontend 6.0.0-dev

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 (148) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +34 -0
  2. package/.github/pull_request_template.md +23 -0
  3. package/.github/workflows/continuous_integration.yml +139 -0
  4. package/.github/workflows/deploy.yml +30 -0
  5. package/.husky/pre-commit +16 -0
  6. package/.husky/pre-push +42 -0
  7. package/.prettierignore +1 -0
  8. package/.prettierrc.json +18 -0
  9. package/CHANGELOG.md +363 -0
  10. package/COPYING.md +636 -0
  11. package/README.md +112 -0
  12. package/babel.config.json +10 -0
  13. package/build/ast_wrapper.wasm +0 -0
  14. package/build/carta_computation.wasm +0 -0
  15. package/build/carta_icon_128px.png +0 -0
  16. package/build/carta_logo.png +0 -0
  17. package/build/gsl_wrapper.wasm +0 -0
  18. package/build/index.html +147 -0
  19. package/build/manifest.json +15 -0
  20. package/build/robots.txt +3 -0
  21. package/build/static/css/546.aa44a897.css +1 -0
  22. package/build/static/css/async/359.4d8f6ff7.css +1 -0
  23. package/build/static/css/async/403.ea9edfac.css +1 -0
  24. package/build/static/css/async/462.8bde08e0.css +1 -0
  25. package/build/static/css/index.c1f77b92.css +1 -0
  26. package/build/static/font/blueprint-icons-16.5fb1af27.woff2 +0 -0
  27. package/build/static/font/blueprint-icons-16.79f603d1.woff +0 -0
  28. package/build/static/font/blueprint-icons-16.83d51978.eot +0 -0
  29. package/build/static/font/blueprint-icons-16.af0c342f.ttf +0 -0
  30. package/build/static/font/blueprint-icons-20.83fddc09.ttf +0 -0
  31. package/build/static/font/blueprint-icons-20.9a51bc58.woff +0 -0
  32. package/build/static/font/blueprint-icons-20.d61315fe.eot +0 -0
  33. package/build/static/font/blueprint-icons-20.ebf16e9a.woff2 +0 -0
  34. package/build/static/image/allmaps.03f2ba92.png +0 -0
  35. package/build/static/image/gamma.6fca425b.png +0 -0
  36. package/build/static/image/linear.c7941b64.png +0 -0
  37. package/build/static/image/log.7fce6aee.png +0 -0
  38. package/build/static/image/power.5dac9727.png +0 -0
  39. package/build/static/image/sqrt.0ec2b3f1.png +0 -0
  40. package/build/static/image/squared.798b23aa.png +0 -0
  41. package/build/static/js/546.b5841ade.js +489 -0
  42. package/build/static/js/546.b5841ade.js.LICENSE.txt +925 -0
  43. package/build/static/js/async/359.97257512.js +1 -0
  44. package/build/static/js/async/403.b00f768c.js +1 -0
  45. package/build/static/js/async/462.92c07a07.js +1 -0
  46. package/build/static/js/async/905.70044ee8.js +1 -0
  47. package/build/static/js/async/907.dc17f1d2.js +1 -0
  48. package/build/static/js/async/blueprint-icons-16px-paths.e17db832.js +1 -0
  49. package/build/static/js/async/blueprint-icons-20px-paths.6ad43f5f.js +1 -0
  50. package/build/static/js/async/blueprint-icons-all-paths-loader.61cc0f7b.js +1 -0
  51. package/build/static/js/async/blueprint-icons-all-paths.0c699441.js +1 -0
  52. package/build/static/js/async/blueprint-icons-split-paths-by-size-loader.5cff79f5.js +1 -0
  53. package/build/static/js/index.8fc34b4d.js +1344 -0
  54. package/build/static/js/index.9a30d560.worker.js +1 -0
  55. package/build/static/js/zfp_wrapper.wasm +0 -0
  56. package/build/static/svg/blueprint-icons-16.130888ef.svg +2097 -0
  57. package/build/static/svg/blueprint-icons-20.c8456d56.svg +2097 -0
  58. package/build/zfp_wrapper.wasm +0 -0
  59. package/declarations.d.ts +18 -0
  60. package/docs_website/.prettierignore +1 -0
  61. package/docs_website/api/api.md +13 -0
  62. package/docs_website/babel.config.js +3 -0
  63. package/docs_website/docs/assets/enable-code-snippets.png +0 -0
  64. package/docs_website/docs/code-snippet-tutorial/_category_.json +8 -0
  65. package/docs_website/docs/code-snippet-tutorial/basics.md +97 -0
  66. package/docs_website/docs/code-snippet-tutorial/image-blending.mdx +57 -0
  67. package/docs_website/docs/code-snippet-tutorial/image-fitting.mdx +44 -0
  68. package/docs_website/docs/code-snippet-tutorial/image-properties.mdx +84 -0
  69. package/docs_website/docs/code-snippet-tutorial/moment-images.mdx +31 -0
  70. package/docs_website/docs/code-snippet-tutorial/pv-images.mdx +28 -0
  71. package/docs_website/docs/code-snippet-tutorial/quick-start.mdx +82 -0
  72. package/docs_website/docs/code-snippet-tutorial/regions.mdx +49 -0
  73. package/docs_website/docs/contributing/_category_.json +7 -0
  74. package/docs_website/docs/contributing/developer-tips.md +61 -0
  75. package/docs_website/docs/contributing/documentation-guidelines.md +87 -0
  76. package/docs_website/docs/contributing/github-workflow.md +146 -0
  77. package/docs_website/docs/contributing/release-guidelines.md +73 -0
  78. package/docs_website/docs/contributing/unit-test-guidelines.md +79 -0
  79. package/docs_website/docs/documents.mdx +15 -0
  80. package/docs_website/docusaurus.config.js +167 -0
  81. package/docs_website/package-lock.json +16769 -0
  82. package/docs_website/package.json +121 -0
  83. package/docs_website/patches/@docusaurus+core+3.9.2.patch +20 -0
  84. package/docs_website/sidebars.js +33 -0
  85. package/docs_website/static/.nojekyll +0 -0
  86. package/docs_website/static/img/carta_icon_128px.png +0 -0
  87. package/docs_website/versioned_docs/version-4.1.0/api-packages.json +1 -0
  88. package/docs_website/versioned_docs/version-4.1.0/api-typedoc.json +214112 -0
  89. package/docs_website/versioned_docs/version-4.1.0/assets/enable-code-snippets.png +0 -0
  90. package/docs_website/versioned_docs/version-4.1.0/code-snippet-tutorial/_category_.json +8 -0
  91. package/docs_website/versioned_docs/version-4.1.0/code-snippet-tutorial/basics.md +97 -0
  92. package/docs_website/versioned_docs/version-4.1.0/code-snippet-tutorial/image-fitting.mdx +42 -0
  93. package/docs_website/versioned_docs/version-4.1.0/code-snippet-tutorial/image-properties.mdx +86 -0
  94. package/docs_website/versioned_docs/version-4.1.0/code-snippet-tutorial/moment-images.mdx +31 -0
  95. package/docs_website/versioned_docs/version-4.1.0/code-snippet-tutorial/pv-images.mdx +28 -0
  96. package/docs_website/versioned_docs/version-4.1.0/code-snippet-tutorial/quick-start.mdx +82 -0
  97. package/docs_website/versioned_docs/version-4.1.0/code-snippet-tutorial/regions.mdx +49 -0
  98. package/docs_website/versioned_docs/version-4.1.0/contributing/_category_.json +7 -0
  99. package/docs_website/versioned_docs/version-4.1.0/contributing/developer-tips.md +36 -0
  100. package/docs_website/versioned_docs/version-4.1.0/contributing/documentation-guidelines.md +87 -0
  101. package/docs_website/versioned_docs/version-4.1.0/contributing/github-workflow.md +141 -0
  102. package/docs_website/versioned_docs/version-4.1.0/contributing/release-guidelines.md +73 -0
  103. package/docs_website/versioned_docs/version-4.1.0/contributing/unit-test-guidelines.md +79 -0
  104. package/docs_website/versioned_docs/version-4.1.0/documents.mdx +15 -0
  105. package/docs_website/versioned_docs/version-5.0.0/api-packages.json +1 -0
  106. package/docs_website/versioned_docs/version-5.0.0/api-typedoc.json +315266 -0
  107. package/docs_website/versioned_docs/version-5.0.0/assets/enable-code-snippets.png +0 -0
  108. package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/_category_.json +8 -0
  109. package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/basics.md +97 -0
  110. package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/image-blending.mdx +57 -0
  111. package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/image-fitting.mdx +44 -0
  112. package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/image-properties.mdx +86 -0
  113. package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/moment-images.mdx +31 -0
  114. package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/pv-images.mdx +28 -0
  115. package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/quick-start.mdx +82 -0
  116. package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/regions.mdx +49 -0
  117. package/docs_website/versioned_docs/version-5.0.0/contributing/_category_.json +7 -0
  118. package/docs_website/versioned_docs/version-5.0.0/contributing/developer-tips.md +36 -0
  119. package/docs_website/versioned_docs/version-5.0.0/contributing/documentation-guidelines.md +87 -0
  120. package/docs_website/versioned_docs/version-5.0.0/contributing/github-workflow.md +141 -0
  121. package/docs_website/versioned_docs/version-5.0.0/contributing/release-guidelines.md +73 -0
  122. package/docs_website/versioned_docs/version-5.0.0/contributing/unit-test-guidelines.md +79 -0
  123. package/docs_website/versioned_docs/version-5.0.0/documents.mdx +15 -0
  124. package/docs_website/versioned_sidebars/version-4.1.0-sidebars.json +8 -0
  125. package/docs_website/versioned_sidebars/version-5.0.0-sidebars.json +8 -0
  126. package/docs_website/versions.json +4 -0
  127. package/eslint.config.mjs +86 -0
  128. package/jest.config.js +101 -0
  129. package/package.json +186 -0
  130. package/patches/golden-layout+1.5.9.patch +24 -0
  131. package/patches/react-split-pane+0.1.92.patch +20 -0
  132. package/rsbuild.config.ts +75 -0
  133. package/schemas/.github/workflows/AddToCartaVisProject.yml +23 -0
  134. package/schemas/.prettierrc.json +18 -0
  135. package/schemas/CMakeLists.txt +15 -0
  136. package/schemas/README.md +1 -0
  137. package/schemas/_config.yml +7 -0
  138. package/schemas/controller_config_schema_1.json +343 -0
  139. package/schemas/controller_config_schema_2.json +685 -0
  140. package/schemas/layout_schema_2.json +440 -0
  141. package/schemas/preference_backend_schema_1.json +81 -0
  142. package/schemas/preference_backend_schema_2.json +118 -0
  143. package/schemas/preference_schema_1.json +410 -0
  144. package/schemas/preferences_schema_2.json +421 -0
  145. package/schemas/schemacompiler.c +200 -0
  146. package/schemas/snippet_schema_1.json +45 -0
  147. package/schemas/workspace_schema_1.json +573 -0
  148. package/scripts/make_colormaps.py +161 -0
package/README.md ADDED
@@ -0,0 +1,112 @@
1
+ # CARTA Frontend
2
+ The CARTA frontend is used in conjunction with the [CARTA backend](https://github.com/CARTAvis/carta-backend), and for general use a pre-built production frontend is usually installed alongside the backend automatically. However, a user may wish to install the frontend component separately in order to test beta versions, for example, or to develop it.
3
+
4
+ ## Pre-built production packages
5
+ The simplest way to install the frontend component is to use the pre-built production packages from NPM (for any OS with Node.js installed), our PPA (Debian packages for Ubuntu), or our RPM repository (for RHEL based systems).
6
+
7
+ ### NPM
8
+
9
+ Pre-built production frontends can be obtained from the [npmjs.com carta-frontend repository](https://www.npmjs.com/package/carta-frontend?activeTab=explore).
10
+
11
+ If you have Node.js and `npm` already installed on your system, you can install a production frontend using the following command:
12
+
13
+ ```
14
+ npm i carta-frontend
15
+ ```
16
+ The files will be installed to your `node-modules` directory. For a system-wide 'global' installation (using the `-g` flag) this is located at `/usr/lib/node_modules`, whereas for a local user installation, it is located at `$PWD/node_modules`.
17
+
18
+ You can install specific frontend versions by appending `@` plus the version number. For example,
19
+ ```
20
+ npm i carta-frontend@4.1.0
21
+ npm i carta-frontend@5.0.0-beta.1c
22
+ ```
23
+ The available versions are listed in the [npmjs.com carta-frontend versions tab](https://www.npmjs.com/package/carta-frontend?activeTab=versions).
24
+
25
+ Alternatively, the pre-built production frontend can be downloaded directly without npm. For example,
26
+ ```
27
+ wget https://registry.npmjs.org/carta-frontend/-/carta-frontend-5.0.0.tgz
28
+ ```
29
+ The standalone `tgz` archive file extracts as `package/build` in your current directory.
30
+
31
+ You can start the CARTA backend with a non-default frontend by specifying its location with the `--frontend_folder` flag. For example,
32
+ ```
33
+ ./carta-backend --frontend_folder $HOME/package/build
34
+ ```
35
+
36
+ ### PPA
37
+
38
+ A Personal Package Archive (PPA) is a third-party package repository for Ubuntu. We supply pre-built production frontends at the [CARTAvis-team PPA on the Ubuntu Lauchpad](https://launchpad.net/~cartavis-team/+archive/ubuntu/carta).
39
+
40
+ To install the latest release version:
41
+ ```
42
+ sudo add-apt-repository ppa:cartavis-team/carta
43
+ sudo apt-get update
44
+ sudo apt-get install carta-frontend
45
+ ```
46
+
47
+ The Ubuntu package install location for the frontend is `/usr/share/carta/frontend/`.
48
+
49
+ The PPA also provides a `carta` metapackage which automatically installs the CARTA frontend and backend packages. In addition to the latest release versions, beta versions are provided in a parallel set of packages.
50
+
51
+
52
+ ### RPM
53
+
54
+ RPMs are for users of Red Hat Enterprise Linux (RHEL) and other Red Hat-based Linux distributions, e.g. CentOS.
55
+ To install the latest release version, add the appropriate repository file depending on whether you are using RHEL8 (**el8**) or RHEL9 (**el9**):
56
+
57
+ ```
58
+ sudo curl https://packages.cartavis.org/cartavis-el8.repo --output /etc/yum.repos.d/cartavis.repo
59
+ ```
60
+ or
61
+ ```
62
+ sudo curl https://packages.cartavis.org/cartavis-el9.repo --output /etc/yum.repos.d/cartavis.repo
63
+ ```
64
+ Then the frontend component can be installed using `dnf` or `yum`:
65
+ ```
66
+ sudo dnf install carta-frontend
67
+ ```
68
+ The RPM package install location for the frontend is `/usr/share/carta/frontend/`.
69
+
70
+ The RPM repo also provides a `carta` metapackage which automatically installs the CARTA frontend and backend packages. In addition to the latest release versions, beta versions are provided in a parallel set of packages.
71
+
72
+
73
+ ## Development
74
+
75
+ If you wish to modify or develop the CARTA frontend, you may build a production or non-production frontend from source. Here are the instructions to do so:
76
+
77
+ ### Prerequisites
78
+
79
+ The build process relies heavily on `npm` and `nodejs`, so make sure they are installed and accessible.
80
+
81
+ We recommend using [Docker](https://www.docker.com) or [Singularity](https://apptainer.org/docs/) to perform WebAssembly compilation. If neither is available, the Emscripten compiler (`emcc` version 4.0.3 recommended) needs to be available in the build environment. Installation instructions are available on the [Emscripten homepage](https://emscripten.org/docs/getting_started/downloads.html).
82
+
83
+ ### Build process (using Docker/Singularity)
84
+ Initialise submodules and install package dependencies:
85
+ ```
86
+ git submodule update --init --recursive
87
+ npm install
88
+ ```
89
+ WebAssembly libraries can be built with `npm run build-libs-docker` or `npm run build-libs-singularity`.
90
+ Additional build steps (building WebAssembly wrappers, protocol buffer modules and compiling the Typescript code) are performed by `npm run build-docker` or `npm run build-singularity`. This produces a production build in the `build` folder.
91
+
92
+ To run a development build server, simply run `npm run start`.
93
+
94
+ ### Build process (without Docker/Singularity)
95
+ If your build environment does not have access to Docker or Singularity, WebAssembly compilation must be performed in an environment with access to the Emscripten compiler.
96
+
97
+ Initialise submodules and install package dependencies:
98
+ ```
99
+ git submodule update --init --recursive
100
+ npm install
101
+ ```
102
+
103
+ WebAssembly libraries can be built with `npm run build-libs`.
104
+ Additional build steps (building WebAssembly wrappers, protocol buffer modules and compiling the Typescript code) are performed by `npm run build`. This produces a production build in the `build` folder.
105
+
106
+ To run a development build server, simply run `npm run start`.
107
+
108
+ ## Developer documentation
109
+
110
+ Automatically generated documentation can be found at [cartavis.org/carta-frontend](https://cartavis.org/carta-frontend/).
111
+
112
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3377984.svg)](https://doi.org/10.5281/zenodo.3377984)
@@ -0,0 +1,10 @@
1
+ {
2
+ "presets": [
3
+ ["@babel/preset-env", { "targets": { "node": "current" } }],
4
+ ["@babel/preset-react", { "runtime": "automatic" }],
5
+ "@babel/preset-typescript"
6
+ ],
7
+ "plugins": [
8
+ ["@babel/plugin-proposal-decorators", { "legacy": true }]
9
+ ]
10
+ }
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,147 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
6
+ <meta name="theme-color" content="#000000">
7
+ <link rel="manifest" href="./manifest.json">
8
+ <link rel="shortcut icon" href="./carta_icon_128px.png">
9
+ <title>CARTA</title>
10
+ <style>
11
+ .static-text {
12
+ font-size: 14px;
13
+ font-weight: 400;
14
+ letter-spacing: 0;
15
+ line-height: 1.28581;
16
+ text-transform: none;
17
+ color: #182026;
18
+ font-family: -apple-system, "BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Open Sans", "Helvetica Neue", "Icons16", sans-serif;
19
+ }
20
+
21
+ .static-pre {
22
+ color: #182026;
23
+ font-size: 14px;
24
+ white-space: pre-line;
25
+ }
26
+
27
+ .static-overlay {
28
+ position: absolute;
29
+ top: 0;
30
+ bottom: 0;
31
+ left: 0;
32
+ right: 0;
33
+ margin: auto;
34
+ height: 400px;
35
+ width: 650px;
36
+ }
37
+
38
+ .loading-div {
39
+ width: 650px;
40
+ height: 400px;
41
+ background: #f5f8fa;
42
+ text-align: center;
43
+ padding: 15px;
44
+ box-shadow: 0 0 0 1px rgba(16, 22, 26, 0.1), 0 4px 8px rgba(16, 22, 26, 0.1), 0 18px 46px 6px rgba(16, 22, 26, 0.1);
45
+ border-radius: 6px;
46
+ border: 2px solid #5480b7;
47
+ box-sizing: border-box;
48
+ }
49
+
50
+ .static-spinner {
51
+ align-items: center;
52
+ display: flex;
53
+ justify-content: center;
54
+ vertical-align: middle;
55
+ margin: 20px;
56
+ }
57
+
58
+ .static-spinner-animation {
59
+ width: 30px;
60
+ height: 30px;
61
+ animation: static-spinner-animation .5s linear infinite;
62
+ }
63
+
64
+ @keyframes static-spinner-animation {
65
+ from {
66
+ -webkit-transform: rotate(0deg);
67
+ transform: rotate(0deg);
68
+ }
69
+ to {
70
+ -webkit-transform: rotate(360deg);
71
+ transform: rotate(360deg);
72
+ }
73
+ }
74
+
75
+ .static-spinner-track {
76
+ fill-opacity: 0;
77
+ stroke: rgba(92, 112, 128, .2);
78
+ stroke-width: 8px;
79
+ }
80
+
81
+ .static-spinner-head {
82
+ fill-opacity: 0;
83
+ stroke: rgba(43, 149, 214, .8);
84
+ stroke-width: 13px;
85
+ }
86
+
87
+ .loading-text {
88
+ animation: cssAnimation 5s forwards;
89
+ opacity: 0;
90
+ }
91
+
92
+ @keyframes cssAnimation {
93
+ 0% {
94
+ opacity: 0;
95
+ }
96
+ 90% {
97
+ opacity: 0;
98
+ }
99
+ 100% {
100
+ opacity: 1;
101
+ }
102
+ }
103
+ </style>
104
+ <script defer src="./static/js/546.b5841ade.js"></script><script defer src="./static/js/index.8fc34b4d.js"></script><link href="./static/css/546.aa44a897.css" rel="stylesheet"><link href="./static/css/index.c1f77b92.css" rel="stylesheet"></head>
105
+ <body>
106
+ <noscript>
107
+ You need to enable JavaScript to run this app.
108
+ </noscript>
109
+ <div id="root">
110
+ <div class="static-overlay">
111
+ <div class="loading-div">
112
+ <img src="./carta_logo.png" width="150" height="175" alt="CARTA">
113
+ <div class="static-spinner">
114
+ <div class="static-spinner-animation">
115
+ <svg width="30" height="30" viewBox="-1.67 -1.67 103.33 103.33">
116
+ <path
117
+ class="static-spinner-track"
118
+ d="M 50,50 m 0,-45 a 45,45 0 1 1 0,90 a 45,45 0 1 1 0,-90"
119
+ />
120
+ <path
121
+ class="static-spinner-head"
122
+ d="M 50,50 m 0,-45 a 45,45 0 1 1 0,90 a 45,45 0 1 1 0,-90"
123
+ pathLength="280"
124
+ stroke-dasharray="280 280"
125
+ stroke-dashoffset="210"
126
+ />
127
+ </svg>
128
+ </div>
129
+ </div>
130
+ <div class="loading-text">
131
+ <p class="static-text">
132
+ Loading CARTA. If this message does not disappear, please
133
+ <a href="https://refreshyourcache.com/en/cache/">hard-reload</a>
134
+ this site in your browser using the shortcut below:
135
+ </p>
136
+ <pre class="static-pre">
137
+ macOS : option + command + R (Safari)
138
+ macOS : shift + command + R (Chrome, Firefox)
139
+ Linux : shift + control + R
140
+ Windows : control + F5
141
+ </pre>
142
+ </div>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ </body>
147
+ </html>
@@ -0,0 +1,15 @@
1
+ {
2
+ "short_name": "CARTA",
3
+ "name": "CARTA Frontend",
4
+ "icons": [
5
+ {
6
+ "src": "carta_icon_128px.png",
7
+ "sizes": "128x128",
8
+ "type": "image/png"
9
+ }
10
+ ],
11
+ "start_url": "./index.html",
12
+ "display": "standalone",
13
+ "theme_color": "#000000",
14
+ "background_color": "#ffffff"
15
+ }
@@ -0,0 +1,3 @@
1
+ # https://www.robotstxt.org/robotstxt.html
2
+ User-agent: *
3
+ Disallow: