Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

refactor: move document.dart to core/document

Lucas.Xu805bdc9d3209
diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/appflowy_editor.dart b/frontend/app_flowy/packages/appflowy_editor/lib/appflowy_editor.dart
index 82d9ccf5a6..a328b0d596 100644
--- a/frontend/app_flowy/packages/appflowy_editor/lib/appflowy_editor.dart
+++ b/frontend/app_flowy/packages/appflowy_editor/lib/appflowy_editor.dart
@@ -7,7 +7,7 @@ export 'src/core/document/node.dart';
export 'src/core/document/path.dart';
export 'src/core/location/position.dart';
export 'src/core/location/selection.dart';
-export 'src/core/state/document.dart';
+export 'src/core/document/document.dart';
export 'src/core/document/text_delta.dart';
export 'src/core/document/attributes.dart';
export 'src/core/legacy/built_in_attribute_keys.dart';
diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/core/state/document.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/document.dart
similarity index 100%
rename from frontend/app_flowy/packages/appflowy_editor/lib/src/core/state/document.dart
rename to frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/document.dart
diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/node_iterator.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/node_iterator.dart
index 9f611177a1..d275023ba0 100644
--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/node_iterator.dart
+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/node_iterator.dart
@@ -1,5 +1,5 @@
import 'package:appflowy_editor/src/core/document/node.dart';
-import 'package:appflowy_editor/src/core/state/document.dart';
+import 'package:appflowy_editor/src/core/document/document.dart';
/// [NodeIterator] is used to traverse the nodes in visual order.
class NodeIterator implements Iterator<Node> {
diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/editor_state.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/editor_state.dart
index 3dfb5e56e5..e72f171c7b 100644
--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/editor_state.dart
+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/editor_state.dart
@@ -6,7 +6,7 @@ import 'package:appflowy_editor/src/service/service.dart';
import 'package:flutter/material.dart';
import 'package:appflowy_editor/src/core/location/selection.dart';
-import 'package:appflowy_editor/src/core/state/document.dart';
+import 'package:appflowy_editor/src/core/document/document.dart';
import 'package:appflowy_editor/src/operation/operation.dart';
import 'package:appflowy_editor/src/operation/transaction.dart';
import 'package:appflowy_editor/src/undo_manager.dart';
diff --git a/frontend/app_flowy/packages/appflowy_editor/test/core/state/document_test.dart b/frontend/app_flowy/packages/appflowy_editor/test/core/document/document_test.dart
similarity index 100%
rename from frontend/app_flowy/packages/appflowy_editor/test/core/state/document_test.dart
rename to frontend/app_flowy/packages/appflowy_editor/test/core/document/document_test.dart
diff --git a/frontend/app_flowy/packages/appflowy_editor/test/legacy/operation_test.dart b/frontend/app_flowy/packages/appflowy_editor/test/legacy/operation_test.dart
index 98b8310595..30813865a8 100644
--- a/frontend/app_flowy/packages/appflowy_editor/test/legacy/operation_test.dart
+++ b/frontend/app_flowy/packages/appflowy_editor/test/legacy/operation_test.dart
@@ -5,7 +5,7 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:appflowy_editor/src/operation/operation.dart';
import 'package:appflowy_editor/src/operation/transaction_builder.dart';
import 'package:appflowy_editor/src/editor_state.dart';
-import 'package:appflowy_editor/src/core/state/document.dart';
+import 'package:appflowy_editor/src/core/document/document.dart';
void main() {
TestWidgetsFlutterBinding.ensureInitialized();