Skip to content

Commit

Permalink
feat: improve changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
pubuzhixing8 committed Jun 11, 2024
1 parent 8b0b4e6 commit 80ad388
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .changeset/chilly-moose-dance.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
'@plait/mind': minor
---

Framework agnostic refactoring:

1. Use `measureElement` to measure text width and height

2. Use `text-manage` in `@plait/common` to render text

3. Provide an overridable method `renderEmoji` in `@plait/mind` to remove the dependency on Angular and transform the response generator

4. Provide an overridable method `renderLabelIcon` in `@plait/flow` to remove the dependency on Angular and transform the response generator

---

Framework agnostic 改造:

1. 改用 `measureElement` 测量文本宽高
Expand Down
12 changes: 12 additions & 0 deletions .changeset/hip-ducks-do.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
'@plait/core': minor
---

Framework agnostic refactoring:

1. Reimplement text-manage in `@plait/common`, and remove the dependency on front-end frameworks such as Angular/React by providing an overridable method renderText

2. Provide an overridable method renderImage in `@plait/common`

3. Implement the `measureElement` method based on `canvas`, calculate the width and height of the text in Plait through the `measureText` API of `canvas`, and change all places that originally called `getTextSize` or `measureDivSize` to call `measureElement`

4. Move the part of `@plait/core` that depends on Angular to `@plait/angular-board`

---

Framework agnostic 改造:

1.`@plait/common` 中重新实现 text-manage,通过提供可重写方法 renderText 解除和 Angular/React 等前端框架的强依赖
Expand Down
4 changes: 4 additions & 0 deletions .changeset/moody-hounds-sleep.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
'@plait/text-plugins': minor
---

`@plait/text-plugins` is a split from the original `@plait/text` package, which mainly contains text-related plugins and general processing required by the Plait framework. `@plait/text-plugins` does not rely on any front-end framework

---

`@plait/text-plugins` 是原本的 `@plait/text` 包拆分出来,主要包含 Plait 框架需要的文本相关的插件和通用处理,`@plait/text-plugins` 不依赖任何前端框架
8 changes: 8 additions & 0 deletions .changeset/twelve-pillows-scream.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
'@plait/angular-text': minor
---

1. Rename package `@plait/text` to `@plait/angular-text`

2. Move some common processing and plugins into `@plait/text-plugins`

3. Rename `richtext` component to `text` component

---

1. 将包 `@plait/text` 重命名为 `@plait/angular-text`

2. 将一些通用处理和插件移入 `@plait/text-plugins`
Expand Down

0 comments on commit 80ad388

Please sign in to comment.