From 41403cbe1c1a39dfa039b3504eb694e7c537186d Mon Sep 17 00:00:00 2001 From: Ellet Date: Mon, 22 Jan 2024 16:06:22 +0300 Subject: [PATCH] Prepare to release 9.2.10 --- CHANGELOG.md | 5 +++++ dart_quill_delta/CHANGELOG.md | 5 +++++ dart_quill_delta/pubspec.yaml | 2 +- flutter_quill_extensions/CHANGELOG.md | 5 +++++ flutter_quill_extensions/pubspec.yaml | 2 +- flutter_quill_test/CHANGELOG.md | 5 +++++ flutter_quill_test/pubspec.yaml | 2 +- lib/flutter_quill.dart | 4 ---- lib/src/models/documents/nodes/block.dart | 4 ++-- lib/src/models/documents/nodes/container.dart | 13 +++++++++---- lib/src/models/documents/nodes/line.dart | 2 +- lib/src/models/documents/nodes/node.dart | 6 +++--- lib/src/widgets/editor/editor.dart | 8 ++++---- lib/src/widgets/others/box.dart | 2 +- lib/src/widgets/quill/text_line.dart | 2 +- pubspec.yaml | 2 +- quill_html_converter/CHANGELOG.md | 5 +++++ quill_html_converter/pubspec.yaml | 2 +- quill_pdf_converter/CHANGELOG.md | 5 +++++ quill_pdf_converter/pubspec.yaml | 2 +- version.dart | 2 +- 21 files changed, 58 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1cb003e..59e1cdce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## 9.2.10 +* Update example screenshots +* Refactor `Container` to `QuillContainer` with backward compatibility +* A workaround fix in history feature + ## 9.2.9 * Refactor the type of `Delta().toJson()` to be more clear type diff --git a/dart_quill_delta/CHANGELOG.md b/dart_quill_delta/CHANGELOG.md index b1cb003e..59e1cdce 100644 --- a/dart_quill_delta/CHANGELOG.md +++ b/dart_quill_delta/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## 9.2.10 +* Update example screenshots +* Refactor `Container` to `QuillContainer` with backward compatibility +* A workaround fix in history feature + ## 9.2.9 * Refactor the type of `Delta().toJson()` to be more clear type diff --git a/dart_quill_delta/pubspec.yaml b/dart_quill_delta/pubspec.yaml index ae0fca99..491899ad 100644 --- a/dart_quill_delta/pubspec.yaml +++ b/dart_quill_delta/pubspec.yaml @@ -1,6 +1,6 @@ name: dart_quill_delta description: A port of quill-js-delta from typescript to dart -version: 9.2.9 +version: 9.2.10 homepage: https://github.com/singerdmx/flutter-quill/tree/master/dart_quill_delta/ repository: https://github.com/singerdmx/flutter-quill/tree/master/dart_quill_delta/ issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ diff --git a/flutter_quill_extensions/CHANGELOG.md b/flutter_quill_extensions/CHANGELOG.md index b1cb003e..59e1cdce 100644 --- a/flutter_quill_extensions/CHANGELOG.md +++ b/flutter_quill_extensions/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## 9.2.10 +* Update example screenshots +* Refactor `Container` to `QuillContainer` with backward compatibility +* A workaround fix in history feature + ## 9.2.9 * Refactor the type of `Delta().toJson()` to be more clear type diff --git a/flutter_quill_extensions/pubspec.yaml b/flutter_quill_extensions/pubspec.yaml index 6cc7bb3c..2178b22f 100644 --- a/flutter_quill_extensions/pubspec.yaml +++ b/flutter_quill_extensions/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill_extensions description: Embed extensions for flutter_quill including image, video, formula and etc. -version: 9.2.9 +version: 9.2.10 homepage: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_extensions/ repository: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_extensions/ issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ diff --git a/flutter_quill_test/CHANGELOG.md b/flutter_quill_test/CHANGELOG.md index b1cb003e..59e1cdce 100644 --- a/flutter_quill_test/CHANGELOG.md +++ b/flutter_quill_test/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## 9.2.10 +* Update example screenshots +* Refactor `Container` to `QuillContainer` with backward compatibility +* A workaround fix in history feature + ## 9.2.9 * Refactor the type of `Delta().toJson()` to be more clear type diff --git a/flutter_quill_test/pubspec.yaml b/flutter_quill_test/pubspec.yaml index e2cc8db2..159d2cf1 100644 --- a/flutter_quill_test/pubspec.yaml +++ b/flutter_quill_test/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill_test description: Test utilities for flutter_quill which includes methods to simplify interacting with the editor in test cases. -version: 9.2.9 +version: 9.2.10 homepage: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_test/ repository: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_test/ issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ diff --git a/lib/flutter_quill.dart b/lib/flutter_quill.dart index 40d2d4be..acfb7f7e 100644 --- a/lib/flutter_quill.dart +++ b/lib/flutter_quill.dart @@ -1,7 +1,5 @@ library flutter_quill; -import 'src/models/documents/nodes/container.dart'; - export '/src/widgets/raw_editor/quill_single_child_scroll_view.dart'; export 'src/extensions/quill_configurations_ext.dart'; export 'src/models/config/quill_configurations.dart'; @@ -39,5 +37,3 @@ export 'src/widgets/toolbar/buttons/alignment/select_alignment_button.dart'; export 'src/widgets/toolbar/buttons/hearder_style/select_header_style_dropdown_button.dart'; export 'src/widgets/toolbar/simple_toolbar.dart'; export 'src/widgets/utils/provider.dart'; - -typedef QuillContainer = Container; diff --git a/lib/src/models/documents/nodes/block.dart b/lib/src/models/documents/nodes/block.dart index c135543d..d73201f0 100644 --- a/lib/src/models/documents/nodes/block.dart +++ b/lib/src/models/documents/nodes/block.dart @@ -13,7 +13,7 @@ import 'node.dart'; /// - Text Alignment /// - Text Direction /// - Code Block -base class Block extends Container { +base class Block extends QuillContainer { /// Creates new unmounted [Block]. @override Node newInstance() => Block(); @@ -47,7 +47,7 @@ base class Block extends Container { block.previous is Block && prev!.style == block.style) { block - ..moveChildToNewParent(prev as Container?) + ..moveChildToNewParent(prev as QuillContainer?) ..unlink(); block = prev as Block; } diff --git a/lib/src/models/documents/nodes/container.dart b/lib/src/models/documents/nodes/container.dart index f5f1900d..bc52adb6 100644 --- a/lib/src/models/documents/nodes/container.dart +++ b/lib/src/models/documents/nodes/container.dart @@ -6,6 +6,11 @@ import 'leaf.dart'; import 'line.dart'; import 'node.dart'; +@Deprecated('Please use QuillContainer instead') + +/// For backward compatibility +abstract base class Container extends QuillContainer {} + /// Container can accommodate other nodes. /// /// Delegates insert, retain and delete operations to children nodes. For each @@ -14,7 +19,7 @@ import 'node.dart'; /// /// Most of the operation handling logic is implemented by [Line] /// and [QuillText]. -abstract base class Container extends Node { +abstract base class QuillContainer extends Node { final LinkedList _children = LinkedList(); /// List of children. @@ -64,7 +69,7 @@ abstract base class Container extends Node { } /// Moves children of this node to [newParent]. - void moveChildToNewParent(Container? newParent) { + void moveChildToNewParent(QuillContainer? newParent) { if (isEmpty) { return; } @@ -154,7 +159,7 @@ abstract base class Container extends Node { String toString() => _children.join('\n'); } -/// Result of a child query in a [Container]. +/// Result of a child query in a [QuillContainer]. class ChildQuery { ChildQuery(this.node, this.offset); @@ -163,7 +168,7 @@ class ChildQuery { /// Starting offset within the child [node] which points at the same /// character in the document as the original offset passed to - /// [Container.queryChild] method. + /// [QuillContainer.queryChild] method. final int offset; /// Returns `true` if there is no child node found, e.g. [node] is `null`. diff --git a/lib/src/models/documents/nodes/line.dart b/lib/src/models/documents/nodes/line.dart index c26b3f00..6fe3809b 100644 --- a/lib/src/models/documents/nodes/line.dart +++ b/lib/src/models/documents/nodes/line.dart @@ -19,7 +19,7 @@ import 'node.dart'; /// /// When a line contains an embed, it fully occupies the line, no other embeds /// or text nodes are allowed. -base class Line extends Container { +base class Line extends QuillContainer { @override Leaf get defaultChild => QuillText(); diff --git a/lib/src/models/documents/nodes/node.dart b/lib/src/models/documents/nodes/node.dart index 49a346ef..0ef7c10a 100644 --- a/lib/src/models/documents/nodes/node.dart +++ b/lib/src/models/documents/nodes/node.dart @@ -19,7 +19,7 @@ import 'line.dart'; /// considered [mounted] when the [parent] property is not `null`. abstract base class Node extends LinkedListEntry { /// Current parent of this node. May be null if this node is not mounted. - Container? parent; + QuillContainer? parent; /// The style attributes /// Note: This is not the same as style attribute of css @@ -141,12 +141,12 @@ abstract base class Node extends LinkedListEntry { } /// Root node of document tree. -base class Root extends Container> { +base class Root extends QuillContainer> { @override Node newInstance() => Root(); @override - Container get defaultChild => Line(); + QuillContainer get defaultChild => Line(); @override Delta toDelta() => children diff --git a/lib/src/widgets/editor/editor.dart b/lib/src/widgets/editor/editor.dart index df8040e1..c2f4d982 100644 --- a/lib/src/widgets/editor/editor.dart +++ b/lib/src/widgets/editor/editor.dart @@ -1503,7 +1503,7 @@ class RenderEditableContainerBox extends RenderBox RenderBoxContainerDefaultsMixin { RenderEditableContainerBox({ - required container_node.Container container, + required container_node.QuillContainer container, required this.textDirection, required this.scrollBottomInset, required EdgeInsetsGeometry padding, @@ -1514,15 +1514,15 @@ class RenderEditableContainerBox extends RenderBox addAll(children); } - container_node.Container _container; + container_node.QuillContainer _container; TextDirection textDirection; EdgeInsetsGeometry _padding; double scrollBottomInset; EdgeInsets? _resolvedPadding; - container_node.Container get container => _container; + container_node.QuillContainer get container => _container; - void setContainer(container_node.Container c) { + void setContainer(container_node.QuillContainer c) { if (_container == c) { return; } diff --git a/lib/src/widgets/others/box.dart b/lib/src/widgets/others/box.dart index 85dc8dff..8787763d 100644 --- a/lib/src/widgets/others/box.dart +++ b/lib/src/widgets/others/box.dart @@ -38,7 +38,7 @@ abstract class RenderContentProxyBox implements RenderBox { /// [RenderContentProxyBox]. abstract class RenderEditableBox extends RenderBox { /// The document node represented by this render box. - Container get container; + QuillContainer get container; /// Returns preferred line height at specified `position` in text. /// diff --git a/lib/src/widgets/quill/text_line.dart b/lib/src/widgets/quill/text_line.dart index 0889d8aa..e03e5ae8 100644 --- a/lib/src/widgets/quill/text_line.dart +++ b/lib/src/widgets/quill/text_line.dart @@ -895,7 +895,7 @@ class RenderEditableTextLine extends RenderEditableBox { } @override - container_node.Container get container => line; + container_node.QuillContainer get container => line; double get cursorWidth => cursorCont.style.width; diff --git a/pubspec.yaml b/pubspec.yaml index 1aafeac8..97b9c566 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor built for the modern Android, iOS, web and desktop platforms. It is the WYSIWYG editor and a Quill component for Flutter. -version: 9.2.9 +version: 9.2.10 homepage: https://1o24bbs.com/c/bulletjournal/108/ repository: https://github.com/singerdmx/flutter-quill/ issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ diff --git a/quill_html_converter/CHANGELOG.md b/quill_html_converter/CHANGELOG.md index b1cb003e..59e1cdce 100644 --- a/quill_html_converter/CHANGELOG.md +++ b/quill_html_converter/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## 9.2.10 +* Update example screenshots +* Refactor `Container` to `QuillContainer` with backward compatibility +* A workaround fix in history feature + ## 9.2.9 * Refactor the type of `Delta().toJson()` to be more clear type diff --git a/quill_html_converter/pubspec.yaml b/quill_html_converter/pubspec.yaml index 1f497600..24357dad 100644 --- a/quill_html_converter/pubspec.yaml +++ b/quill_html_converter/pubspec.yaml @@ -1,6 +1,6 @@ name: quill_html_converter description: A extension for flutter_quill package to add support for dealing with conversion to/from html -version: 9.2.9 +version: 9.2.10 homepage: https://github.com/singerdmx/flutter-quill/tree/master/quill_html_converter/ repository: https://github.com/singerdmx/flutter-quill/tree/master/quill_html_converter/ issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ diff --git a/quill_pdf_converter/CHANGELOG.md b/quill_pdf_converter/CHANGELOG.md index b1cb003e..59e1cdce 100644 --- a/quill_pdf_converter/CHANGELOG.md +++ b/quill_pdf_converter/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## 9.2.10 +* Update example screenshots +* Refactor `Container` to `QuillContainer` with backward compatibility +* A workaround fix in history feature + ## 9.2.9 * Refactor the type of `Delta().toJson()` to be more clear type diff --git a/quill_pdf_converter/pubspec.yaml b/quill_pdf_converter/pubspec.yaml index f5abfd71..20260221 100644 --- a/quill_pdf_converter/pubspec.yaml +++ b/quill_pdf_converter/pubspec.yaml @@ -1,6 +1,6 @@ name: quill_pdf_converter description: A extension for flutter_quill package to add support for dealing with conversion to pdf -version: 9.2.9 +version: 9.2.10 homepage: https://github.com/singerdmx/flutter-quill/tree/master/quill_pdf_converter/ repository: https://github.com/singerdmx/flutter-quill/tree/master/quill_pdf_converter/ issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ diff --git a/version.dart b/version.dart index a86c2e7f..6c449081 100644 --- a/version.dart +++ b/version.dart @@ -1 +1 @@ -const version = '9.2.9'; +const version = '9.2.10';