Skip to content

Commit

Permalink
build: merge CodeViewer project in internal package PlantUMLEditor
Browse files Browse the repository at this point in the history
  • Loading branch information
bsorrentino committed Aug 20, 2023
1 parent 57c4543 commit e8123a2
Show file tree
Hide file tree
Showing 116 changed files with 3,249 additions and 28 deletions.
2 changes: 2 additions & 0 deletions PlantUML/PlantUMLContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import Combine
import PlantUMLFramework
import PlantUMLKeyboard
import LineEditor
import CodeViewer

import AppSecureStorage
//
// [Managing Focus in SwiftUI List Views](https://peterfriese.dev/posts/swiftui-list-focus/)
Expand Down
9 changes: 8 additions & 1 deletion PlantUMLApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
A036CC3D2A0FC67C003FDB5E /* PlantUMLKeyboard in Frameworks */ = {isa = PBXBuildFile; productRef = A084B53329EB15C50043B853 /* PlantUMLKeyboard */; };
A036CC3E2A0FC67C003FDB5E /* LineEditor in Frameworks */ = {isa = PBXBuildFile; productRef = A084B53529EB15C90043B853 /* LineEditor */; };
A036CC3F2A0FC67C003FDB5E /* PlantUMLFramework in Frameworks */ = {isa = PBXBuildFile; productRef = A0BD13F629EB16280048D9C6 /* PlantUMLFramework */; };
A036CF992A92C07A007FDEB6 /* CodeViewer in Frameworks */ = {isa = PBXBuildFile; productRef = A036CF982A92C07A007FDEB6 /* CodeViewer */; };
A038DB5C29D452880032E312 /* OpenAI.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = A038DB5B29D452880032E312 /* OpenAI.xcconfig */; };
A038DB6029D489BA0032E312 /* PlantUML+OpenAI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A038DB5F29D489BA0032E312 /* PlantUML+OpenAI.swift */; };
A047206F29549ACC007E061F /* SwiftUI+Share.swift in Sources */ = {isa = PBXBuildFile; fileRef = A047206E29549ACC007E061F /* SwiftUI+Share.swift */; };
Expand Down Expand Up @@ -121,6 +122,7 @@
A0A139332A12AD8700B69FBC /* AppSecureStorage in Frameworks */,
A0BD13F329EB161E0048D9C6 /* PlantUMLKeyboard in Frameworks */,
A0BD13F129EB161E0048D9C6 /* PlantUMLFramework in Frameworks */,
A036CF992A92C07A007FDEB6 /* CodeViewer in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -158,12 +160,12 @@
A0D3C63D28984A0E000838D7 = {
isa = PBXGroup;
children = (
A036CF972A92BCFF007FDEB6 /* PlantUMLEditor */,
A05F2E372A1FFC49007FDF36 /* CHANGELOG.md */,
A074F6982A16D40500061398 /* OpenAI.prod.xcconfig */,
A038DB5B29D452880032E312 /* OpenAI.xcconfig */,
A01907EF2951CD5C0059CCBE /* privacy_policy.md */,
A0943A6D29448A1700342426 /* AppStore.xcassets */,
A036CF972A92BCFF007FDEB6 /* PlantUMLEditor */,
A0A139312A129F5400B69FBC /* AppSecureStorage */,
A01552A228CF47DF00F2B8A1 /* PlantUMLFramework */,
A0EF7AF128C40A6300660F09 /* PlantUMLKeyboard */,
Expand Down Expand Up @@ -271,6 +273,7 @@
A0BD13F229EB161E0048D9C6 /* PlantUMLKeyboard */,
A0BD13F429EB161E0048D9C6 /* LineEditor */,
A0A139322A12AD8700B69FBC /* AppSecureStorage */,
A036CF982A92C07A007FDEB6 /* CodeViewer */,
);
productName = PlantUML;
productReference = A0D3C64628984A0E000838D7 /* PlantUMLApp.app */;
Expand Down Expand Up @@ -781,6 +784,10 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
A036CF982A92C07A007FDEB6 /* CodeViewer */ = {
isa = XCSwiftPackageProductDependency;
productName = CodeViewer;
};
A084B53329EB15C50043B853 /* PlantUMLKeyboard */ = {
isa = XCSwiftPackageProductDependency;
productName = PlantUMLKeyboard;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// CodeViewerExample_iOSApp.swift
// CodeViewerExample-iOS
//
// Created by Phuc on 07/09/2020.
// Copyright © 2020 Dwarves Foundattion. All rights reserved.
//

import SwiftUI

@main
struct CodeViewerExample_iOSApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
45 changes: 45 additions & 0 deletions PlantUMLEditor/Example/CodeViewerExample-iOS/ContentView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//
// ContentView.swift
// CodeViewerExample-iOS
//
// Created by Phuc on 07/09/2020.
// Copyright © 2020 Dwarves Foundattion. All rights reserved.
//

import SwiftUI
import CodeViewer

struct ContentView: View {

@State private var text = """
@startuml
participant A
@enduml
"""

var body: some View {
CodeViewer(
content: $text,
mode: .dot,
darkTheme: .dracula,
lightTheme: .chrome,
isReadOnly: false,
fontSize: 13
)


}
}

struct ContentView_Previews: PreviewProvider {
static var previews: some View {

ForEach(ColorScheme.allCases, id: \.self) {
ContentView()
.preferredColorScheme($0)
.previewDisplayName("\($0)")
}
}
}
50 changes: 50 additions & 0 deletions PlantUMLEditor/Example/CodeViewerExample-iOS/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
</dict>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchScreen</key>
<dict/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

0 comments on commit e8123a2

Please sign in to comment.