funcnodes-react-flow 0.3.14__py3-none-any.whl → 0.3.16__py3-none-any.whl

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.
@@ -35,9 +35,11 @@ def get_react_plugin_content(key: str) -> ExpandedReactPlugin:
35
35
  if key not in FUNCNODES_REACT_PLUGIN:
36
36
  raise ValueError(f"React plugin {key} not found")
37
37
 
38
- with open(FUNCNODES_REACT_PLUGIN[key]["module"], "rb") as f:
39
- module = f.read()
40
- resp: ExpandedReactPlugin = {"js": [], "module": module, "css": []}
38
+ resp: ExpandedReactPlugin = {
39
+ "js": [],
40
+ "module": FUNCNODES_REACT_PLUGIN[key]["module"],
41
+ "css": [],
42
+ }
41
43
  if "js" in FUNCNODES_REACT_PLUGIN[key]:
42
44
  for js in FUNCNODES_REACT_PLUGIN[key]["js"]:
43
45
  with open(js, "rb") as f:
@@ -1,3 +1,4 @@
1
+ from types import ModuleType
1
2
  from typing import Dict
2
3
  from funcnodes_core import plugins
3
4
 
@@ -17,7 +18,7 @@ class ReactPlugin(plugins.BasePlugin):
17
18
  FUNCNODES_REACT_PLUGIN: Dict[str, ReactPlugin] = {}
18
19
 
19
20
 
20
- def add_react_plugin(name: str, plugin: ReactPlugin):
21
+ def add_react_plugin(module: ModuleType, plugin: ReactPlugin):
21
22
  """
22
23
  Add a React plugin to the FUNCNODES_REACT_PLUGIN dictionary.
23
24
 
@@ -25,7 +26,7 @@ def add_react_plugin(name: str, plugin: ReactPlugin):
25
26
  name (str): The name of the plugin.
26
27
  plugin (ReactPlugin): The plugin to add.
27
28
  """
28
- FUNCNODES_REACT_PLUGIN[str(name)] = plugin
29
+ FUNCNODES_REACT_PLUGIN[str(module)] = plugin
29
30
 
30
31
 
31
32
  def plugin_function(installed_module: plugins.InstalledModule):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: funcnodes-react-flow
3
- Version: 0.3.14
3
+ Version: 0.3.16
4
4
  Summary: funcnodes frontend for react flow
5
5
  License: AGPL-3.0
6
6
  Author: Julian Kimmig
@@ -1,6 +1,6 @@
1
- funcnodes_react_flow/__init__.py,sha256=7DAPV27u5aC9X98YIGIHu1bRRcMdKduHwg9tMTx0Ddc,1454
1
+ funcnodes_react_flow/__init__.py,sha256=poogHIDAyf8noWPCAtFm1LwijB0tNSetjU0OEZuaxRc,1425
2
2
  funcnodes_react_flow/__main__.py,sha256=79nKibsa_5l066OU4fpHnims30464ZZy-N18CGwb5Mk,834
3
- funcnodes_react_flow/plugin_setup.py,sha256=orrk4l4A69gGZsrYmLvP5WEQWc-5qzhwf0B9rlVHJ2Y,1060
3
+ funcnodes_react_flow/plugin_setup.py,sha256=gOmfuS0Opo6Cip5e0HilSquOl6Ur3Dwpc7_gFR_rSWI,1100
4
4
  funcnodes_react_flow/run.py,sha256=Eong6BUNms3BIxkpv4ILWSRN-STT-g5DZEpEYV0rj8I,512
5
5
  funcnodes_react_flow/static/android-chrome-192x192.png,sha256=h4hbdDXDtvScWqUT58h4E7HHUgdfqqGQq_M_O9cjS0c,21618
6
6
  funcnodes_react_flow/static/android-chrome-512x512.png,sha256=DrT8R6pyDlXCY8s3xK7XoI7kA9B_tauSHDvAEOGuhhs,109112
@@ -18,8 +18,8 @@ funcnodes_react_flow/static/logo192.png,sha256=XAIrH5_B6T77mW4eEP2emYcTkprrwuokS
18
18
  funcnodes_react_flow/static/logo512.png,sha256=9SEEPsgJusj_-fxvDf11ea2YpUKXOdLhSPT3DNRw9e8,65653
19
19
  funcnodes_react_flow/static/manifest.json,sha256=ULPYw5A68_eNhxuUVXqxT045yhkurKPSz6hjyGcnmhQ,492
20
20
  funcnodes_react_flow/static/robots.txt,sha256=kNJLw79pisHhc3OVAimMzKcq3x9WT6sF9IS4xI0crdI,67
21
- funcnodes_react_flow-0.3.14.dist-info/LICENSE,sha256=21Lj2q2SYKHMY4768_a3pr3q0jY2VYamAHipoodhMDc,34273
22
- funcnodes_react_flow-0.3.14.dist-info/METADATA,sha256=TMqg6ON8nh7mFdlSkcfIicPv9TGxJr2YIm3vchZKun8,819
23
- funcnodes_react_flow-0.3.14.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
24
- funcnodes_react_flow-0.3.14.dist-info/entry_points.txt,sha256=eXzH_hMr3HHg35s8Qw9fCT5NDAG2avZcxIdsCWgFWJo,148
25
- funcnodes_react_flow-0.3.14.dist-info/RECORD,,
21
+ funcnodes_react_flow-0.3.16.dist-info/LICENSE,sha256=21Lj2q2SYKHMY4768_a3pr3q0jY2VYamAHipoodhMDc,34273
22
+ funcnodes_react_flow-0.3.16.dist-info/METADATA,sha256=TvDXvzB1iayXkqUjbS2E9wQSAOteY_KuyM36T8FqF1Q,819
23
+ funcnodes_react_flow-0.3.16.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
24
+ funcnodes_react_flow-0.3.16.dist-info/entry_points.txt,sha256=eXzH_hMr3HHg35s8Qw9fCT5NDAG2avZcxIdsCWgFWJo,148
25
+ funcnodes_react_flow-0.3.16.dist-info/RECORD,,