Giter Site home page Giter Site logo

kendrickcheung007 / plait Goto Github PK

View Code? Open in Web Editor NEW

This project forked from worktile/plait

0.0 0.0 0.0 10.63 MB

A completely customizable framework for building all-in-one drawing whiteboards

Home Page: https://plait-docs.vercel.app

License: MIT License

Shell 0.02% JavaScript 0.82% TypeScript 86.70% HTML 11.17% SCSS 1.29%

plait's Introduction

Plait logo and name

Total Downloads

A modern drawing framework for building all-in-one whiteboard tools
such as mind maps, flow charts, hand writing, etc.

Plait is positioned as a drawing framework that provides a plugin mechanism, allowing developers to extend functionality through plugins. It only provides a basic drawing whiteboard at the bottom, which only includes basic functions such as zooming in, zooming out, and moving the canvas. It does not include any business functions. All business functions need to be expanded through plugins to achieve free combination and can be easily implemented independently. Or an all-in-one drawing tool.

中文文档

Plait will also provide some basic functional plugins, which have been implemented so far:

  • Mind plugin

  • Draw plugin

  • Flow plugin

Plait architecture is inspired by the rich text editor framework Slate and is used for web-side interactive drawing business development.

online demo screen

Features

  • Provide basic drawing board capabilities
  • Plugin mechanism
  • Data model (supports collaboration)
  • Component-based development (currently only supports Angular framework)
  • Basic drawing tool functions

Packages

Package Name Description
@plait/core Core of the framework: 1. Plugin mechanism 2. Provide data model and transform functions 3. Provide basic board components
@plait/common Some logic reused by different drawing plugins: 1. Basic tool functions 2. Basic plugins 3. Basic rendering logic
@plait/text Text support, dependent on packages slate and slate-angular
@plait/mind Mind plugin implementation, based on an independent automatic layout algorithm, currently supports: logical layout, standard layout, indented layout
@plait/draw Flowchart plugin implementation, including interactive creation and modification of basic graphics, standard flowchart graphics, connections, free pictures and other elements
@plait/flow Flow plugin, which can be used for visual configuration of process status
@plait/layouts Mind support library, including automatic layout algorithms

Who is using

Development

npm i

npm run build

npm run start

Usage

Basic usage (integrated @plait/mind plugin)

HTML:

<plait-board [plaitPlugins]="plugins" [plaitValue]="value"
    (plaitBoardInitialized)="plaitBoardInitialized($event)" (plaitChange)="change($event)">
</plait-board>

TS:

// .ts
@Component({
  selector: 'board-basic',
  templateUrl: './board-basic.component.html',
  host: {
    class: 'board-basic-container',
  },
})
export class BasicBoardComponent {
  plugins = [withMind];

  value: PlaitElement[] = demoData;

  board!: PlaitBoard;

  change(event: PlaitBoardChangeEvent) {
    // console.log(event.children);
  }

  plaitBoardInitialized(value: PlaitBoard) {
    this.board = value;
  }
}

For more detailed examples refer to: https://github.com/pubuzhixing8/plait-basic

Thanks

Contributing

Everyone is welcome to contribute to Plait and build a new generation of drawing framework together. Any Issue or PR is acceptable, and we hope to get your ⭐️ support.

LICENSE

MIT License

plait's People

Contributors

pubuzhixing8 avatar wbbug avatar huanhuanwa avatar aaaaaajie avatar maple13 avatar ashy6 avatar xinglu01 avatar misslixf avatar why520crazy avatar

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.