0.9.1 • Published 2 months ago

@blackprint/sketch v0.9.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

https://user-images.githubusercontent.com/11073373/185776245-e883cadb-631e-497c-9fec-1de60098d4b1.mp4

Note

Please use Chromium based browser for better rendering performance.

Default Node's UI design was inspired by UE4 Blueprint and can be modified with HTML/CSS. If you're using Blackprint Editor you can choose different theme on the settings, and here's the code for reference if you want to create your own theme.

Documentation

Documentation is included in the editor, if you want to help contributing or modify you can fork the editor and modify files in this directory. Blackprint Engine and Sketch does have a TypeScript definition files, so if you working with TypeScript you may see a code suggestion in your code editor like Visual Studio Code.

Example

If you're looking for minimal sketch example to get started integrate for your editor project:

If you just want to execute exported Blackprint JSON, you can just use the engine. I also provide few simple example for different framework in case you want to use integrate to your frontend framework. For non-browser engine, there are example on it's repository. You can copy and paste the JSON to Blackprint Editor to see the nodes arrangement. The example below is using this arrangement.


Video Example:

  1. Build Telegram bot with Blackprint

https://github.com/Blackprint/Blackprint/assets/11073373/fe3d767b-e340-4371-8685-ef7a12709e0f

Available Shortcut for Blackprint Sketch

Mouse + KeyboardTouchscreenTargetDescription
LeftClick + move1 touch + moveContainerSelect nodes and cablebranch
Middle/Right click + move2 touch + moveContainerMove the container
Ctrl + MouseWheelRightClick + MouseWheel3 touch + moveContainerZoom the container
RightClicktap hold 1 secNode, Cable, ContainerContext menu
Ctrl + LeftClick-CableCreate cable branch
Ctrl + RightClick-Port, CableNode suggestion
Shift + LeftClick-PortDetach last connected cable

Available Shortcut for Blackprint Editor

Mouse + KeyboardTouchscreenTargetDescription
Ctrl + C-Selected NodeCopy nodes
Ctrl + V-Selected NodePaste copied nodes
Delete-Selected NodeDelete node
Ctrl + Alt + LeftClick-AnythingScarletsFrame's elementinspector (dev mode)

Blackprint Roadmap

This roadmap could be changed on the future, feel free to request feature or report an issue.

🚧 = Under development (In the current working plan) 🧪 = Experimental/Alpha stage (Being tested and may have rapid changes) ✖ = Not supported (Either it can't be implemented or it has better solution) ❔ = Should we add the feature? (Please start a discussion if you need it) - = Haven't been decided


With remote control you can easily manage connection to the target environment (Node.js/Python/etc) from the browser. Please always run your app inside of isolated container (like Docker) if you allow someone to remote control your system.

Example case where you may need remote control:

  • Creating Discord.js bot (because the library doesn't have support for browser)
    • Support for browser was dropped due to CORS at the Discord endpoint
  • Collaboratively work with your friend
  • Remotely modify your running application in runtime

  • Blackprint Sketch (this repository)
    • Mirrored sketch on detachable window
    • Mini sketch for preview
    • Hot Reload
    • Export single sketch to JSON
    • Importable minimal sketch for different project
    • Select and move multiple nodes at once
      • Bulk delete
      • Add feature to put nodes into a group
    • Clicked nodes should be moved on front of the other nodes (z-index)
    • Automatically put cable on suitable port when it's dropped on top of a node
    • Add feature to arrange cable (cable branching)
    • Add variable's node
    • Add feature to hide some unused port on a node
    • Add feature to import node skeleton (use default node, and no execution)
    • Create addons for VS Code for previewing exported Blackprint
      • Add JSON preview for Visual Studio Code
    • Add TypeScript definition file
  • Blackprint Editor (repository)
    • Online editor
    • Basic nodes editor
    • Detachable window and minimap
    • Add Environment Variables editor
    • Import sketch from URL
    • Move current sketch with minimap
    • Node list editor (right click and from side panel)
    • Error/log popup or overlay
    • Show overview or notice when importing nodes from URL
    • Multiple sketch workspaces or tabs
  • Auto blackprint.config.js import
  • Better documentation
    • Add in-editor node documentation in a tooltip
    • Nodes docs generator
    • Add TypeScript definition file
  • Blackprint Nodes Package Manager
    • Use NPM registry for Node.js/Deno/Browser

Currently the main focus is Blackprint for JavaScript. Blackprint Engine for PHP, Python, Golang, etc may follow the implementation of JavaScript version.

Other possible plan

Blackprint Engine:

  • Lua (because it's embeddable language)
  • Java (or maybe Kotlin)
  • Rust (may get removed from this list)
  • C++ (for Arduino if possible)
  • Zig (for Arduino if possible)

Some Note

Each engine may have different compatibilities. For the example:

  • WebAudio is only compatible in the browser.
  • Web server is not compatible in the browser.

Blackprint will act as an interface for each engine. To use it on NodeJS, Deno, or other JavaScript runtime, you can export it to JSON and use engine-js. But it doesn't mean exporting is just like a magic, you also need to write registerNode and registerInterface on the target engine. Except if someone already write the Blackprint Module (node and interface) on target engine, you can easily plug and play the module.

Contributing

To make things easier, please make sure to read the Contributing Guide before creating a issue/request.

If you want to compile and start the editor's web server on your machine, you can run the command below:

$ cd /your/project/folder
$ git clone --depth 1 --recurse-submodules https://github.com/Blackprint/Blackprint.git .

# You can also use npm or yarn instead of pnpm
$ pnpm i
$ npm start
 >> [Browsersync] Access URLs:
 >> -----------------------------------
 >> Local: http://localhost:6789
 >> -----------------------------------

Build and run the unit test

If you're trying to run the unit test, you can use npm run compile and then npm test.

$ cd /your/project/folder
$ git clone --depth 1 --recurse-submodules https://github.com/Blackprint/Blackprint.git .

# You can also use npm or yarn instead of pnpm
$ pnpm i
$ npm run compile
$ npm test

Stability

Breaking changes may happen every increment of v0.x.0, while v0.0.x usually will have new feature or bug fixes.

After version v1.0.0 any feature addition may have long delay before actually being merged. Feel free to request a feature or give a feedback at this moment.

License

Blackprint is a MIT licensed open source project and completely free to use.

But please consider sponsoring the people who work and contribute amount of effort to maintain and develop new features for this project. Because without their contribution, this project may get slowed down or possible to getting paused.

0.9.1

2 months ago

0.9.0

10 months ago

0.8.15

12 months ago

0.8.12

1 year ago

0.8.13

1 year ago

0.8.9

1 year ago

0.8.8

1 year ago

0.8.7

1 year ago

0.8.6

1 year ago

0.8.11

1 year ago

0.8.10

1 year ago

0.8.5

1 year ago

0.8.4

1 year ago

0.8.1

2 years ago

0.8.3

1 year ago

0.8.2

1 year ago

0.8.0

2 years ago

0.7.5

2 years ago

0.7.4

2 years ago

0.7.2

2 years ago

0.7.1

2 years ago

0.7.3

2 years ago

0.7.0

2 years ago

0.6.9

2 years ago

0.6.7

2 years ago

0.6.6

2 years ago

0.6.8

2 years ago

0.6.5

2 years ago

0.6.4

2 years ago

0.6.3

2 years ago

0.6.2

2 years ago

0.4.4

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.6.1

2 years ago

0.5.2

2 years ago

0.4.3

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.4.2

2 years ago

0.3.0

2 years ago

0.2.0

3 years ago