Giter Club home page Giter Club logo

module-plugin's People

Contributors

agrian-joel avatar dependabot[bot] avatar ni55an avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

module-plugin's Issues

[FR] make example more UF

https://codepen.io/Ni55aN/pen/QOEbEW

  1. [bug?] When I go into module1.rete and change Input ... to 9, and come back it's broken.. same for output.
  2. Select input in module, to choose Added module, not plain text.
  3. Edit module, with button on node Edit module, if it's selected, not the unstyled list on left.
  4. Choose name when adding with ADD, and auto-generate some ID for it. Maybe via context menu items feature?

endless loop protection

Now, there is no protection for a module calling itself in a loop. In some cases it should be allowed. So may be there could be an limit for calling x times in a loop, then exit.

module and rename module to 'index.rete'

It doesnt work on nodejs

Begin:

const { Socket, Engine, Component, Input } = require('rete/build/rete.min');

const ModulePlugin = require('rete-module-plugin');

After:

var engine = new Engine('[email protected]');

const modules = {
    test: { data: testData }
};

engine.use(ModulePlugin.default, {engine, modules});

Run process:

TypeError: Cannot read property 'worker' of undefined
    at n.<anonymous> (/Users/dev/overprint/api/node_modules/rete/build/rete.min.js:6:37894)
    at h (/Users/dev/overprint/api/node_modules/rete/build/rete.min.js:6:972)
    at Generator._invoke (/Users/dev/overprint/api/node_modules/rete/build/rete.min.js:6:760)
    at Generator.t.<computed> [as next] (/Users/dev/overprint/api/node_modules/rete/build/rete.min.js:6:1394)
    at u (/Users/dev/overprint/api/node_modules/rete/build/rete.min.js:6:6495)
    at o (/Users/dev/overprint/api/node_modules/rete/build/rete.min.js:6:6697)

How to load modules dynamically?

editor.use(ModulePlugin.default, { engine, modules });

I'm looking for a way to tell the engine that modules have been updated.

Peer dependency on outdated rete 1.1.0

I get the following error when installing this plugin:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
[...]
npm ERR! Found: [email protected]
npm ERR! node_modules/rete
npm ERR!   rete@"^1.4.5" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer rete@"1.1.0" from [email protected]
npm ERR! node_modules/rete-module-plugin
npm ERR!   rete-module-plugin@"*" from the root project

This is caused by this peer dependency which explicitly lists rete 1.1.0:

"rete": "1.1.0"

However, the latest rete is already at 1.4.5 at the time of writing.

Dynamic outputs with Module Plugin

Hi Ni55aN ! Thank you for the awesome lib!
I have a problem with a Module plugin. Maybe you can help me.

I create a Module node. Open the module (that links to the module node) and edit the content of the module (add some Inputs and Outputs).
And when i return to the main schema, the Module node dynamicly adds inputs and outpus to itself. Inputs of the Module node works good, but Outputs not. When i try to connect a socket of one of Outputs to an other socket of an other node, the connection line is appears but it can't connect to any other socket =(
When i manualy create an Output in a builder method of ModuleComponent class it works. But the dynamicly created outputs don't work.

the code of creating ModuleComponent:

class ModuleComponent extends Rete.Component {
    constructor(){
        super("Module");
        this.module = {
            nodeType: 'module'
        };

        this.render = 'vue';
        this.data.component = BaseNode; 
        this.data.props = {};
    }

    builder(node) {
        node.data.module = 'mod'+node.id;
        
        this.updateModuleSockets(node);
        node.update();

        return node            
    }

    change(node, item) {
        node.data.module = item;
        this.editor.trigger('process');
    }
}

the code of creating OutputComponent:

class OutputComponent extends Rete.Component {
    constructor(){
        super("Output");
        this.module = {
            nodeType: 'output',
            socket: numSocket
        };

        this.render = 'vue';
        this.data.component = BaseNode; 
        this.data.props = {}; // 
    }

    builder(node) {

        let inp  = new Rete.Input('input', "input", numSocket);
        node.data.name = 'in'+node.id;

        return node
            .addInput(inp)

    }
}

Thank you for any kind of help

Use with engine

Hello! Thank you for this project, I was wondering if you are able to use this plugin with the engine only? Currently If I try to run a module with modules in it from the editor JSON using only the engine then none of the module nodes are processed. If I have the module installed in the editor and the engine is running side by side, things work as expected. Is there something I am doing wrong on the engine side of things? The documentation is a bit fuzzy on this. Thanks again!

Module doesn't show when clicking another module - [React]

Hello, I started to play with this on react but it seems it doesn't work or maybe I'm using it wrong. Modules can't be changed when i click another module., you can see the nodes from main module are still on the view.

Step to reproduce:

  1. Create some Nodes
  2. Add more modules from the left button by clicking it.
  3. Click the new module from the list.

Expected result:
View should be empty.

codesandbox:
https://codesandbox.io/s/retejs-react-render-s77mv

Modules and tasks

I have a system which is reliant upon the task plugin to create branching run logic. I would also however like to use the module plugin.

Is there a way to do this presently, or a strategy you recommend, or should I fork the module plugin to modify for my uses?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.