mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
Merge branch 'main' into feat/copy-styles
This commit is contained in:
commit
0c0039ca95
@ -1,12 +1,14 @@
|
||||
import 'dart:collection';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:example/expandable_floating_action_button.dart';
|
||||
import 'package:example/plugin/image_node_widget.dart';
|
||||
import 'package:example/plugin/youtube_link_node_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flowy_editor/flowy_editor.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
void main() {
|
||||
runApp(const MyApp());
|
||||
|
@ -1,15 +1,15 @@
|
||||
library flowy_editor;
|
||||
|
||||
export 'package:flowy_editor/document/state_tree.dart';
|
||||
export 'package:flowy_editor/document/node.dart';
|
||||
export 'package:flowy_editor/document/path.dart';
|
||||
export 'package:flowy_editor/document/text_delta.dart';
|
||||
export 'package:flowy_editor/render/selection/selectable.dart';
|
||||
export 'package:flowy_editor/operation/transaction.dart';
|
||||
export 'package:flowy_editor/operation/transaction_builder.dart';
|
||||
export 'package:flowy_editor/operation/operation.dart';
|
||||
export 'package:flowy_editor/editor_state.dart';
|
||||
export 'package:flowy_editor/service/editor_service.dart';
|
||||
export 'package:flowy_editor/document/selection.dart';
|
||||
export 'package:flowy_editor/document/position.dart';
|
||||
export 'package:flowy_editor/service/render_plugin_service.dart';
|
||||
export 'src/document/state_tree.dart';
|
||||
export 'src/document/node.dart';
|
||||
export 'src/document/path.dart';
|
||||
export 'src/document/text_delta.dart';
|
||||
export 'src/render/selection/selectable.dart';
|
||||
export 'src/operation/transaction.dart';
|
||||
export 'src/operation/transaction_builder.dart';
|
||||
export 'src/operation/operation.dart';
|
||||
export 'src/editor_state.dart';
|
||||
export 'src/service/editor_service.dart';
|
||||
export 'src/document/selection.dart';
|
||||
export 'src/document/position.dart';
|
||||
export 'src/service/render_plugin_service.dart';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import 'dart:collection';
|
||||
import 'package:flowy_editor/document/path.dart';
|
||||
import 'package:flowy_editor/document/text_delta.dart';
|
||||
import 'package:flowy_editor/operation/operation.dart';
|
||||
import 'package:flowy_editor/src/document/path.dart';
|
||||
import 'package:flowy_editor/src/document/text_delta.dart';
|
||||
import 'package:flowy_editor/src/operation/operation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import './attributes.dart';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
|
||||
import './state_tree.dart';
|
||||
import './node.dart';
|
@ -1,6 +1,6 @@
|
||||
import 'package:flowy_editor/document/path.dart';
|
||||
import 'package:flowy_editor/document/position.dart';
|
||||
import 'package:flowy_editor/extensions/path_extensions.dart';
|
||||
import 'package:flowy_editor/src/document/path.dart';
|
||||
import 'package:flowy_editor/src/document/position.dart';
|
||||
import 'package:flowy_editor/src/extensions/path_extensions.dart';
|
||||
|
||||
class Selection {
|
||||
final Position start;
|
@ -1,6 +1,6 @@
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/document/path.dart';
|
||||
import 'package:flowy_editor/document/text_delta.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/document/path.dart';
|
||||
import 'package:flowy_editor/src/document/text_delta.dart';
|
||||
import './attributes.dart';
|
||||
|
||||
class StateTree {
|
@ -1,7 +1,7 @@
|
||||
import 'dart:collection';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flowy_editor/document/attributes.dart';
|
||||
import 'package:flowy_editor/src/document/attributes.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import './attributes.dart';
|
@ -1,13 +1,13 @@
|
||||
import 'dart:async';
|
||||
import 'package:flowy_editor/service/service.dart';
|
||||
import 'package:flowy_editor/src/service/service.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/document/selection.dart';
|
||||
import 'package:flowy_editor/document/state_tree.dart';
|
||||
import 'package:flowy_editor/operation/operation.dart';
|
||||
import 'package:flowy_editor/operation/transaction.dart';
|
||||
import 'package:flowy_editor/undo_manager.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/document/selection.dart';
|
||||
import 'package:flowy_editor/src/document/state_tree.dart';
|
||||
import 'package:flowy_editor/src/operation/operation.dart';
|
||||
import 'package:flowy_editor/src/operation/transaction.dart';
|
||||
import 'package:flowy_editor/src/undo_manager.dart';
|
||||
|
||||
class ApplyOptions {
|
||||
/// This flag indicates that
|
@ -1,8 +1,8 @@
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/document/selection.dart';
|
||||
import 'package:flowy_editor/extensions/object_extensions.dart';
|
||||
import 'package:flowy_editor/extensions/path_extensions.dart';
|
||||
import 'package:flowy_editor/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/document/selection.dart';
|
||||
import 'package:flowy_editor/src/extensions/object_extensions.dart';
|
||||
import 'package:flowy_editor/src/extensions/path_extensions.dart';
|
||||
import 'package:flowy_editor/src/render/selection/selectable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
extension NodeExtensions on Node {
|
@ -1,4 +1,4 @@
|
||||
import 'package:flowy_editor/document/path.dart';
|
||||
import 'package:flowy_editor/src/document/path.dart';
|
||||
|
||||
import 'dart:math';
|
||||
|
@ -1,9 +1,9 @@
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/document/path.dart';
|
||||
import 'package:flowy_editor/document/position.dart';
|
||||
import 'package:flowy_editor/document/selection.dart';
|
||||
import 'package:flowy_editor/document/text_delta.dart';
|
||||
import 'package:flowy_editor/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/document/path.dart';
|
||||
import 'package:flowy_editor/src/document/position.dart';
|
||||
import 'package:flowy_editor/src/document/selection.dart';
|
||||
import 'package:flowy_editor/src/document/text_delta.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/rich_text_style.dart';
|
||||
|
||||
extension TextNodeExtension on TextNode {
|
||||
bool allSatisfyBoldInSelection(Selection selection) =>
|
@ -1,9 +1,9 @@
|
||||
import 'dart:collection';
|
||||
|
||||
import 'package:flowy_editor/document/attributes.dart';
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/document/text_delta.dart';
|
||||
import 'package:flowy_editor/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/document/attributes.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/document/text_delta.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:html/parser.dart' show parse;
|
||||
import 'package:html/dom.dart' as html;
|
@ -1,4 +1,4 @@
|
||||
import 'package:flowy_editor/document/attributes.dart';
|
||||
import 'package:flowy_editor/src/document/attributes.dart';
|
||||
import 'package:flowy_editor/flowy_editor.dart';
|
||||
|
||||
abstract class Operation {
|
@ -1,6 +1,6 @@
|
||||
import 'dart:collection';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flowy_editor/document/selection.dart';
|
||||
import 'package:flowy_editor/src/document/selection.dart';
|
||||
import './operation.dart';
|
||||
|
||||
/// A [Transaction] has a list of [Operation] objects that will be applied
|
@ -1,15 +1,15 @@
|
||||
import 'dart:collection';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flowy_editor/document/attributes.dart';
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/document/path.dart';
|
||||
import 'package:flowy_editor/document/position.dart';
|
||||
import 'package:flowy_editor/document/selection.dart';
|
||||
import 'package:flowy_editor/document/text_delta.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/operation/operation.dart';
|
||||
import 'package:flowy_editor/operation/transaction.dart';
|
||||
import 'package:flowy_editor/src/document/attributes.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/document/path.dart';
|
||||
import 'package:flowy_editor/src/document/position.dart';
|
||||
import 'package:flowy_editor/src/document/selection.dart';
|
||||
import 'package:flowy_editor/src/document/text_delta.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/operation/operation.dart';
|
||||
import 'package:flowy_editor/src/operation/transaction.dart';
|
||||
|
||||
/// A [TransactionBuilder] is used to build the transaction from the state.
|
||||
/// It will save make a snapshot of the cursor selection state automatically.
|
@ -1,8 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/service/render_plugin_service.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/service/render_plugin_service.dart';
|
||||
|
||||
class EditorEntryWidgetBuilder extends NodeWidgetBuilder<Node> {
|
||||
@override
|
@ -1,11 +1,11 @@
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/infra/flowy_svg.dart';
|
||||
import 'package:flowy_editor/render/rich_text/default_selectable.dart';
|
||||
import 'package:flowy_editor/render/rich_text/flowy_rich_text.dart';
|
||||
import 'package:flowy_editor/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/service/render_plugin_service.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/infra/flowy_svg.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/default_selectable.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/flowy_rich_text.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/src/service/render_plugin_service.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class BulletedListTextNodeWidgetBuilder extends NodeWidgetBuilder<TextNode> {
|
@ -1,12 +1,12 @@
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/infra/flowy_svg.dart';
|
||||
import 'package:flowy_editor/operation/transaction_builder.dart';
|
||||
import 'package:flowy_editor/render/rich_text/default_selectable.dart';
|
||||
import 'package:flowy_editor/render/rich_text/flowy_rich_text.dart';
|
||||
import 'package:flowy_editor/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/service/render_plugin_service.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/infra/flowy_svg.dart';
|
||||
import 'package:flowy_editor/src/operation/transaction_builder.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/default_selectable.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/flowy_rich_text.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/src/service/render_plugin_service.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CheckboxNodeWidgetBuilder extends NodeWidgetBuilder<TextNode> {
|
@ -1,6 +1,6 @@
|
||||
import 'package:flowy_editor/document/position.dart';
|
||||
import 'package:flowy_editor/document/selection.dart';
|
||||
import 'package:flowy_editor/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/src/document/position.dart';
|
||||
import 'package:flowy_editor/src/document/selection.dart';
|
||||
import 'package:flowy_editor/src/render/selection/selectable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
mixin DefaultSelectable {
|
@ -1,15 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/document/path.dart';
|
||||
import 'package:flowy_editor/document/position.dart';
|
||||
import 'package:flowy_editor/document/selection.dart';
|
||||
import 'package:flowy_editor/document/text_delta.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/service/render_plugin_service.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/document/path.dart';
|
||||
import 'package:flowy_editor/src/document/position.dart';
|
||||
import 'package:flowy_editor/src/document/selection.dart';
|
||||
import 'package:flowy_editor/src/document/text_delta.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/src/service/render_plugin_service.dart';
|
||||
|
||||
typedef FlowyTextSpanDecorator = TextSpan Function(TextSpan textSpan);
|
||||
|
@ -1,10 +1,10 @@
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/render/rich_text/default_selectable.dart';
|
||||
import 'package:flowy_editor/render/rich_text/flowy_rich_text.dart';
|
||||
import 'package:flowy_editor/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/service/render_plugin_service.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/default_selectable.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/flowy_rich_text.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/src/service/render_plugin_service.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class HeadingTextNodeWidgetBuilder extends NodeWidgetBuilder<TextNode> {
|
@ -1,11 +1,11 @@
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/infra/flowy_svg.dart';
|
||||
import 'package:flowy_editor/render/rich_text/default_selectable.dart';
|
||||
import 'package:flowy_editor/render/rich_text/flowy_rich_text.dart';
|
||||
import 'package:flowy_editor/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/service/render_plugin_service.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/infra/flowy_svg.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/default_selectable.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/flowy_rich_text.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/src/service/render_plugin_service.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class NumberListTextNodeWidgetBuilder extends NodeWidgetBuilder<TextNode> {
|
@ -1,11 +1,11 @@
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/infra/flowy_svg.dart';
|
||||
import 'package:flowy_editor/render/rich_text/default_selectable.dart';
|
||||
import 'package:flowy_editor/render/rich_text/flowy_rich_text.dart';
|
||||
import 'package:flowy_editor/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/service/render_plugin_service.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/infra/flowy_svg.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/default_selectable.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/flowy_rich_text.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/src/service/render_plugin_service.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class QuotedTextNodeWidgetBuilder extends NodeWidgetBuilder<TextNode> {
|
@ -1,11 +1,11 @@
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/infra/flowy_svg.dart';
|
||||
import 'package:flowy_editor/render/rich_text/default_selectable.dart';
|
||||
import 'package:flowy_editor/render/rich_text/flowy_rich_text.dart';
|
||||
import 'package:flowy_editor/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/service/render_plugin_service.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/infra/flowy_svg.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/default_selectable.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/flowy_rich_text.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/src/service/render_plugin_service.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class RichTextNodeWidgetBuilder extends NodeWidgetBuilder<TextNode> {
|
@ -1,5 +1,5 @@
|
||||
import 'package:flowy_editor/document/attributes.dart';
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/src/document/attributes.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import 'package:flowy_editor/document/position.dart';
|
||||
import 'package:flowy_editor/document/selection.dart';
|
||||
import 'package:flowy_editor/src/document/position.dart';
|
||||
import 'package:flowy_editor/src/document/selection.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
///
|
@ -1,9 +1,9 @@
|
||||
import 'package:flowy_editor/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/infra/flowy_svg.dart';
|
||||
import 'package:flowy_editor/service/default_text_operations/format_rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/infra/flowy_svg.dart';
|
||||
import 'package:flowy_editor/src/service/default_text_operations/format_rich_text_style.dart';
|
||||
|
||||
typedef ToolbarEventHandler = void Function(EditorState editorState);
|
||||
|
@ -1,11 +1,11 @@
|
||||
import 'package:flowy_editor/document/attributes.dart';
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/document/position.dart';
|
||||
import 'package:flowy_editor/document/selection.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/extensions/text_node_extensions.dart';
|
||||
import 'package:flowy_editor/operation/transaction_builder.dart';
|
||||
import 'package:flowy_editor/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/document/attributes.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/document/position.dart';
|
||||
import 'package:flowy_editor/src/document/selection.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/extensions/text_node_extensions.dart';
|
||||
import 'package:flowy_editor/src/operation/transaction_builder.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/rich_text_style.dart';
|
||||
|
||||
void formatText(EditorState editorState) {
|
||||
formatTextNodes(editorState, {});
|
@ -1,28 +1,28 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/render/editor/editor_entry.dart';
|
||||
import 'package:flowy_editor/render/rich_text/bulleted_list_text.dart';
|
||||
import 'package:flowy_editor/render/rich_text/checkbox_text.dart';
|
||||
import 'package:flowy_editor/render/rich_text/heading_text.dart';
|
||||
import 'package:flowy_editor/render/rich_text/number_list_text.dart';
|
||||
import 'package:flowy_editor/render/rich_text/quoted_text.dart';
|
||||
import 'package:flowy_editor/render/rich_text/rich_text.dart';
|
||||
import 'package:flowy_editor/service/input_service.dart';
|
||||
import 'package:flowy_editor/service/internal_key_event_handlers/arrow_keys_handler.dart';
|
||||
import 'package:flowy_editor/service/internal_key_event_handlers/copy_paste_handler.dart';
|
||||
import 'package:flowy_editor/service/internal_key_event_handlers/delete_nodes_handler.dart';
|
||||
import 'package:flowy_editor/service/internal_key_event_handlers/delete_text_handler.dart';
|
||||
import 'package:flowy_editor/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler.dart';
|
||||
import 'package:flowy_editor/service/internal_key_event_handlers/slash_handler.dart';
|
||||
import 'package:flowy_editor/service/internal_key_event_handlers/update_text_style_by_command_x_handler.dart';
|
||||
import 'package:flowy_editor/service/internal_key_event_handlers/whitespace_handler.dart';
|
||||
import 'package:flowy_editor/service/internal_key_event_handlers/redo_undo_handler.dart';
|
||||
import 'package:flowy_editor/service/keyboard_service.dart';
|
||||
import 'package:flowy_editor/service/render_plugin_service.dart';
|
||||
import 'package:flowy_editor/service/scroll_service.dart';
|
||||
import 'package:flowy_editor/service/selection_service.dart';
|
||||
import 'package:flowy_editor/service/toolbar_service.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/render/editor/editor_entry.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/bulleted_list_text.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/checkbox_text.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/heading_text.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/number_list_text.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/quoted_text.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/rich_text.dart';
|
||||
import 'package:flowy_editor/src/service/input_service.dart';
|
||||
import 'package:flowy_editor/src/service/internal_key_event_handlers/arrow_keys_handler.dart';
|
||||
import 'package:flowy_editor/src/service/internal_key_event_handlers/copy_paste_handler.dart';
|
||||
import 'package:flowy_editor/src/service/internal_key_event_handlers/delete_nodes_handler.dart';
|
||||
import 'package:flowy_editor/src/service/internal_key_event_handlers/delete_text_handler.dart';
|
||||
import 'package:flowy_editor/src/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler.dart';
|
||||
import 'package:flowy_editor/src/service/internal_key_event_handlers/slash_handler.dart';
|
||||
import 'package:flowy_editor/src/service/internal_key_event_handlers/update_text_style_by_command_x_handler.dart';
|
||||
import 'package:flowy_editor/src/service/internal_key_event_handlers/whitespace_handler.dart';
|
||||
import 'package:flowy_editor/src/service/internal_key_event_handlers/redo_undo_handler.dart';
|
||||
import 'package:flowy_editor/src/service/keyboard_service.dart';
|
||||
import 'package:flowy_editor/src/service/render_plugin_service.dart';
|
||||
import 'package:flowy_editor/src/service/scroll_service.dart';
|
||||
import 'package:flowy_editor/src/service/selection_service.dart';
|
||||
import 'package:flowy_editor/src/service/toolbar_service.dart';
|
||||
|
||||
NodeWidgetBuilders defaultBuilders = {
|
||||
'editor': EditorEntryWidgetBuilder(),
|
@ -1,11 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/document/selection.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/extensions/node_extensions.dart';
|
||||
import 'package:flowy_editor/operation/transaction_builder.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/document/selection.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/extensions/node_extensions.dart';
|
||||
import 'package:flowy_editor/src/operation/transaction_builder.dart';
|
||||
|
||||
mixin FlowyInputService {
|
||||
void attach(TextEditingValue textEditingValue);
|
@ -1,5 +1,5 @@
|
||||
import 'package:flowy_editor/flowy_editor.dart';
|
||||
import 'package:flowy_editor/service/keyboard_service.dart';
|
||||
import 'package:flowy_editor/src/service/keyboard_service.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import 'package:flowy_editor/flowy_editor.dart';
|
||||
import 'package:flowy_editor/service/keyboard_service.dart';
|
||||
import 'package:flowy_editor/infra/html_converter.dart';
|
||||
import 'package:flowy_editor/document/node_iterator.dart';
|
||||
import 'package:flowy_editor/src/service/keyboard_service.dart';
|
||||
import 'package:flowy_editor/src/infra/html_converter.dart';
|
||||
import 'package:flowy_editor/src/document/node_iterator.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:rich_clipboard/rich_clipboard.dart';
|
@ -1,5 +1,5 @@
|
||||
import 'package:flowy_editor/flowy_editor.dart';
|
||||
import 'package:flowy_editor/service/keyboard_service.dart';
|
||||
import 'package:flowy_editor/src/service/keyboard_service.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
FlowyKeyEventHandler flowyDeleteNodesHandler = (editorState, event) {
|
@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flowy_editor/flowy_editor.dart';
|
||||
import 'package:flowy_editor/service/keyboard_service.dart';
|
||||
import 'package:flowy_editor/src/service/keyboard_service.dart';
|
||||
|
||||
// Handle delete text.
|
||||
FlowyKeyEventHandler deleteTextHandler = (editorState, event) {
|
@ -1,14 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flowy_editor/document/attributes.dart';
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/document/position.dart';
|
||||
import 'package:flowy_editor/document/selection.dart';
|
||||
import 'package:flowy_editor/extensions/path_extensions.dart';
|
||||
import 'package:flowy_editor/operation/transaction_builder.dart';
|
||||
import 'package:flowy_editor/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/service/keyboard_service.dart';
|
||||
import 'package:flowy_editor/src/document/attributes.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/document/position.dart';
|
||||
import 'package:flowy_editor/src/document/selection.dart';
|
||||
import 'package:flowy_editor/src/extensions/path_extensions.dart';
|
||||
import 'package:flowy_editor/src/operation/transaction_builder.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/service/keyboard_service.dart';
|
||||
|
||||
/// Handle some cases where enter is pressed and shift is not pressed.
|
||||
///
|
@ -1,4 +1,4 @@
|
||||
import 'package:flowy_editor/service/keyboard_service.dart';
|
||||
import 'package:flowy_editor/src/service/keyboard_service.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
@ -1,13 +1,13 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/infra/flowy_svg.dart';
|
||||
import 'package:flowy_editor/operation/transaction_builder.dart';
|
||||
import 'package:flowy_editor/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/service/default_text_operations/format_rich_text_style.dart';
|
||||
import 'package:flowy_editor/service/keyboard_service.dart';
|
||||
import 'package:flowy_editor/extensions/node_extensions.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/infra/flowy_svg.dart';
|
||||
import 'package:flowy_editor/src/operation/transaction_builder.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/service/default_text_operations/format_rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/service/keyboard_service.dart';
|
||||
import 'package:flowy_editor/src/extensions/node_extensions.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
@ -1,8 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/service/default_text_operations/format_rich_text_style.dart';
|
||||
import 'package:flowy_editor/service/keyboard_service.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/service/default_text_operations/format_rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/service/keyboard_service.dart';
|
||||
|
||||
FlowyKeyEventHandler updateTextStyleByCommandXHandler = (editorState, event) {
|
||||
if (!event.isMetaPressed || event.character == null) {
|
@ -1,13 +1,13 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/document/position.dart';
|
||||
import 'package:flowy_editor/document/selection.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/operation/transaction_builder.dart';
|
||||
import 'package:flowy_editor/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/service/keyboard_service.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/document/position.dart';
|
||||
import 'package:flowy_editor/src/document/selection.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/operation/transaction_builder.dart';
|
||||
import 'package:flowy_editor/src/render/rich_text/rich_text_style.dart';
|
||||
import 'package:flowy_editor/src/service/keyboard_service.dart';
|
||||
|
||||
const _bulletedListSymbols = ['*', '-'];
|
||||
const _checkboxListSymbols = ['[x]', '-[x]'];
|
@ -1,6 +1,6 @@
|
||||
import 'package:flowy_editor/flowy_editor.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import '../editor_state.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
mixin FlowyKeyboardService<T extends StatefulWidget> on State<T> {
|
@ -1,5 +1,5 @@
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -4,16 +4,16 @@ import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/document/node_iterator.dart';
|
||||
import 'package:flowy_editor/document/position.dart';
|
||||
import 'package:flowy_editor/document/selection.dart';
|
||||
import 'package:flowy_editor/document/state_tree.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/extensions/node_extensions.dart';
|
||||
import 'package:flowy_editor/render/selection/cursor_widget.dart';
|
||||
import 'package:flowy_editor/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/render/selection/selection_widget.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/document/node_iterator.dart';
|
||||
import 'package:flowy_editor/src/document/position.dart';
|
||||
import 'package:flowy_editor/src/document/selection.dart';
|
||||
import 'package:flowy_editor/src/document/state_tree.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/extensions/node_extensions.dart';
|
||||
import 'package:flowy_editor/src/render/selection/cursor_widget.dart';
|
||||
import 'package:flowy_editor/src/render/selection/selectable.dart';
|
||||
import 'package:flowy_editor/src/render/selection/selection_widget.dart';
|
||||
|
||||
/// Process selection and cursor
|
||||
mixin FlowySelectionService<T extends StatefulWidget> on State<T> {
|
@ -1,10 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flowy_editor/service/keyboard_service.dart';
|
||||
import 'package:flowy_editor/service/render_plugin_service.dart';
|
||||
import 'package:flowy_editor/service/scroll_service.dart';
|
||||
import 'package:flowy_editor/service/selection_service.dart';
|
||||
import 'package:flowy_editor/service/toolbar_service.dart';
|
||||
import 'package:flowy_editor/src/service/keyboard_service.dart';
|
||||
import 'package:flowy_editor/src/service/render_plugin_service.dart';
|
||||
import 'package:flowy_editor/src/service/scroll_service.dart';
|
||||
import 'package:flowy_editor/src/service/selection_service.dart';
|
||||
import 'package:flowy_editor/src/service/toolbar_service.dart';
|
||||
|
||||
class FlowyService {
|
||||
// selection service
|
@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flowy_editor/flowy_editor.dart';
|
||||
import 'package:flowy_editor/render/selection/toolbar_widget.dart';
|
||||
import 'package:flowy_editor/src/render/selection/toolbar_widget.dart';
|
||||
|
||||
mixin FlowyToolbarService {
|
||||
/// Show the toolbar widget beside the offset.
|
@ -1,10 +1,10 @@
|
||||
import 'dart:collection';
|
||||
|
||||
import 'package:flowy_editor/document/selection.dart';
|
||||
import 'package:flowy_editor/operation/operation.dart';
|
||||
import 'package:flowy_editor/operation/transaction_builder.dart';
|
||||
import 'package:flowy_editor/operation/transaction.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/src/document/selection.dart';
|
||||
import 'package:flowy_editor/src/operation/operation.dart';
|
||||
import 'package:flowy_editor/src/operation/transaction_builder.dart';
|
||||
import 'package:flowy_editor/src/operation/transaction.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
/// A [HistoryItem] contains list of operations committed by users.
|
@ -1,5 +1,5 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flowy_editor/document/text_delta.dart';
|
||||
import 'package:flowy_editor/src/document/text_delta.dart';
|
||||
|
||||
void main() {
|
||||
group('compose', () {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/document/state_tree.dart';
|
||||
import 'package:flowy_editor/document/path.dart';
|
||||
import 'package:flowy_editor/document/position.dart';
|
||||
import 'package:flowy_editor/document/selection.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flowy_editor/src/document/state_tree.dart';
|
||||
import 'package:flowy_editor/src/document/path.dart';
|
||||
import 'package:flowy_editor/src/document/position.dart';
|
||||
import 'package:flowy_editor/src/document/selection.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
@ -1,11 +1,11 @@
|
||||
import 'dart:collection';
|
||||
|
||||
import 'package:flowy_editor/document/node.dart';
|
||||
import 'package:flowy_editor/src/document/node.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flowy_editor/operation/operation.dart';
|
||||
import 'package:flowy_editor/operation/transaction_builder.dart';
|
||||
import 'package:flowy_editor/editor_state.dart';
|
||||
import 'package:flowy_editor/document/state_tree.dart';
|
||||
import 'package:flowy_editor/src/operation/operation.dart';
|
||||
import 'package:flowy_editor/src/operation/transaction_builder.dart';
|
||||
import 'package:flowy_editor/src/editor_state.dart';
|
||||
import 'package:flowy_editor/src/document/state_tree.dart';
|
||||
|
||||
void main() {
|
||||
TestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
Loading…
Reference in New Issue
Block a user