open-index/open-npm huggingface dataset:
npm package: @plait/angular-text
Description: Text processing implementation, supports commonly used rich text formats, such as font size, color, bold, italics, etc.
Latest version: 0.93.1

# @plait/angular-text

Text processing implementation, supports commonly used rich text formats, such as font size, color, bold, italics, etc.

### Dependence

- `slate`
- `slate-angular`
-  `@plait/core`
npm package: @plait/common
Description: Common logic for drawing plugins. When writing drawing business code, if you find that there is some reusable logic between plugins, such as text processing, graphics rendering, image rendering, Resize interaction, Creation interaction, etc., try to write
Latest version: 0.93.1

# @plait/common


Common logic for drawing plugins. When writing drawing business code, if you find that there is some reusable logic between plugins, such as text processing, graphics rendering, image rendering, Resize interaction, Creation interaction, etc., try to write the code in `@plait /common` for easy reuse.

`core` core logic, currently mainly places the base class of plugin components

`generators` Generator is an abstract concept, mainly used for plug-in component rendering and management of drawing elements, 👉 [View more](https://plait-docs.pages.dev/guides/concepts/generator)

`plugins` places reusable plugin logic

`transforms` Common data processing logic

#### Dependence
- `@plait/core`
npm package: @plait/core
Description: [中文](https://github.com/worktile/plait/blob/develop/packages/core/README.zh-CN.md)
Latest version: 0.93.1

## @plait/core

[中文](https://github.com/worktile/plait/blob/develop/packages/core/README.zh-CN.md)


The Plait framework core library includes core data model, data transformation functions, plugin mechanisms, etc. In addition, it also includes plugin element rendering base class and board components containing basic whiteboard interactions.



> Currently @plait/core takes on too many responsibilities, including the core data model, plugin mechanism, the bridging layer of the front-end framework layer, and some basic drawing-related plugins, because currently it only needs some basic drawing board requirements (such as frame selection, dragging and moving element positions) will all be in the core, and more detailed package divisions may be considered in the future.



####   **Basic whiteboard functions**

1. Provide a drawing board component (based on Angular)
1. Zoom in, zoom out, and drag the canvas
1. Integrated canvas scrolling solution
1. Undo, redo
1. Click/drag to select elements
1. Drag to adjust element position
1. Theme plan




#### **Design ideas**

Plait is a framework designed for all-in-one whiteboard tool, its core is plugin mechanism and data model. The plugin mechanism is the external manifestation, it allows developers to extend the functionality of the whiteboard in the form of plugins. The framework provides the necessary extension bridges and communication mechanisms to serve plugin development. The data model is the kernel, providing definitions for data and functions for data operation, and is the internal representation of the plugin.


**Plugin mechanism**

The plugin mechanism builds an extension bridge based on override methods. It currently supports custom interaction and custom rendering. In terms of custom interaction, plait/core currently directly defines basic DOM events as override methods in the most primitive way, such as: PointerDown, pointerUp, pointerMove, keyDown, keyUp, etc. do not have too many business-level encapsulations. Custom rendering currently supports extending the rendering of plugins in the form of Angular components.



**Data Model**

Mainly provides the following capabilities:

1. Provide basic data model
1. Provide atomic-based data change methods (Transforms)
1. Based on immutable data model (based on Immer)
1. Provide a Change mechanism to cooperate with the framework to complete data-driven rendering.
1. Integrated with the plugin mechanism, the data modification process can be intercepted and processed




**Standard data flow**

![data flow](https://github.com/worktile/plait/blob/develop/.docgeni/public/assets/packages/data-flow.png?raw=true)



#### **Architecture diagram**

![architecture diagram](https://github.com/worktile/plait/blob/develop/.docgeni/public/assets/packages/architecture-diagram.png?raw=true)


#### Dependence

- `roughjs`
- `is-hotkey`
npm package: @plait/flow
Description: Node-based process visualization display and configuration plugin, highly customizable, benchmarked against x-flow.
Latest version: 0.93.1

# @plait/flow

Node-based process visualization display and configuration plugin, highly customizable, benchmarked against x-flow.

### Dependence

- `@plait/core`
- `@plait/common`
- `@plait/text`
npm package: @plait/layouts
Description: It is used to implement the mind map automatic layout algorithm. Based on an independent algorithm, the mind map node layout logic can be decoupled from other functions. The automatic layout algorithm only focuses on the location distribution of nodes.
Latest version: 0.93.1

# @plait/layouts

It is used to implement the mind map automatic layout algorithm. Based on an independent algorithm, the mind map node layout logic can be decoupled from other functions. The automatic layout algorithm only focuses on the location distribution of nodes.


**Layout Classification**

1. Logical layout
1. Standard layout
1. Indent layout
1. Layout nesting


> Timeline and fishbone are not supported yet



**Algorithm Implementation**

The layout algorithm in this library mainly refers to the implementation ideas in the paper [Drawing Non-layered Tidy Trees in Linear Time], and has been appropriately transformed. The abstraction of nodes also follows the abstract implementation in the paper.

### Reference

For the paper, see: [https://github.com/Klortho/d3-flextree/tree/master/papers]()


open source library: [https://github.com/leungwensen/mindmap-layouts](https://github.com/leungwensen/mindmap-layouts)
npm package: @plait/mind
Description: Implementation of the core logic of the mind map plugin.
Latest version: 0.93.1

## @plait/mind
Implementation of the core logic of the mind map plugin.



**Basic functions**

1. Layout: logical layout, standard layout, indented layout
1. Node quick creation (Tab, Enter), deletion (Delete, Backspace)
1. Node theme text editing
1. Expand and collapse nodes
1. Copy and paste nodes
1. Insert pictures
1. Insert Emoji
1. Node Abstract
1. Color theme
1. Width adjustment
1. Multiple main topics


> @plait/mind The core only includes data rendering and core interaction implementation, and does not include interface-based interaction implementations such as toolbars and attribute settings. Because these functions depend on specific interface styles (the plug-in layer does not want to introduce UI libraries), we The design tends to leave this part of the function to the user for custom implementation, and the plugin layer only provides event support and special configuration support.



#### Dependence
- `@plait/core`
- `@plait/common`
- `@plait/text`
- `@plait/layouts`