aboutsummaryrefslogtreecommitdiff
path: root/Map/Core Extensions
diff options
context:
space:
mode:
Diffstat (limited to 'Map/Core Extensions')
-rw-r--r--Map/Core Extensions/Color+Theme.swift27
-rw-r--r--Map/Core Extensions/Date+format.swift17
-rw-r--r--Map/Core Extensions/Font+Theme.swift8
-rw-r--r--Map/Core Extensions/NSColor+Theme.swift10
-rw-r--r--Map/Core Extensions/NSImage+writePNG.swift25
5 files changed, 0 insertions, 87 deletions
diff --git a/Map/Core Extensions/Color+Theme.swift b/Map/Core Extensions/Color+Theme.swift
deleted file mode 100644
index ffbd224..0000000
--- a/Map/Core Extensions/Color+Theme.swift
+++ /dev/null
@@ -1,27 +0,0 @@
-import SwiftUI
-
-extension Color {
- struct theme {
- static let darkSlate = Color("Dark Slate")
- static let jasperRed = Color("Jasper Red")
- static let olympicBlue = Color("Olympic Blue")
- static let neutralGray = Color("Neutral Gray")
- static let lightNeutralGray = Color("Light Neutral Gray")
- static let darkNeutralGray = Color("Dark Neutral Gray")
- }
-
- struct map {
- static let labelColor = Color.theme.darkSlate
- static let axisColor = Color.theme.darkSlate
- static let vertexColor = Color.theme.darkSlate
- static let blockerColor = Color.theme.jasperRed
- static let opportunityColor = Color.theme.olympicBlue
- static let stageForeground = Color.theme.lightNeutralGray
- static let stageBackground = Color.white
- }
-
- struct ui {
- static let foreground = Color("Foreground")
- static let background = Color("Background")
- }
-}
diff --git a/Map/Core Extensions/Date+format.swift b/Map/Core Extensions/Date+format.swift
deleted file mode 100644
index d29ed0f..0000000
--- a/Map/Core Extensions/Date+format.swift
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// Date+format.swift
-// Map
-//
-// Created by Ruben Beltran del Rio on 2/1/21.
-//
-
-import Foundation
-
-extension Date {
- func format() -> String {
- let formatter = DateFormatter()
- formatter.dateStyle = .short
- formatter.timeStyle = .medium
- return formatter.string(from: self)
- }
-}
diff --git a/Map/Core Extensions/Font+Theme.swift b/Map/Core Extensions/Font+Theme.swift
deleted file mode 100644
index 30bc6f9..0000000
--- a/Map/Core Extensions/Font+Theme.swift
+++ /dev/null
@@ -1,8 +0,0 @@
-import SwiftUI
-
-public extension Font {
- struct theme {
- static let axisLabel = Font.custom("Hiragino Mincho ProN", size: 14)
- static let vertexLabel = Font.custom("Hiragino Mincho ProN", size: 12)
- }
-}
diff --git a/Map/Core Extensions/NSColor+Theme.swift b/Map/Core Extensions/NSColor+Theme.swift
deleted file mode 100644
index 0ef1094..0000000
--- a/Map/Core Extensions/NSColor+Theme.swift
+++ /dev/null
@@ -1,10 +0,0 @@
-import AppKit
-
-extension NSColor {
- struct syntax {
- static let vertex = NSColor(named: "Vertex") ?? .textColor
- static let number = NSColor(named: "Number") ?? .textColor
- static let option = NSColor(named: "Option") ?? .textColor
- static let symbol = NSColor(named: "Symbol") ?? .textColor
- }
-}
diff --git a/Map/Core Extensions/NSImage+writePNG.swift b/Map/Core Extensions/NSImage+writePNG.swift
deleted file mode 100644
index c24c0cf..0000000
--- a/Map/Core Extensions/NSImage+writePNG.swift
+++ /dev/null
@@ -1,25 +0,0 @@
-import Cocoa
-
-extension NSImage {
- public func writePNG(toURL url: URL) {
-
- guard let data = tiffRepresentation,
- let rep = NSBitmapImageRep(data: data),
- let imgData = rep.representation(
- using: .png, properties: [.compressionFactor: NSNumber(floatLiteral: 1.0)])
- else {
-
- print(
- "\(self.self) Error Function '\(#function)' Line: \(#line) No tiff rep found for image writing to \(url)"
- )
- return
- }
-
- do {
- try imgData.write(to: url)
- } catch let error {
- print(
- "\(self.self) Error Function '\(#function)' Line: \(#line) \(error.localizedDescription)")
- }
- }
-}