Merge branch 'main' into feat/copy-styles

This commit is contained in:
Vincent Chan 2022-08-10 15:28:39 +08:00
commit 0c0039ca95
56 changed files with 237 additions and 235 deletions

View File

@ -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());

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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;

View File

@ -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 {

View File

@ -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';

View File

@ -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

View File

@ -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 {

View File

@ -1,4 +1,4 @@
import 'package:flowy_editor/document/path.dart';
import 'package:flowy_editor/src/document/path.dart';
import 'dart:math';

View File

@ -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) =>

View File

@ -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;

View File

@ -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 {

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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> {

View File

@ -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> {

View File

@ -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 {

View File

@ -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);

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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';

View File

@ -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';
///

View File

@ -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);

View File

@ -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, {});

View File

@ -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(),

View File

@ -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);

View File

@ -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';

View File

@ -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';

View File

@ -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) {

View File

@ -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) {

View File

@ -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.
///

View File

@ -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';

View File

@ -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';

View File

@ -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) {

View File

@ -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]'];

View File

@ -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> {

View File

@ -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';

View File

@ -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> {

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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', () {

View File

@ -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';

View File

@ -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();