Skip to content

Commit

Permalink
feat: integrated line_editor package
Browse files Browse the repository at this point in the history
  • Loading branch information
bsorrentino committed Oct 21, 2022
1 parent cc2f4be commit 717cc7c
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 723 deletions.
24 changes: 20 additions & 4 deletions PlantUML.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
objects = {

/* Begin PBXBuildFile section */
A001E42C28DAF8750061E5BE /* Keyboard+Avoidance.swift in Sources */ = {isa = PBXBuildFile; fileRef = A001E42B28DAF8750061E5BE /* Keyboard+Avoidance.swift */; };
A02F69B228D1E19600090D97 /* PlantUMLFramework in Frameworks */ = {isa = PBXBuildFile; productRef = A02F69B128D1E19600090D97 /* PlantUMLFramework */; };
A043CE7C28E08C4C005A3AF7 /* PlantUMLKeyboard in Frameworks */ = {isa = PBXBuildFile; productRef = A043CE7B28E08C4C005A3AF7 /* PlantUMLKeyboard */; };
A0A42A76289ABC2D00E929EB /* PlantUMLDiagramView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0A42A75289ABC2D00E929EB /* PlantUMLDiagramView.swift */; };
Expand All @@ -22,6 +21,7 @@
A0D3C65E28984A10000838D7 /* PlantUMLTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0D3C65D28984A10000838D7 /* PlantUMLTests.swift */; };
A0D3C66828984A11000838D7 /* PlantUMLUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0D3C66728984A11000838D7 /* PlantUMLUITests.swift */; };
A0D3C66A28984A11000838D7 /* PlantUMLUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0D3C66928984A11000838D7 /* PlantUMLUITestsLaunchTests.swift */; };
A0F329202902AC5E00E0C47C /* LineEditor in Frameworks */ = {isa = PBXBuildFile; productRef = A0F3291F2902AC5E00E0C47C /* LineEditor */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -42,7 +42,6 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
A001E42B28DAF8750061E5BE /* Keyboard+Avoidance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Keyboard+Avoidance.swift"; sourceTree = "<group>"; };
A01552A228CF47DF00F2B8A1 /* PlantUMLFramework */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = PlantUMLFramework; sourceTree = "<group>"; };
A0A42A75289ABC2D00E929EB /* PlantUMLDiagramView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlantUMLDiagramView.swift; sourceTree = "<group>"; };
A0A42A78289AC37C00E929EB /* PlantUMLDiagramObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlantUMLDiagramObject.swift; sourceTree = "<group>"; };
Expand All @@ -69,6 +68,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
A0F329202902AC5E00E0C47C /* LineEditor in Frameworks */,
A043CE7C28E08C4C005A3AF7 /* PlantUMLKeyboard in Frameworks */,
A02F69B228D1E19600090D97 /* PlantUMLFramework in Frameworks */,
);
Expand Down Expand Up @@ -126,7 +126,6 @@
A0D3C64828984A0E000838D7 /* PlantUML */ = {
isa = PBXGroup;
children = (
A001E42B28DAF8750061E5BE /* Keyboard+Avoidance.swift */,
A0D3C64928984A0E000838D7 /* PlantUMLApp.swift */,
A0D3C64B28984A0E000838D7 /* PlantUMLDocument.swift */,
A0D3C64D28984A0E000838D7 /* PlantUMLEditorView.swift */,
Expand Down Expand Up @@ -184,6 +183,7 @@
packageProductDependencies = (
A02F69B128D1E19600090D97 /* PlantUMLFramework */,
A043CE7B28E08C4C005A3AF7 /* PlantUMLKeyboard */,
A0F3291F2902AC5E00E0C47C /* LineEditor */,
);
productName = PlantUML;
productReference = A0D3C64628984A0E000838D7 /* PlantUML.app */;
Expand Down Expand Up @@ -258,6 +258,7 @@
);
mainGroup = A0D3C63D28984A0E000838D7;
packageReferences = (
A0F3291E2902AC5E00E0C47C /* XCRemoteSwiftPackageReference "PlantUML4iPad" */,
);
productRefGroup = A0D3C64728984A0E000838D7 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -303,7 +304,6 @@
files = (
A0A42A79289AC37C00E929EB /* PlantUMLDiagramObject.swift in Sources */,
A0D3C64A28984A0E000838D7 /* PlantUMLApp.swift in Sources */,
A001E42C28DAF8750061E5BE /* Keyboard+Avoidance.swift in Sources */,
A0D3C64C28984A0E000838D7 /* PlantUMLDocument.swift in Sources */,
A0D3C64E28984A0E000838D7 /* PlantUMLEditorView.swift in Sources */,
A0A42A76289ABC2D00E929EB /* PlantUMLDiagramView.swift in Sources */,
Expand Down Expand Up @@ -634,6 +634,17 @@
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
A0F3291E2902AC5E00E0C47C /* XCRemoteSwiftPackageReference "PlantUML4iPad" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/bsorrentino/PlantUML4iPad.git";
requirement = {
branch = line_editor;
kind = branch;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
A02F69B128D1E19600090D97 /* PlantUMLFramework */ = {
isa = XCSwiftPackageProductDependency;
Expand All @@ -643,6 +654,11 @@
isa = XCSwiftPackageProductDependency;
productName = PlantUMLKeyboard;
};
A0F3291F2902AC5E00E0C47C /* LineEditor */ = {
isa = XCSwiftPackageProductDependency;
package = A0F3291E2902AC5E00E0C47C /* XCRemoteSwiftPackageReference "PlantUML4iPad" */;
productName = LineEditor;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = A0D3C63E28984A0E000838D7 /* Project object */;
Expand Down
13 changes: 8 additions & 5 deletions PlantUML/PlantUMLEditorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ import SwiftUI
import Combine
import PlantUMLFramework
import PlantUMLKeyboard
import LineEditor

// [Managing Focus in SwiftUI List Views](https://peterfriese.dev/posts/swiftui-list-focus/)
enum Focusable: Hashable {
case none
case row(id: String)
}
//enum Focusable: Hashable {
// case none
// case row(id: String)
//}

typealias PlantUMLLineEditorView = LineEditorView<SyntaxStructure,PlantUMLKeyboardView>

struct PlantUMLEditorView: View {
@Environment(\.editMode) private var editMode
Expand All @@ -32,7 +35,7 @@ struct PlantUMLEditorView: View {
GeometryReader { geometry in
HStack {
if( isEditorVisible ) {
LineEditorView<SyntaxStructure>( items: $diagram.items )
PlantUMLLineEditorView( items: $diagram.items )
}
if isPreviewVisible {
if isScaleToFit {
Expand Down
14 changes: 14 additions & 0 deletions PlantUML4iPad.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pins" : [
{
"identity" : "plantuml4ipad",
"kind" : "remoteSourceControl",
"location" : "https://github.com/bsorrentino/PlantUML4iPad.git",
"state" : {
"branch" : "line_editor",
"revision" : "d223b2688e5546206853e461af6f7c12d1958018"
}
}
],
"version" : 2
}
File renamed without changes.
Loading

0 comments on commit 717cc7c

Please sign in to comment.