Skip to content

Commit c89ea36

Browse files
authored
chore: sync the latest code from main repo (#25)
1 parent 16b64cf commit c89ea36

File tree

27 files changed

+185
-81
lines changed

27 files changed

+185
-81
lines changed

CHANGELOG.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
## 0.1.3
2+
* chore: update the dependencies to the latest release by @LucasXu0 ([#25](https://github.com/AppFlowy-IO/appflowy-editor/pull/25)).
3+
14
## 0.1.2
2-
* fix: #7 bug on node iterator with nested nodes by @LucasXu0 in https://github.com/AppFlowy-IO/appflowy-editor/pull/11
3-
* fix: #8 SVG display error in the latest version by @LucasXu0 in https://github.com/AppFlowy-IO/appflowy-editor/pull/12
4-
* fix: #9 Using the mouse to highlight text very easy to miss the first letter by @LucasXu0 in https://github.com/AppFlowy-IO/appflowy-editor/pull/13
5-
* chore: fix some known issues by @LucasXu0 in https://github.com/AppFlowy-IO/appflowy-editor/pull/14
5+
* fix: bug on node iterator with nested nodes by @LucasXu0 ([#11](https://github.com/AppFlowy-IO/appflowy-editor/pull/11)).
6+
* fix: SVG display error in the latest version by @LucasXu0 ([#12](https://github.com/AppFlowy-IO/appflowy-editor/pull/12)).
7+
* fix: Using the mouse to highlight text very easy to miss the first letter by @LucasXu0 ([#13](https://github.com/AppFlowy-IO/appflowy-editor/pull/13)).
8+
* chore: fix some known issues by @LucasXu0 in ([#14](https://github.com/AppFlowy-IO/appflowy-editor/pull/14)).
69

710
## 0.1.1
811
* Relicense Appflowy Editor by @hyj1204.

example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>9.0</string>
24+
<string>11.0</string>
2525
</dict>
2626
</plist>

example/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '9.0'
2+
# platform :ios, '11.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 74 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
04FEAAC38F2370365B8414DC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E1F5D64F559698A15DB17B36 /* Pods_Runner.framework */; };
1011
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1112
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1213
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
@@ -35,26 +36,42 @@
3536
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
3637
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
3738
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
39+
7B9564C525FDA21960DC1568 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
40+
8ED982CC43DE110A1567B441 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
3841
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
3942
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
4043
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
4144
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
4245
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4346
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4447
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
48+
E1F5D64F559698A15DB17B36 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
49+
EA2F6824C2F8DF616F38D702 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
4550
/* End PBXFileReference section */
4651

4752
/* Begin PBXFrameworksBuildPhase section */
4853
97C146EB1CF9000F007C117D /* Frameworks */ = {
4954
isa = PBXFrameworksBuildPhase;
5055
buildActionMask = 2147483647;
5156
files = (
57+
04FEAAC38F2370365B8414DC /* Pods_Runner.framework in Frameworks */,
5258
);
5359
runOnlyForDeploymentPostprocessing = 0;
5460
};
5561
/* End PBXFrameworksBuildPhase section */
5662

5763
/* Begin PBXGroup section */
64+
2181B39B01004E1610D231F6 /* Pods */ = {
65+
isa = PBXGroup;
66+
children = (
67+
7B9564C525FDA21960DC1568 /* Pods-Runner.debug.xcconfig */,
68+
EA2F6824C2F8DF616F38D702 /* Pods-Runner.release.xcconfig */,
69+
8ED982CC43DE110A1567B441 /* Pods-Runner.profile.xcconfig */,
70+
);
71+
name = Pods;
72+
path = Pods;
73+
sourceTree = "<group>";
74+
};
5875
9740EEB11CF90186004384FC /* Flutter */ = {
5976
isa = PBXGroup;
6077
children = (
@@ -72,6 +89,8 @@
7289
9740EEB11CF90186004384FC /* Flutter */,
7390
97C146F01CF9000F007C117D /* Runner */,
7491
97C146EF1CF9000F007C117D /* Products */,
92+
2181B39B01004E1610D231F6 /* Pods */,
93+
DBB82516CCE88A0A80E570A6 /* Frameworks */,
7594
);
7695
sourceTree = "<group>";
7796
};
@@ -98,19 +117,29 @@
98117
path = Runner;
99118
sourceTree = "<group>";
100119
};
120+
DBB82516CCE88A0A80E570A6 /* Frameworks */ = {
121+
isa = PBXGroup;
122+
children = (
123+
E1F5D64F559698A15DB17B36 /* Pods_Runner.framework */,
124+
);
125+
name = Frameworks;
126+
sourceTree = "<group>";
127+
};
101128
/* End PBXGroup section */
102129

103130
/* Begin PBXNativeTarget section */
104131
97C146ED1CF9000F007C117D /* Runner */ = {
105132
isa = PBXNativeTarget;
106133
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107134
buildPhases = (
135+
D1756A9F757523FB742DC39D /* [CP] Check Pods Manifest.lock */,
108136
9740EEB61CF901F6004384FC /* Run Script */,
109137
97C146EA1CF9000F007C117D /* Sources */,
110138
97C146EB1CF9000F007C117D /* Frameworks */,
111139
97C146EC1CF9000F007C117D /* Resources */,
112140
9705A1C41CF9048500538489 /* Embed Frameworks */,
113141
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
142+
6953CBC33F9B7A821F1D3D6F /* [CP] Embed Pods Frameworks */,
114143
);
115144
buildRules = (
116145
);
@@ -171,6 +200,7 @@
171200
/* Begin PBXShellScriptBuildPhase section */
172201
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
173202
isa = PBXShellScriptBuildPhase;
203+
alwaysOutOfDate = 1;
174204
buildActionMask = 2147483647;
175205
files = (
176206
);
@@ -183,8 +213,26 @@
183213
shellPath = /bin/sh;
184214
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
185215
};
216+
6953CBC33F9B7A821F1D3D6F /* [CP] Embed Pods Frameworks */ = {
217+
isa = PBXShellScriptBuildPhase;
218+
buildActionMask = 2147483647;
219+
files = (
220+
);
221+
inputFileListPaths = (
222+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
223+
);
224+
name = "[CP] Embed Pods Frameworks";
225+
outputFileListPaths = (
226+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
227+
);
228+
runOnlyForDeploymentPostprocessing = 0;
229+
shellPath = /bin/sh;
230+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
231+
showEnvVarsInLog = 0;
232+
};
186233
9740EEB61CF901F6004384FC /* Run Script */ = {
187234
isa = PBXShellScriptBuildPhase;
235+
alwaysOutOfDate = 1;
188236
buildActionMask = 2147483647;
189237
files = (
190238
);
@@ -197,6 +245,28 @@
197245
shellPath = /bin/sh;
198246
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
199247
};
248+
D1756A9F757523FB742DC39D /* [CP] Check Pods Manifest.lock */ = {
249+
isa = PBXShellScriptBuildPhase;
250+
buildActionMask = 2147483647;
251+
files = (
252+
);
253+
inputFileListPaths = (
254+
);
255+
inputPaths = (
256+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
257+
"${PODS_ROOT}/Manifest.lock",
258+
);
259+
name = "[CP] Check Pods Manifest.lock";
260+
outputFileListPaths = (
261+
);
262+
outputPaths = (
263+
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
264+
);
265+
runOnlyForDeploymentPostprocessing = 0;
266+
shellPath = /bin/sh;
267+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
268+
showEnvVarsInLog = 0;
269+
};
200270
/* End PBXShellScriptBuildPhase section */
201271

202272
/* Begin PBXSourcesBuildPhase section */
@@ -272,7 +342,7 @@
272342
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
273343
GCC_WARN_UNUSED_FUNCTION = YES;
274344
GCC_WARN_UNUSED_VARIABLE = YES;
275-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
345+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
276346
MTL_ENABLE_DEBUG_INFO = NO;
277347
SDKROOT = iphoneos;
278348
SUPPORTED_PLATFORMS = iphoneos;
@@ -350,7 +420,7 @@
350420
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
351421
GCC_WARN_UNUSED_FUNCTION = YES;
352422
GCC_WARN_UNUSED_VARIABLE = YES;
353-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
423+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
354424
MTL_ENABLE_DEBUG_INFO = YES;
355425
ONLY_ACTIVE_ARCH = YES;
356426
SDKROOT = iphoneos;
@@ -399,7 +469,7 @@
399469
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
400470
GCC_WARN_UNUSED_FUNCTION = YES;
401471
GCC_WARN_UNUSED_VARIABLE = YES;
402-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
472+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
403473
MTL_ENABLE_DEBUG_INFO = NO;
404474
SDKROOT = iphoneos;
405475
SUPPORTED_PLATFORMS = iphoneos;

example/ios/Runner.xcworkspace/contents.xcworkspacedata

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/ios/Runner/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,7 @@
4545
<false/>
4646
<key>CADisableMinimumFrameDurationOnPhone</key>
4747
<true/>
48+
<key>UIApplicationSupportsIndirectInputEvents</key>
49+
<true/>
4850
</dict>
4951
</plist>

example/lib/home_page.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class _HomePageState extends State<HomePage> {
4848
ThemeData _themeData = ThemeData.light().copyWith(
4949
extensions: [
5050
...lightEditorStyleExtension,
51-
...lightPlguinStyleExtension,
51+
...lightPluginStyleExtension,
5252
],
5353
);
5454

@@ -159,7 +159,7 @@ Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC
159159
_themeData = ThemeData.dark().copyWith(
160160
extensions: [
161161
...darkEditorStyleExtension,
162-
...darkPlguinStyleExtension,
162+
...darkPluginStyleExtension,
163163
],
164164
);
165165
});
@@ -372,7 +372,7 @@ Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC
372372

373373
return Theme.of(context).copyWith(extensions: [
374374
editorStyle,
375-
...darkPlguinStyleExtension,
375+
...darkPluginStyleExtension,
376376
quote,
377377
]);
378378
}

example/lib/plugin/editor_theme.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ThemeData customizeEditorTheme(BuildContext context) {
3434

3535
return Theme.of(context).copyWith(extensions: [
3636
editorStyle,
37-
...darkPlguinStyleExtension,
37+
...darkPluginStyleExtension,
3838
quote,
3939
]);
4040
}

lib/appflowy_editor.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export 'src/extensions/attributes_extension.dart';
3131
export 'src/render/rich_text/default_selectable.dart';
3232
export 'src/render/rich_text/flowy_rich_text.dart';
3333
export 'src/render/selection_menu/selection_menu_widget.dart';
34+
export 'src/render/selection_menu/selection_menu_item_widget.dart';
3435
export 'src/l10n/l10n.dart';
3536
export 'src/render/style/plugin_styles.dart';
3637
export 'src/plugins/markdown/encoder/delta_markdown_encoder.dart';

lib/src/commands/command_extension.dart

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ extension CommandExtension on EditorState {
2525
} else if (path != null) {
2626
return document.nodeAtPath(path)!;
2727
}
28-
2928
throw Exception('path and node cannot be null at the same time');
3029
}
3130

@@ -38,33 +37,26 @@ extension CommandExtension on EditorState {
3837
} else if (path != null) {
3938
return document.nodeAtPath(path)! as TextNode;
4039
}
41-
4240
throw Exception('path and node cannot be null at the same time');
4341
}
4442

4543
Selection getSelection(
4644
Selection? selection,
4745
) {
46+
final currentSelection = service.selectionService.currentSelection.value;
4847
if (selection != null) {
4948
return selection;
50-
}
51-
52-
final currentSelection = service.selectionService.currentSelection.value;
53-
if (currentSelection != null) {
49+
} else if (currentSelection != null) {
5450
return currentSelection;
5551
}
56-
57-
throw Exception(
58-
'selection and selectionService.currentSelection cannot be null at the same time',
59-
);
52+
throw Exception('path and textNode cannot be null at the same time');
6053
}
6154

62-
String getTextInSelection(
55+
List<String> getTextInSelection(
6356
List<TextNode> textNodes,
6457
Selection selection,
6558
) {
6659
List<String> res = [];
67-
6860
if (selection.isSingle) {
6961
final plainText = textNodes.first.toPlainText();
7062
res.add(plainText.substring(selection.startIndex, selection.endIndex));
@@ -85,7 +77,6 @@ extension CommandExtension on EditorState {
8577
}
8678
}
8779
}
88-
89-
return res.join('\n');
80+
return res;
9081
}
9182
}

0 commit comments

Comments
 (0)