-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgraded rollup and added TS support * Conversion in-progress * Converted toasts reducer to TS * Adds Toaster.tsx & css module support * Converted context and textInput * Converted cache, commentsReducer, constants, stageReducer * Updated connectionCalculator * Converted Draggable component * Converted Checkbox * Converted connections container * Converted Connection * Converted ContextMenu * Converted Select * Converted NodesReducer & Control * Converted Comment * Converted Stage * Converted Color Picker * Converted IoPorts * Tightened up typebuilder types * Converted Node * Converted NodeEditor * Stage cleanup * Converted root engine * Added basic documentation on types * port type builder config is now optional * v1.0.0-0 * Fixed types for control builders * Moved useRootEngine to its own file * v1.0.1-0 * Exported colors object now autocompletes correctly * Context is now an optional prop of useRootEngine * v1.0.2-0 * Fixed type for custom render functions * v1.0.2-1 * v1.0.2-2 * Lightened default theme and updated docs * Fixed bug preventing color picker * Published 1.0.2-3 * v1.0.2-4 --------- Co-authored-by: Christopher Patty <[email protected]>
- Loading branch information
1 parent
0688486
commit a806bfa
Showing
94 changed files
with
3,953 additions
and
4,964 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
{ | ||
"presets": [ | ||
["env", { | ||
"modules": false | ||
}], | ||
"stage-0", | ||
"react" | ||
] | ||
} | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"modules": false | ||
} | ||
], | ||
"@babel/preset-typescript", | ||
"@babel/preset-react" | ||
], | ||
"plugins": ["@babel/plugin-transform-runtime"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"editor.formatOnSave": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import React from "react"; | ||
import "normalize.css"; | ||
|
||
import { Controls, FlumeConfig, NodeEditor } from "node-editor"; | ||
|
||
const Log = console.log; | ||
|
||
const config = new FlumeConfig() | ||
.addPortType({ | ||
type: "number", | ||
name: "number", | ||
label: "Number", | ||
controls: [ | ||
Controls.number({ | ||
name: "number" | ||
}) | ||
] | ||
}) | ||
.addNodeType({ | ||
type: "number", | ||
label: "Number", | ||
initialWidth: 150, | ||
inputs: ports => [ports.number()], | ||
outputs: ports => [ports.number()] | ||
}) | ||
.addNodeType({ | ||
type: "addNumbers", | ||
label: "Add Numbers", | ||
initialWidth: 150, | ||
inputs: ports => [ | ||
ports.number({ | ||
name: "num1" | ||
}), | ||
ports.number({ | ||
name: "num2" | ||
}) | ||
], | ||
outputs: ports => [ | ||
ports.number({ | ||
name: "result" | ||
}) | ||
] | ||
}); | ||
|
||
const TestEditor = () => { | ||
const [output, setOutput] = React.useState<string | undefined>(); | ||
|
||
React.useEffect(() => { | ||
console.log = log => { | ||
Log(log); | ||
if (typeof log === "object") { | ||
setOutput(JSON.stringify(log)); | ||
} | ||
}; | ||
return () => { | ||
console.log = Log; | ||
}; | ||
}); | ||
return ( | ||
<div className="wrapper" style={{ width: 800, height: 600 }}> | ||
<NodeEditor | ||
portTypes={config.portTypes} | ||
nodeTypes={config.nodeTypes} | ||
nodes={{}} | ||
debug | ||
/> | ||
<div id="OUTPUT" style={{ display: "none" }}> | ||
{output} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default TestEditor; |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.