funcnodes-react-flow 0.3.7__tar.gz → 0.3.8__tar.gz

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 (26) hide show
  1. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/PKG-INFO +2 -2
  2. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/__init__.py +5 -1
  3. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/__main__.py +14 -11
  4. funcnodes_react_flow-0.3.8/funcnodes_react_flow/run.py +17 -0
  5. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/js/main.js +1 -1
  6. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/pyproject.toml +3 -2
  7. funcnodes_react_flow-0.3.7/funcnodes_react_flow/run.py +0 -15
  8. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/LICENSE +0 -0
  9. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/README.md +0 -0
  10. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/android-chrome-192x192.png +0 -0
  11. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/android-chrome-512x512.png +0 -0
  12. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/apple-touch-icon.png +0 -0
  13. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/asset-manifest.json +0 -0
  14. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/css/style.css +0 -0
  15. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/favicon-16x16.png +0 -0
  16. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/favicon-32x32.png +0 -0
  17. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/favicon.ico +0 -0
  18. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/index.html +0 -0
  19. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/js/830.js +0 -0
  20. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/js/830.js.LICENSE.txt +0 -0
  21. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/js/main.js.LICENSE.txt +0 -0
  22. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/logo.png +0 -0
  23. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/logo192.png +0 -0
  24. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/logo512.png +0 -0
  25. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/manifest.json +0 -0
  26. {funcnodes_react_flow-0.3.7 → funcnodes_react_flow-0.3.8}/funcnodes_react_flow/static/robots.txt +0 -0
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: funcnodes-react-flow
3
- Version: 0.3.7
3
+ Version: 0.3.8
4
4
  Summary: funcnodes frontend for react flow
5
5
  License: AGPL-3.0
6
6
  Author: Julian Kimmig
7
7
  Author-email: julian.kimmig@linkdlab.de>
8
8
  Requires-Python: >=3.11
9
9
  Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
10
- Requires-Dist: funcnodes (>=0.5.25)
10
+ Requires-Dist: funcnodes (>=0.5.25) ; sys_platform != "emscripten"
11
11
  Requires-Dist: funcnodes-core (>=0.3.8)
12
12
  Project-URL: Homepage, https://github.com/Linkdlab/funcnodes_react_flow
13
13
  Project-URL: download, https://pypi.org/project/funcnodes-react-flow/#files
@@ -1,5 +1,9 @@
1
1
  from typing import Dict, TypedDict, List
2
- from .run import run_server # noqa: F401
2
+
3
+ try:
4
+ from .run import run_server # noqa: F401
5
+ except ImportError:
6
+ pass
3
7
 
4
8
 
5
9
  class ReactPlugin(TypedDict):
@@ -1,11 +1,6 @@
1
- from .run import run_server
2
- import funcnodes as fn
3
1
  import argparse
4
-
5
- try:
6
- from setproctitle import setproctitle
7
- except ModuleNotFoundError:
8
- setproctitle = print
2
+ import os
3
+ import sys
9
4
 
10
5
 
11
6
  def main():
@@ -19,25 +14,33 @@ def main():
19
14
  >>> main()
20
15
  None
21
16
  """
17
+
22
18
  parser = argparse.ArgumentParser(description="Funcnodes React Cli.")
23
19
 
24
20
  parser.add_argument(
25
21
  "--port",
26
- default=fn.config.CONFIG["frontend"]["port"],
22
+ default=None,
27
23
  help="Port to run the server on",
28
24
  type=int,
29
25
  )
30
26
  parser.add_argument(
31
27
  "--no-browser",
32
- action="store_false",
28
+ action="store_true",
33
29
  help="Open the browser after starting the server",
34
30
  )
35
31
 
36
32
  args = parser.parse_args()
33
+ cmd = sys.executable + " -m funcnodes runserver"
34
+ if args.port:
35
+ cmd += f" --port {args.port}"
36
+ if args.no_browser:
37
+ cmd += " --no-browser"
38
+
39
+ os.system(cmd)
37
40
 
38
- setproctitle("funcnodes_server")
39
- run_server(port=args.port, open_browser=args.no_browser)
40
41
 
42
+ # "@mui/icons-material": "^5.15.18",
43
+ # "@mui/material": "^5.15.18"
41
44
 
42
45
  if __name__ == "__main__":
43
46
  main()
@@ -0,0 +1,17 @@
1
+ import os
2
+
3
+ try:
4
+ from funcnodes.runner import BaseServer
5
+
6
+ class FuncnodesreactflowServer(BaseServer):
7
+ STATIC_PATH = os.path.join(os.path.dirname(__file__), "static")
8
+ STATIC_URL = "/static"
9
+
10
+ async def index(self, request):
11
+ request.match_info["filename"] = "index.html"
12
+ return await self.serve_static_file(request)
13
+
14
+ def run_server(**kwargs):
15
+ return FuncnodesreactflowServer.run_server(**kwargs)
16
+ except (ImportError, ModuleNotFoundError):
17
+ pass