diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-04 17:06:28 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-04 17:06:28 +0200 |
| commit | c843d34f56c207abcf4b93e424125eea2dc601e0 (patch) | |
| tree | 415dc2d9be4be31e290e1dd1dedb0b630c5e8fc6 /Map/Data/MapDocument.swift | |
| parent | ed10ac191df473c92c4fec495aafa7f569d108c8 (diff) | |
Upgrade to Swift 6
Diffstat (limited to 'Map/Data/MapDocument.swift')
| -rw-r--r-- | Map/Data/MapDocument.swift | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Map/Data/MapDocument.swift b/Map/Data/MapDocument.swift index 1b43efb..3c6d352 100644 --- a/Map/Data/MapDocument.swift +++ b/Map/Data/MapDocument.swift @@ -16,7 +16,7 @@ import SwiftUI import UniformTypeIdentifiers extension UTType { - static var exampleText: UTType { + static var wmap: UTType { UTType(importedAs: "systems.tranquil.map.wmap") } } @@ -24,11 +24,23 @@ extension UTType { struct MapDocument: FileDocument { var text: String - init(text: String = "Hello, world!") { + init( + text: String = """ + Anchor (60, 5) [x] + Node A (78, 23) + Node B (40, 30) [square] + Node C (65, 70) + + Anchor -> Node A + Anchor -> Node B + Node A -> Node C + Node B -> Node C + """ + ) { self.text = text } - static var readableContentTypes: [UTType] { [.exampleText] } + static var readableContentTypes: [UTType] { [.wmap] } init(configuration: ReadConfiguration) throws { guard let data = configuration.file.regularFileContents, |