Skip to content

Commit

Permalink
refactor: add PlantUMLFramework as local package
Browse files Browse the repository at this point in the history
  • Loading branch information
bsorrentino committed Sep 12, 2022
1 parent 0c11a58 commit cddee30
Show file tree
Hide file tree
Showing 32 changed files with 1,678 additions and 259 deletions.
233 changes: 9 additions & 224 deletions PlantUML.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions PlantUML/PlantUMLDiagramObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Foundation
import PlantUMLFramework

class PlantUMLDiagramObject : ObservableObject, CustomStringConvertible {

Expand Down
1 change: 1 addition & 0 deletions PlantUML/PlantUMLEditorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import SwiftUI
import PlantUMLKeyboard
import PlantUMLFramework

// [Managing Focus in SwiftUI List Views](https://peterfriese.dev/posts/swiftui-list-focus/)
enum Focusable: Hashable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>1</integer>
<integer>2</integer>
</dict>
<key>SwiftPlantUMLView (Playground) 1.xcscheme</key>
<dict>
Expand Down Expand Up @@ -58,7 +58,7 @@
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>2</integer>
<integer>1</integer>
</dict>
</dict>
</dict>
Expand Down
9 changes: 9 additions & 0 deletions PlantUMLFramework/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DS_Store
/.build
/Packages
/*.xcodeproj
xcuserdata/
DerivedData/
.swiftpm/config/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
28 changes: 28 additions & 0 deletions PlantUMLFramework/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// swift-tools-version: 5.6
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "PlantUMLFramework",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "PlantUMLFramework",
targets: ["PlantUMLFramework"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "PlantUMLFramework",
dependencies: []),
.testTarget(
name: "PlantUMLFrameworkTests",
dependencies: ["PlantUMLFramework"]),
]
)
3 changes: 3 additions & 0 deletions PlantUMLFramework/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# PlantUMLFramework

A description of this package.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Foundation

/// Defines how to output the generated diagram
public enum ClassDiagramOutput: String, CaseIterable, Codable {
/// open class diagram in browser
case browser
/// open class diagram as image in browser
case browserImageOnly
/// print PlantUML script in console
case consoleOnly
}
299 changes: 299 additions & 0 deletions PlantUMLFramework/Sources/PlantUMLFramework/Configuration/Color.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,299 @@
import Foundation

/// Colors supported by PlantUML, see https://github.com/qywx/PlantUML-colors/blob/master/plantuml-colors-table.puml
public enum Color: String, CaseIterable, Codable {
/// AliceBlue
case AliceBlue
/// AntiqueWhite
case AntiqueWhite
/// Aqua
case Aqua
/// Aquamarine
case Aquamarine
/// Azure
case Azure
/// Beige
case Beige
/// Bisque
case Bisque
/// Black
case Black
/// BlanchedAlmond
case BlanchedAlmond
/// Blue
case Blue
/// BlueViolet
case BlueViolet
/// Brown
case Brown
/// BurlyWood
case BurlyWood
/// CadetBlue
case CadetBlue
/// Chartreuse
case Chartreuse
/// Chocolate
case Chocolate
/// Coral
case Coral
/// CornflowerBlue
case CornflowerBlue
/// Cornsilk
case Cornsilk
/// Crimson
case Crimson
/// Cyan
case Cyan
/// DarkBlue
case DarkBlue
/// DarkCyan
case DarkCyan
/// DarkGoldenRod
case DarkGoldenRod
/// DarkGray
case DarkGray
/// DarkGreen
case DarkGreen
/// DarkGrey
case DarkGrey
/// DarkKhaki
case DarkKhaki
/// DarkMagenta
case DarkMagenta
/// DarkOliveGreen
case DarkOliveGreen
/// DarkOrchid
case DarkOrchid
/// DarkRed
case DarkRed
/// DarkSalmon
case DarkSalmon
/// DarkSeaGreen
case DarkSeaGreen
/// DarkSlateBlue
case DarkSlateBlue
/// DarkSlateGray
case DarkSlateGray
/// DarkSlateGrey
case DarkSlateGrey
/// DarkTurquoise
case DarkTurquoise
/// DarkViolet
case DarkViolet
/// Darkorange
case Darkorange
/// DeepPink
case DeepPink
/// DeepSkyBlue
case DeepSkyBlue
/// DimGray
case DimGray
/// DimGrey
case DimGrey
/// DodgerBlue
case DodgerBlue
/// FireBrick
case FireBrick
/// FloralWhite
case FloralWhite
/// ForestGreen
case ForestGreen
/// Fuchsia
case Fuchsia
/// Gainsboro
case Gainsboro
/// GhostWhite
case GhostWhite
/// Gold
case Gold
/// GoldenRod
case GoldenRod
/// Gray
case Gray
/// Green
case Green
/// GreenYellow
case GreenYellow
/// Grey
case Grey
/// HoneyDew
case HoneyDew
/// HotPink
case HotPink
/// IndianRed
case IndianRed
/// Indigo
case Indigo
/// Ivory
case Ivory
/// Khaki
case Khaki
/// Lavender
case Lavender
/// LavenderBlush
case LavenderBlush
/// LawnGreen
case LawnGreen
/// LemonChiffon
case LemonChiffon
/// LightBlue
case LightBlue
/// LightCoral
case LightCoral
/// LightCyan
case LightCyan
/// LightGoldenRodYellow
case LightGoldenRodYellow
/// LightGray
case LightGray
/// LightGreen
case LightGreen
/// LightGrey
case LightGrey
/// LightPink
case LightPink
/// LightSalmon
case LightSalmon
/// LightSeaGreen
case LightSeaGreen
/// LightSkyBlue
case LightSkyBlue
/// LightSlateGray
case LightSlateGray
/// LightSlateGrey
case LightSlateGrey
/// LightSteelBlue
case LightSteelBlue
/// LightYellow
case LightYellow
/// Lime
case Lime
/// LimeGreen
case LimeGreen
/// Linen
case Linen
/// Magenta
case Magenta
/// Maroon
case Maroon
/// MediumAquaMarine
case MediumAquaMarine
/// MediumBlue
case MediumBlue
/// MediumOrchid
case MediumOrchid
/// MediumPurple
case MediumPurple
/// MediumSeaGreen
case MediumSeaGreen
/// MediumSlateBlue
case MediumSlateBlue
/// MediumSpringGreen
case MediumSpringGreen
/// MediumTurquoise
case MediumTurquoise
/// MediumVioletRed
case MediumVioletRed
/// MidnightBlue
case MidnightBlue
/// MintCream
case MintCream
/// MistyRose
case MistyRose
/// Moccasin
case Moccasin
/// NavajoWhite
case NavajoWhite
/// Navy
case Navy
/// OldLace
case OldLace
/// Olive
case Olive
/// OliveDrab
case OliveDrab
/// Orange
case Orange
/// OrangeRed
case OrangeRed
/// Orchid
case Orchid
/// PaleGoldenRod
case PaleGoldenRod
/// PaleGreen
case PaleGreen
/// PaleTurquoise
case PaleTurquoise
/// PaleVioletRed
case PaleVioletRed
/// PapayaWhip
case PapayaWhip
/// PeachPuff
case PeachPuff
/// Peru
case Peru
/// Pink
case Pink
/// Plum
case Plum
/// PowderBlue
case PowderBlue
/// Purple
case Purple
/// Red
case Red
/// RosyBrown
case RosyBrown
/// RoyalBlue
case RoyalBlue
/// SaddleBrown
case SaddleBrown
/// Salmon
case Salmon
/// SandyBrown
case SandyBrown
/// SeaGreen
case SeaGreen
/// SeaShell
case SeaShell
/// Sienna
case Sienna
/// Silver
case Silver
/// SkyBlue
case SkyBlue
/// SlateBlue
case SlateBlue
/// SlateGray
case SlateGray
/// SlateGrey
case SlateGrey
/// Snow
case Snow
/// SpringGreen
case SpringGreen
/// SteelBlue
case SteelBlue
/// Tan
case Tan
/// Teal
case Teal
/// Thistle
case Thistle
/// Tomato
case Tomato
/// Turquoise
case Turquoise
/// Violet
case Violet
/// Wheat
case Wheat
/// White
case White
/// WhiteSmoke
case WhiteSmoke
/// Yellow
case Yellow
/// YellowGreen
case YellowGreen
}
Loading

0 comments on commit cddee30

Please sign in to comment.