From 79591791c1bdb17eb36b3813b9fa6b7712bf7e23 Mon Sep 17 00:00:00 2001 From: "Lucas.Xu" Date: Wed, 10 Aug 2022 14:05:31 +0800 Subject: [PATCH] chore: move all code into src/ --- .../flowy_editor/example/lib/main.dart | 6 ++- .../flowy_editor/lib/flowy_editor.dart | 26 +++++------ .../lib/{ => src}/document/attributes.dart | 0 .../lib/{ => src}/document/node.dart | 6 +-- .../lib/{ => src}/document/node_iterator.dart | 2 +- .../lib/{ => src}/document/path.dart | 0 .../lib/{ => src}/document/position.dart | 0 .../lib/{ => src}/document/selection.dart | 6 +-- .../lib/{ => src}/document/state_tree.dart | 6 +-- .../lib/{ => src}/document/text_delta.dart | 2 +- .../lib/{ => src}/editor_state.dart | 14 +++--- .../{ => src}/extensions/node_extensions.dart | 10 ++-- .../extensions/object_extensions.dart | 0 .../{ => src}/extensions/path_extensions.dart | 2 +- .../extensions/text_node_extensions.dart | 12 ++--- .../lib/{ => src}/infra/flowy_svg.dart | 0 .../lib/{ => src}/infra/html_converter.dart | 6 +-- .../lib/{ => src}/operation/operation.dart | 2 +- .../lib/{ => src}/operation/transaction.dart | 2 +- .../operation/transaction_builder.dart | 18 ++++---- .../{ => src}/render/editor/editor_entry.dart | 6 +-- .../render/rich_text/bulleted_list_text.dart | 16 +++---- .../render/rich_text/checkbox_text.dart | 18 ++++---- .../render/rich_text/default_selectable.dart | 6 +-- .../render/rich_text/flowy_rich_text.dart | 18 ++++---- .../render/rich_text/heading_text.dart | 14 +++--- .../render/rich_text/number_list_text.dart | 16 +++---- .../render/rich_text/quoted_text.dart | 16 +++---- .../{ => src}/render/rich_text/rich_text.dart | 16 +++---- .../render/rich_text/rich_text_style.dart | 4 +- .../render/selection/cursor_widget.dart | 0 .../render/selection/selectable.dart | 4 +- .../render/selection/selection_widget.dart | 0 .../render/selection/toolbar_widget.dart | 8 ++-- .../format_rich_text_style.dart | 16 +++---- .../lib/{ => src}/service/editor_service.dart | 46 +++++++++---------- .../lib/{ => src}/service/input_service.dart | 10 ++-- .../arrow_keys_handler.dart | 2 +- .../copy_paste_handler.dart | 6 +-- .../delete_nodes_handler.dart | 2 +- .../delete_text_handler.dart | 2 +- ...er_without_shift_in_text_node_handler.dart | 16 +++---- .../redo_undo_handler.dart | 2 +- .../slash_handler.dart | 16 +++---- ...pdate_text_style_by_command_x_handler.dart | 6 +-- .../whitespace_handler.dart | 14 +++--- .../{ => src}/service/keyboard_service.dart | 2 +- .../service/render_plugin_service.dart | 4 +- .../lib/{ => src}/service/scroll_service.dart | 0 .../{ => src}/service/selection_service.dart | 20 ++++---- .../lib/{ => src}/service/service.dart | 10 ++-- .../{ => src}/service/toolbar_service.dart | 2 +- .../lib/{ => src}/undo_manager.dart | 10 ++-- .../flowy_editor/test/delta_test.dart | 2 +- .../flowy_editor/test/flowy_editor_test.dart | 10 ++-- .../flowy_editor/test/operation_test.dart | 10 ++-- 56 files changed, 236 insertions(+), 234 deletions(-) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/document/attributes.dart (100%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/document/node.dart (96%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/document/node_iterator.dart (96%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/document/path.dart (100%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/document/position.dart (100%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/document/selection.dart (89%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/document/state_tree.dart (91%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/document/text_delta.dart (99%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/editor_state.dart (87%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/extensions/node_extensions.dart (70%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/extensions/object_extensions.dart (100%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/extensions/path_extensions.dart (92%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/extensions/text_node_extensions.dart (88%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/infra/flowy_svg.dart (100%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/infra/html_converter.dart (97%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/operation/operation.dart (98%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/operation/transaction.dart (95%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/operation/transaction_builder.dart (90%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/render/editor/editor_entry.dart (88%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/render/rich_text/bulleted_list_text.dart (80%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/render/rich_text/checkbox_text.dart (88%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/render/rich_text/default_selectable.dart (85%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/render/rich_text/flowy_rich_text.dart (91%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/render/rich_text/heading_text.dart (85%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/render/rich_text/number_list_text.dart (80%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/render/rich_text/quoted_text.dart (81%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/render/rich_text/rich_text.dart (73%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/render/rich_text/rich_text_style.dart (98%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/render/selection/cursor_widget.dart (100%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/render/selection/selectable.dart (91%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/render/selection/selection_widget.dart (100%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/render/selection/toolbar_widget.dart (95%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/default_text_operations/format_rich_text_style.dart (88%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/editor_service.dart (62%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/input_service.dart (96%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/internal_key_event_handlers/arrow_keys_handler.dart (98%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/internal_key_event_handlers/copy_paste_handler.dart (98%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/internal_key_event_handlers/delete_nodes_handler.dart (89%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/internal_key_event_handlers/delete_text_handler.dart (97%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler.dart (88%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/internal_key_event_handlers/redo_undo_handler.dart (86%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/internal_key_event_handlers/slash_handler.dart (94%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/internal_key_event_handlers/update_text_style_by_command_x_handler.dart (83%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/internal_key_event_handlers/whitespace_handler.dart (88%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/keyboard_service.dart (97%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/render_plugin_service.dart (97%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/scroll_service.dart (100%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/selection_service.dart (96%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/service.dart (83%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/service/toolbar_service.dart (94%) rename frontend/app_flowy/packages/flowy_editor/lib/{ => src}/undo_manager.dart (90%) diff --git a/frontend/app_flowy/packages/flowy_editor/example/lib/main.dart b/frontend/app_flowy/packages/flowy_editor/example/lib/main.dart index 3dc9fe4806..5db7288c76 100644 --- a/frontend/app_flowy/packages/flowy_editor/example/lib/main.dart +++ b/frontend/app_flowy/packages/flowy_editor/example/lib/main.dart @@ -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()); diff --git a/frontend/app_flowy/packages/flowy_editor/lib/flowy_editor.dart b/frontend/app_flowy/packages/flowy_editor/lib/flowy_editor.dart index c3e15959a6..a767c08407 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/flowy_editor.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/flowy_editor.dart @@ -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'; diff --git a/frontend/app_flowy/packages/flowy_editor/lib/document/attributes.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/document/attributes.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_editor/lib/document/attributes.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/document/attributes.dart diff --git a/frontend/app_flowy/packages/flowy_editor/lib/document/node.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/document/node.dart similarity index 96% rename from frontend/app_flowy/packages/flowy_editor/lib/document/node.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/document/node.dart index 21883362b1..0b6b941aaa 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/document/node.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/document/node.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'; diff --git a/frontend/app_flowy/packages/flowy_editor/lib/document/node_iterator.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/document/node_iterator.dart similarity index 96% rename from frontend/app_flowy/packages/flowy_editor/lib/document/node_iterator.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/document/node_iterator.dart index bafe106f27..c1349b7c4c 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/document/node_iterator.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/document/node_iterator.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'; diff --git a/frontend/app_flowy/packages/flowy_editor/lib/document/path.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/document/path.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_editor/lib/document/path.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/document/path.dart diff --git a/frontend/app_flowy/packages/flowy_editor/lib/document/position.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/document/position.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_editor/lib/document/position.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/document/position.dart diff --git a/frontend/app_flowy/packages/flowy_editor/lib/document/selection.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/document/selection.dart similarity index 89% rename from frontend/app_flowy/packages/flowy_editor/lib/document/selection.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/document/selection.dart index 16341cee1a..692cc8c91b 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/document/selection.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/document/selection.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; diff --git a/frontend/app_flowy/packages/flowy_editor/lib/document/state_tree.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/document/state_tree.dart similarity index 91% rename from frontend/app_flowy/packages/flowy_editor/lib/document/state_tree.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/document/state_tree.dart index cf49f48ac8..199736234a 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/document/state_tree.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/document/state_tree.dart @@ -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 { diff --git a/frontend/app_flowy/packages/flowy_editor/lib/document/text_delta.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/document/text_delta.dart similarity index 99% rename from frontend/app_flowy/packages/flowy_editor/lib/document/text_delta.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/document/text_delta.dart index 64335d4a05..72378f80c6 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/document/text_delta.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/document/text_delta.dart @@ -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'; diff --git a/frontend/app_flowy/packages/flowy_editor/lib/editor_state.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/editor_state.dart similarity index 87% rename from frontend/app_flowy/packages/flowy_editor/lib/editor_state.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/editor_state.dart index 5ea49c644d..82725b5255 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/editor_state.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/editor_state.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 diff --git a/frontend/app_flowy/packages/flowy_editor/lib/extensions/node_extensions.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/extensions/node_extensions.dart similarity index 70% rename from frontend/app_flowy/packages/flowy_editor/lib/extensions/node_extensions.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/extensions/node_extensions.dart index 0ca9ba08a6..db58f8a3db 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/extensions/node_extensions.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/extensions/node_extensions.dart @@ -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 { diff --git a/frontend/app_flowy/packages/flowy_editor/lib/extensions/object_extensions.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/extensions/object_extensions.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_editor/lib/extensions/object_extensions.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/extensions/object_extensions.dart diff --git a/frontend/app_flowy/packages/flowy_editor/lib/extensions/path_extensions.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/extensions/path_extensions.dart similarity index 92% rename from frontend/app_flowy/packages/flowy_editor/lib/extensions/path_extensions.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/extensions/path_extensions.dart index 793dc552dd..7f72444224 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/extensions/path_extensions.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/extensions/path_extensions.dart @@ -1,4 +1,4 @@ -import 'package:flowy_editor/document/path.dart'; +import 'package:flowy_editor/src/document/path.dart'; import 'dart:math'; diff --git a/frontend/app_flowy/packages/flowy_editor/lib/extensions/text_node_extensions.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/extensions/text_node_extensions.dart similarity index 88% rename from frontend/app_flowy/packages/flowy_editor/lib/extensions/text_node_extensions.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/extensions/text_node_extensions.dart index 29e90784ae..7b068f18d7 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/extensions/text_node_extensions.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/extensions/text_node_extensions.dart @@ -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) => diff --git a/frontend/app_flowy/packages/flowy_editor/lib/infra/flowy_svg.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/infra/flowy_svg.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_editor/lib/infra/flowy_svg.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/infra/flowy_svg.dart diff --git a/frontend/app_flowy/packages/flowy_editor/lib/infra/html_converter.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/infra/html_converter.dart similarity index 97% rename from frontend/app_flowy/packages/flowy_editor/lib/infra/html_converter.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/infra/html_converter.dart index 708e47cb85..d05f768895 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/infra/html_converter.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/infra/html_converter.dart @@ -1,8 +1,8 @@ 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/src/document/attributes.dart'; +import 'package:flowy_editor/src/document/node.dart'; +import 'package:flowy_editor/src/document/text_delta.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:html/parser.dart' show parse; diff --git a/frontend/app_flowy/packages/flowy_editor/lib/operation/operation.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/operation/operation.dart similarity index 98% rename from frontend/app_flowy/packages/flowy_editor/lib/operation/operation.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/operation/operation.dart index 58fe8e2f14..fc5e7c66a3 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/operation/operation.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/operation/operation.dart @@ -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 { diff --git a/frontend/app_flowy/packages/flowy_editor/lib/operation/transaction.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/operation/transaction.dart similarity index 95% rename from frontend/app_flowy/packages/flowy_editor/lib/operation/transaction.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/operation/transaction.dart index 5dcf167628..76e375e5f8 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/operation/transaction.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/operation/transaction.dart @@ -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 diff --git a/frontend/app_flowy/packages/flowy_editor/lib/operation/transaction_builder.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/operation/transaction_builder.dart similarity index 90% rename from frontend/app_flowy/packages/flowy_editor/lib/operation/transaction_builder.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/operation/transaction_builder.dart index cececec924..4c080f06e2 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/operation/transaction_builder.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/operation/transaction_builder.dart @@ -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. diff --git a/frontend/app_flowy/packages/flowy_editor/lib/render/editor/editor_entry.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/render/editor/editor_entry.dart similarity index 88% rename from frontend/app_flowy/packages/flowy_editor/lib/render/editor/editor_entry.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/render/editor/editor_entry.dart index 9be82fa31a..90ee326e8b 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/render/editor/editor_entry.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/render/editor/editor_entry.dart @@ -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 { @override diff --git a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/bulleted_list_text.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/bulleted_list_text.dart similarity index 80% rename from frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/bulleted_list_text.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/bulleted_list_text.dart index 2607be26ed..9586f1192c 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/bulleted_list_text.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/bulleted_list_text.dart @@ -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 { diff --git a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/checkbox_text.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/checkbox_text.dart similarity index 88% rename from frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/checkbox_text.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/checkbox_text.dart index 073c339ed6..c7ba8607a6 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/checkbox_text.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/checkbox_text.dart @@ -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 { diff --git a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/default_selectable.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/default_selectable.dart similarity index 85% rename from frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/default_selectable.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/default_selectable.dart index 7ea93509c1..0a0ed09f05 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/default_selectable.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/default_selectable.dart @@ -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 { diff --git a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/flowy_rich_text.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/flowy_rich_text.dart similarity index 91% rename from frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/flowy_rich_text.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/flowy_rich_text.dart index a041d179b9..350a5c71e6 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/flowy_rich_text.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/flowy_rich_text.dart @@ -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); diff --git a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/heading_text.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/heading_text.dart similarity index 85% rename from frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/heading_text.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/heading_text.dart index c010ad4833..ddc7537476 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/heading_text.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/heading_text.dart @@ -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 { diff --git a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/number_list_text.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/number_list_text.dart similarity index 80% rename from frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/number_list_text.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/number_list_text.dart index 4ffd587470..bd08a30d80 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/number_list_text.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/number_list_text.dart @@ -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 { diff --git a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/quoted_text.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/quoted_text.dart similarity index 81% rename from frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/quoted_text.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/quoted_text.dart index 09004f7f9d..59cafd82af 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/quoted_text.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/quoted_text.dart @@ -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 { diff --git a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/rich_text.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/rich_text.dart similarity index 73% rename from frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/rich_text.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/rich_text.dart index bfb4c217a7..765c3b95d4 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/rich_text.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/rich_text.dart @@ -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 { diff --git a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/rich_text_style.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/rich_text_style.dart similarity index 98% rename from frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/rich_text_style.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/rich_text_style.dart index c44fd8dac1..c924709948 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/render/rich_text/rich_text_style.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/render/rich_text/rich_text_style.dart @@ -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'; diff --git a/frontend/app_flowy/packages/flowy_editor/lib/render/selection/cursor_widget.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/render/selection/cursor_widget.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_editor/lib/render/selection/cursor_widget.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/render/selection/cursor_widget.dart diff --git a/frontend/app_flowy/packages/flowy_editor/lib/render/selection/selectable.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/render/selection/selectable.dart similarity index 91% rename from frontend/app_flowy/packages/flowy_editor/lib/render/selection/selectable.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/render/selection/selectable.dart index 58377dcc02..bdea01b895 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/render/selection/selectable.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/render/selection/selectable.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'; /// diff --git a/frontend/app_flowy/packages/flowy_editor/lib/render/selection/selection_widget.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/render/selection/selection_widget.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_editor/lib/render/selection/selection_widget.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/render/selection/selection_widget.dart diff --git a/frontend/app_flowy/packages/flowy_editor/lib/render/selection/toolbar_widget.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/render/selection/toolbar_widget.dart similarity index 95% rename from frontend/app_flowy/packages/flowy_editor/lib/render/selection/toolbar_widget.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/render/selection/toolbar_widget.dart index 4423e674dc..68d78f484f 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/render/selection/toolbar_widget.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/render/selection/toolbar_widget.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); diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/default_text_operations/format_rich_text_style.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/default_text_operations/format_rich_text_style.dart similarity index 88% rename from frontend/app_flowy/packages/flowy_editor/lib/service/default_text_operations/format_rich_text_style.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/default_text_operations/format_rich_text_style.dart index ce6d733d73..3dcc519274 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/default_text_operations/format_rich_text_style.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/default_text_operations/format_rich_text_style.dart @@ -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, {}); diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/editor_service.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/editor_service.dart similarity index 62% rename from frontend/app_flowy/packages/flowy_editor/lib/service/editor_service.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/editor_service.dart index 2e38d5bbfb..b596f83c2a 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/editor_service.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/editor_service.dart @@ -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(), diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/input_service.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/input_service.dart similarity index 96% rename from frontend/app_flowy/packages/flowy_editor/lib/service/input_service.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/input_service.dart index 824fc07230..c52a411905 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/input_service.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/input_service.dart @@ -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); diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/arrow_keys_handler.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/arrow_keys_handler.dart similarity index 98% rename from frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/arrow_keys_handler.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/arrow_keys_handler.dart index 7fbdf669b5..83243d2dc7 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/arrow_keys_handler.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/arrow_keys_handler.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'; import 'package:flutter/services.dart'; diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/copy_paste_handler.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/copy_paste_handler.dart similarity index 98% rename from frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/copy_paste_handler.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/copy_paste_handler.dart index d3eeb073b9..57cc47d605 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/copy_paste_handler.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/copy_paste_handler.dart @@ -1,8 +1,8 @@ import 'package:html/dom.dart' as html; 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'; diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/delete_nodes_handler.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/delete_nodes_handler.dart similarity index 89% rename from frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/delete_nodes_handler.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/delete_nodes_handler.dart index dda52612e9..132f88854a 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/delete_nodes_handler.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/delete_nodes_handler.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) { diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/delete_text_handler.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/delete_text_handler.dart similarity index 97% rename from frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/delete_text_handler.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/delete_text_handler.dart index e44f0002a0..1bb6872ff4 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/delete_text_handler.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/delete_text_handler.dart @@ -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) { diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler.dart similarity index 88% rename from frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler.dart index 51e593a20b..136c06ab14 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler.dart @@ -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. /// diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/redo_undo_handler.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/redo_undo_handler.dart similarity index 86% rename from frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/redo_undo_handler.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/redo_undo_handler.dart index 75b22402e4..37892d9572 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/redo_undo_handler.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/redo_undo_handler.dart @@ -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'; diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/slash_handler.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/slash_handler.dart similarity index 94% rename from frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/slash_handler.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/slash_handler.dart index 4d77ef1ebc..6a265808fe 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/slash_handler.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/slash_handler.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'; diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/update_text_style_by_command_x_handler.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/update_text_style_by_command_x_handler.dart similarity index 83% rename from frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/update_text_style_by_command_x_handler.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/update_text_style_by_command_x_handler.dart index 02073563eb..4bd9382e3a 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/update_text_style_by_command_x_handler.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/update_text_style_by_command_x_handler.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) { diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/whitespace_handler.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/whitespace_handler.dart similarity index 88% rename from frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/whitespace_handler.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/whitespace_handler.dart index b3642cc1a1..41574e6aaa 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/whitespace_handler.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/internal_key_event_handlers/whitespace_handler.dart @@ -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]']; diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/keyboard_service.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/keyboard_service.dart similarity index 97% rename from frontend/app_flowy/packages/flowy_editor/lib/service/keyboard_service.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/keyboard_service.dart index 01cc0214a1..81ce8348a4 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/keyboard_service.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/keyboard_service.dart @@ -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 on State { diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/render_plugin_service.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/render_plugin_service.dart similarity index 97% rename from frontend/app_flowy/packages/flowy_editor/lib/service/render_plugin_service.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/render_plugin_service.dart index 8ac32ac66c..e973d16d6a 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/render_plugin_service.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/render_plugin_service.dart @@ -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'; diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/scroll_service.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/scroll_service.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_editor/lib/service/scroll_service.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/scroll_service.dart diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/selection_service.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/selection_service.dart similarity index 96% rename from frontend/app_flowy/packages/flowy_editor/lib/service/selection_service.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/selection_service.dart index 73a66dbc7a..19d355847f 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/selection_service.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/selection_service.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 on State { diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/service.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/service.dart similarity index 83% rename from frontend/app_flowy/packages/flowy_editor/lib/service/service.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/service.dart index e36312d7f3..cdf137bee8 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/service.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/service.dart @@ -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 diff --git a/frontend/app_flowy/packages/flowy_editor/lib/service/toolbar_service.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/service/toolbar_service.dart similarity index 94% rename from frontend/app_flowy/packages/flowy_editor/lib/service/toolbar_service.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/service/toolbar_service.dart index f2026acb23..a45fe8b778 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/service/toolbar_service.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/service/toolbar_service.dart @@ -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. diff --git a/frontend/app_flowy/packages/flowy_editor/lib/undo_manager.dart b/frontend/app_flowy/packages/flowy_editor/lib/src/undo_manager.dart similarity index 90% rename from frontend/app_flowy/packages/flowy_editor/lib/undo_manager.dart rename to frontend/app_flowy/packages/flowy_editor/lib/src/undo_manager.dart index 5b543f03a1..b81e91481f 100644 --- a/frontend/app_flowy/packages/flowy_editor/lib/undo_manager.dart +++ b/frontend/app_flowy/packages/flowy_editor/lib/src/undo_manager.dart @@ -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. diff --git a/frontend/app_flowy/packages/flowy_editor/test/delta_test.dart b/frontend/app_flowy/packages/flowy_editor/test/delta_test.dart index 9a914888d4..89001e79cf 100644 --- a/frontend/app_flowy/packages/flowy_editor/test/delta_test.dart +++ b/frontend/app_flowy/packages/flowy_editor/test/delta_test.dart @@ -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', () { diff --git a/frontend/app_flowy/packages/flowy_editor/test/flowy_editor_test.dart b/frontend/app_flowy/packages/flowy_editor/test/flowy_editor_test.dart index 49d0fd00f5..e1b97a591d 100644 --- a/frontend/app_flowy/packages/flowy_editor/test/flowy_editor_test.dart +++ b/frontend/app_flowy/packages/flowy_editor/test/flowy_editor_test.dart @@ -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'; diff --git a/frontend/app_flowy/packages/flowy_editor/test/operation_test.dart b/frontend/app_flowy/packages/flowy_editor/test/operation_test.dart index 339807cea4..6e97ce9930 100644 --- a/frontend/app_flowy/packages/flowy_editor/test/operation_test.dart +++ b/frontend/app_flowy/packages/flowy_editor/test/operation_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();