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.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
refactor: move built_in_attributes_key to core/legacy
Lucas.Xub10ff5e68ef3
diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/appflowy_editor.dart b/frontend/app_flowy/packages/appflowy_editor/lib/appflowy_editor.dartindex bccfd7cb16..82d9ccf5a6 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/appflowy_editor.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/appflowy_editor.dart@@ -10,7 +10,7 @@ export 'src/core/location/selection.dart';export 'src/core/state/document.dart';export 'src/core/document/text_delta.dart';export 'src/core/document/attributes.dart';-export 'src/document/built_in_attribute_keys.dart';+export 'src/core/legacy/built_in_attribute_keys.dart';export 'src/editor_state.dart';export 'src/operation/operation.dart';export 'src/operation/transaction.dart';diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/commands/format_built_in_text.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/commands/format_built_in_text.dartindex 320a0dd616..6a977bf2ef 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/commands/format_built_in_text.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/commands/format_built_in_text.dart@@ -1,7 +1,7 @@import 'package:appflowy_editor/src/commands/format_text.dart';import 'package:appflowy_editor/src/commands/text_command_infra.dart';import 'package:appflowy_editor/src/core/document/attributes.dart';-import 'package:appflowy_editor/src/document/built_in_attribute_keys.dart';+import 'package:appflowy_editor/src/core/legacy/built_in_attribute_keys.dart';import 'package:appflowy_editor/src/core/document/node.dart';import 'package:appflowy_editor/src/core/document/path.dart';import 'package:appflowy_editor/src/core/location/selection.dart';diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/node.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/node.dartindex 68c27cd55b..bb52629054 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/node.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/node.dart@@ -4,7 +4,7 @@ import 'package:flutter/material.dart';import 'package:appflowy_editor/src/core/document/attributes.dart';import 'package:appflowy_editor/src/core/document/path.dart';-import 'package:appflowy_editor/src/document/built_in_attribute_keys.dart';+import 'package:appflowy_editor/src/core/legacy/built_in_attribute_keys.dart';import 'package:appflowy_editor/src/core/document/text_delta.dart';class Node extends ChangeNotifier with LinkedListEntry<Node> {diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/document/built_in_attribute_keys.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/core/legacy/built_in_attribute_keys.dartsimilarity index 100%rename from frontend/app_flowy/packages/appflowy_editor/lib/src/document/built_in_attribute_keys.dartrename to frontend/app_flowy/packages/appflowy_editor/lib/src/core/legacy/built_in_attribute_keys.dartdiff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/core/state/document.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/core/state/document.dartindex 3fc5043aa2..7553e424ca 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/core/state/document.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/core/state/document.dart@@ -1,9 +1,9 @@import 'dart:collection';+import 'package:appflowy_editor/src/core/document/attributes.dart';import 'package:appflowy_editor/src/core/document/node.dart';import 'package:appflowy_editor/src/core/document/path.dart';import 'package:appflowy_editor/src/core/document/text_delta.dart';-import '../document/attributes.dart';/// [Document] reprensents a AppFlowy Editor document structure.///diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/extensions/attributes_extension.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/extensions/attributes_extension.dartindex 403a007d7f..816747fdad 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/extensions/attributes_extension.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/extensions/attributes_extension.dart@@ -1,5 +1,5 @@import 'package:appflowy_editor/src/core/document/attributes.dart';-import 'package:appflowy_editor/src/document/built_in_attribute_keys.dart';+import 'package:appflowy_editor/src/core/legacy/built_in_attribute_keys.dart';import 'package:flutter/material.dart';extension NodeAttributesExtensions on Attributes {diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/extensions/text_node_extensions.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/extensions/text_node_extensions.dartindex 9ceff7e373..48538f8bfb 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/extensions/text_node_extensions.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/extensions/text_node_extensions.dart@@ -3,7 +3,7 @@ import 'package:appflowy_editor/src/core/document/path.dart';import 'package:appflowy_editor/src/core/location/position.dart';import 'package:appflowy_editor/src/core/location/selection.dart';import 'package:appflowy_editor/src/core/document/text_delta.dart';-import 'package:appflowy_editor/src/document/built_in_attribute_keys.dart';+import 'package:appflowy_editor/src/core/legacy/built_in_attribute_keys.dart';extension TextNodeExtension on TextNode {T? getAttributeInSelection<T>(Selection selection, String styleKey) {diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/infra/html_converter.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/infra/html_converter.dartindex 2d00d369ce..b433657d4e 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/infra/html_converter.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/infra/html_converter.dart@@ -8,7 +8,7 @@ import 'package:appflowy_editor/src/extensions/color_extension.dart';import 'package:flutter/material.dart';import 'package:html/parser.dart' show parse;import 'package:html/dom.dart' as html;-import 'package:appflowy_editor/src/document/built_in_attribute_keys.dart';+import 'package:appflowy_editor/src/core/legacy/built_in_attribute_keys.dart';class HTMLTag {static const h1 = "h1";diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_service.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_service.dartindex 4da824db80..614546ef99 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_service.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_service.dart@@ -6,7 +6,7 @@ import 'package:appflowy_editor/src/render/selection_menu/selection_menu_widget.import 'package:appflowy_editor/src/service/default_text_operations/format_rich_text_style.dart';import 'package:flutter/material.dart';-import 'package:appflowy_editor/src/document/built_in_attribute_keys.dart';+import 'package:appflowy_editor/src/core/legacy/built_in_attribute_keys.dart';abstract class SelectionMenuService {Offset get topLeft;diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/default_text_operations/format_rich_text_style.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/default_text_operations/format_rich_text_style.dartindex ac9670173e..7ac67f0cfd 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/default_text_operations/format_rich_text_style.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/default_text_operations/format_rich_text_style.dart@@ -6,7 +6,7 @@ import 'package:appflowy_editor/src/core/location/selection.dart';import 'package:appflowy_editor/src/editor_state.dart';import 'package:appflowy_editor/src/extensions/text_node_extensions.dart';import 'package:appflowy_editor/src/operation/transaction_builder.dart';-import 'package:appflowy_editor/src/document/built_in_attribute_keys.dart';+import 'package:appflowy_editor/src/core/legacy/built_in_attribute_keys.dart';void insertHeadingAfterSelection(EditorState editorState, String heading) {insertTextNodeAfterSelection(editorState, {diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/number_list_helper.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/number_list_helper.dartindex 6bb51bce31..b03505a62e 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/number_list_helper.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/number_list_helper.dart@@ -1,6 +1,6 @@import 'package:appflowy_editor/src/core/location/selection.dart';import 'package:appflowy_editor/src/editor_state.dart';-import 'package:appflowy_editor/src/document/built_in_attribute_keys.dart';+import 'package:appflowy_editor/src/core/legacy/built_in_attribute_keys.dart';import 'package:appflowy_editor/src/operation/transaction_builder.dart';import 'package:appflowy_editor/src/core/document/attributes.dart';diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/whitespace_handler.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/whitespace_handler.dartindex de6f4d946c..09cc802516 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/whitespace_handler.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/whitespace_handler.dart@@ -1,7 +1,7 @@import 'package:appflowy_editor/src/service/shortcut_event/shortcut_event_handler.dart';import 'package:flutter/material.dart';import 'package:flutter/services.dart';-import 'package:appflowy_editor/src/document/built_in_attribute_keys.dart';+import 'package:appflowy_editor/src/core/legacy/built_in_attribute_keys.dart';import 'package:appflowy_editor/src/core/document/node.dart';import 'package:appflowy_editor/src/core/location/position.dart';import 'package:appflowy_editor/src/core/location/selection.dart';