chore: bump version 3.0.0

This commit is contained in:
Lucas.Xu 2024-06-19 16:48:38 +08:00
commit 57824fff9c
4 changed files with 17 additions and 10 deletions

View file

@ -1,3 +1,12 @@
## 3.0.0
* refactor: separated determineTextDirection function by @zoli in [#809](https://github.com/AppFlowy-IO/appflowy-editor/pull/809)
* fix: markdown to document with image url having properties after extension by @stevenosse in [#795](https://github.com/AppFlowy-IO/appflowy-editor/pull/795)
* fix: incorrect cursor position after new line by @LucasXu0 in [#817](https://github.com/AppFlowy-IO/appflowy-editor/pull/817)
* feat: command improvement by @Xazin in [#825](https://github.com/AppFlowy-IO/appflowy-editor/pull/825)
* fix: content jumping down and scrolling getting locked by @MayurSMahajan in [#821](https://github.com/AppFlowy-IO/appflowy-editor/pull/821)
* fix: underscore markdown syntax assertion by @LucasXu0 in [#826](https://github.com/AppFlowy-IO/appflowy-editor/pull/826)
* fix: cursor height is inconsistent after upgrading to Flutter 3.22 by @LucasXu0 in [#827](https://github.com/AppFlowy-IO/appflowy-editor/pull/827)
## 2.5.1
* chore: upgrade Flutter to 3.22.0 by @LucasXu0 in [797](https://github.com/AppFlowy-IO/appflowy-editor/pull/797)

View file

@ -33,14 +33,14 @@ class TextInsert extends TextOperation {
int get length => text.length;
@override
Attributes? get attributes => _attributes != null ? {..._attributes!} : null;
Attributes? get attributes => _attributes != null ? {..._attributes} : null;
@override
Map<String, dynamic> toJson() {
final result = <String, dynamic>{
'insert': text,
};
if (_attributes != null && _attributes!.isNotEmpty) {
if (_attributes != null && _attributes.isNotEmpty) {
result['attributes'] = attributes;
}
return result;
@ -70,14 +70,14 @@ class TextRetain extends TextOperation {
final Attributes? _attributes;
@override
Attributes? get attributes => _attributes != null ? {..._attributes!} : null;
Attributes? get attributes => _attributes != null ? {..._attributes} : null;
@override
Map<String, dynamic> toJson() {
final result = <String, dynamic>{
'retain': length,
};
if (_attributes != null && _attributes!.isNotEmpty) {
if (_attributes != null && _attributes.isNotEmpty) {
result['attributes'] = attributes;
}
return result;

View file

@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:flutter/material.dart';
typedef CommandShortcutEventHandler = KeyEventResult Function(
EditorState editorState,
@ -56,8 +55,7 @@ class CommandShortcutEvent {
List<Keybinding> get keybindings => _keybindings;
List<Keybinding> _keybindings = [];
String? get description =>
_getDescription != null ? _getDescription!() : null;
String? get description => _getDescription != null ? _getDescription() : null;
/// This _completely_ clears the command, ensuring that
/// it cannot be triggered until it is updated again.

View file

@ -1,6 +1,6 @@
name: appflowy_editor
description: A highly customizable rich-text editor for Flutter. The AppFlowy Editor project for AppFlowy and beyond.
version: 2.5.1
version: 3.0.0
homepage: https://github.com/AppFlowy-IO/appflowy-editor
topics:
@ -18,7 +18,7 @@ platforms:
web:
environment:
sdk: ">=3.1.5 <4.0.0"
sdk: ">=3.4.0 <4.0.0"
flutter: ">=3.22.0"
dependencies: