Fixes for 0.4.1 !324
17 files changed, +156 −48
Layout: unified · split
Sources/OrgApp/DocxWriter.swift +8 −1
| @@ -23,7 +23,7 @@ enum DocxWriter { | |||
| 23 | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | 23 | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
| 24 | <w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" \ | 24 | <w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" \ |
| 25 | xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><w:body>\(body)\ | 25 | xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><w:body>\(body)\ |
| 26 | <w:sectPr><w:pgMar w:top="1134" w:right="1134" w:bottom="1134" w:left="1134" w:header="0" w:footer="0" w:gutter="0"/></w:sectPr>\ | 26 | \(section(letter: PDFExport.usesLetter()))\ |
| 27 | </w:body></w:document> | 27 | </w:body></w:document> |
| 28 | """ | 28 | """ |
| 29 | let relationships = links.enumerated().map { index, url in | 29 | let relationships = links.enumerated().map { index, url in |
| @@ -52,6 +52,13 @@ enum DocxWriter { | |||
| 52 | return zip.data() | 52 | return zip.data() |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | /// The page: Letter or A4, as PDF export has it. Without a size, readers pick their own, and | ||
| 56 | /// Quick Look and Pages pick a narrow one. | ||
| 57 | static func section(letter: Bool) -> String { | ||
| 58 | let size = letter ? "<w:pgSz w:w=\"12240\" w:h=\"15840\"/>" : "<w:pgSz w:w=\"11906\" w:h=\"16838\"/>" | ||
| 59 | return "<w:sectPr>\(size)<w:pgMar w:top=\"1134\" w:right=\"1134\" w:bottom=\"1134\" w:left=\"1134\" w:header=\"0\" w:footer=\"0\" w:gutter=\"0\"/></w:sectPr>" | ||
| 60 | } | ||
| 61 | |||
| 55 | /// Paragraphs in order, consecutive ones in the same table gathered into `<w:tbl>`. | 62 | /// Paragraphs in order, consecutive ones in the same table gathered into `<w:tbl>`. |
| 56 | /// A `<w:tbl>` of rows of cells, each cell its paragraphs. | 63 | /// A `<w:tbl>` of rows of cells, each cell its paragraphs. |
| 57 | static func table(_ rows: [[String]], columns: Int) -> String { | 64 | static func table(_ rows: [[String]], columns: Int) -> String { |
Sources/OrgApp/PDFExport.swift +6 −2
| @@ -9,6 +9,11 @@ import UIKit | |||
| 9 | /// PDF from the HTML export, laid out and paginated by WebKit as printing does: no Emacs or TeX. | 9 | /// PDF from the HTML export, laid out and paginated by WebKit as printing does: no Emacs or TeX. |
| 10 | @MainActor | 10 | @MainActor |
| 11 | public enum PDFExport { | 11 | public enum PDFExport { |
| 12 | /// US Letter where it's the custom, A4 elsewhere. | ||
| 13 | nonisolated static func usesLetter(_ region: String? = Locale.current.region?.identifier) -> Bool { | ||
| 14 | ["US", "CA", "MX", "PH", "CL", "CO", "VE", "PR"].contains(region ?? "") | ||
| 15 | } | ||
| 16 | |||
| 12 | public struct Failure: Error, CustomStringConvertible { | 17 | public struct Failure: Error, CustomStringConvertible { |
| 13 | public let description: String | 18 | public let description: String |
| 14 | } | 19 | } |
| @@ -99,8 +104,7 @@ public enum PDFExport { | |||
| 99 | } | 104 | } |
| 100 | #else | 105 | #else |
| 101 | private static func render(_ webView: WKWebView) async throws -> Data { | 106 | private static func render(_ webView: WKWebView) async throws -> Data { |
| 102 | // US Letter where it's the custom, A4 elsewhere. | 107 | let letter = usesLetter() |
| 103 | let letter = ["US", "CA", "MX", "PH", "CL", "CO", "VE", "PR"].contains(Locale.current.region?.identifier ?? "") | ||
| 104 | let paper = CGRect(x: 0, y: 0, width: letter ? 612 : 595.2, height: letter ? 792 : 841.8) | 108 | let paper = CGRect(x: 0, y: 0, width: letter ? 612 : 595.2, height: letter ? 792 : 841.8) |
| 105 | let renderer = UIPrintPageRenderer() | 109 | let renderer = UIPrintPageRenderer() |
| 106 | renderer.addPrintFormatter(webView.viewPrintFormatter(), startingAtPageAt: 0) | 110 | renderer.addPrintFormatter(webView.viewPrintFormatter(), startingAtPageAt: 0) |
Sources/OrgCore/Commands/StructureCommands.swift +3 −1
| @@ -47,7 +47,9 @@ extension EmacsBuffer { | |||
| 47 | let blank = blankBeforeHeading | 47 | let blank = blankBeforeHeading |
| 48 | let level = currentLevel | 48 | let level = currentLevel |
| 49 | let stars = String(repeating: "*", count: level ?? 1) | 49 | let stars = String(repeating: "*", count: level ?? 1) |
| 50 | let invisible = hidden.contains { $0.contains(max(point - 1, 0)) } | 50 | // The caret at the end of a folded heading's line, just before its hidden body, is where |
| 51 | // Emacs's point sits behind the ellipsis. | ||
| 52 | let invisible = hidden.contains { $0.contains(max(point - 1, 0)) || (!$0.isEmpty && $0.lowerBound == point + 1 && atHeading && eolp) } | ||
| 51 | if respectContent || invisible { | 53 | if respectContent || invisible { |
| 52 | if level == nil { | 54 | if level == nil { |
| 53 | outlineNextHeading() | 55 | outlineNextHeading() |
Sources/OrgEditorAppKit/Theme.swift +3
| @@ -68,6 +68,9 @@ struct Theme { | |||
| 68 | style.firstLineHeadIndent = CGFloat(firstLine) * column | 68 | style.firstLineHeadIndent = CGFloat(firstLine) * column |
| 69 | style.headIndent = CGFloat(wrapped) * column | 69 | style.headIndent = CGFloat(wrapped) * column |
| 70 | style.lineSpacing = CGFloat(max(0, spec.lineSpacing)) | 70 | style.lineSpacing = CGFloat(max(0, spec.lineSpacing)) |
| 71 | // `tab-width` 8, counted from the line's own start, past org-indent's indentation. | ||
| 72 | style.defaultTabInterval = 8 * column | ||
| 73 | style.tabStops = (1...32).map { NSTextTab(textAlignment: .left, location: style.firstLineHeadIndent + CGFloat($0 * 8) * column) } | ||
| 71 | return style | 74 | return style |
| 72 | } | 75 | } |
| 73 | 76 | ||
Sources/OrgstarMobile/CaptureScreen.swift +17 −2
| @@ -271,6 +271,16 @@ struct QuestionField: View { | |||
| 271 | if !tags.contains(choice) { answer = (tags + [choice]).joined(separator: ":") } | 271 | if !tags.contains(choice) { answer = (tags + [choice]).joined(separator: ":") } |
| 272 | } | 272 | } |
| 273 | 273 | ||
| 274 | /// `date` at the next whole hour from now when it has no time of day yet, for a time | ||
| 275 | /// switched on; otherwise as it is. | ||
| 276 | static func timed(_ date: Date, now: Date = Date()) -> Date { | ||
| 277 | let calendar = Calendar.current | ||
| 278 | let parts = calendar.dateComponents([.hour, .minute], from: date) | ||
| 279 | guard parts.hour == 0, parts.minute == 0 else { return date } | ||
| 280 | let hour = min(calendar.component(.hour, from: now) + 1, 23) | ||
| 281 | return calendar.date(bySettingHour: hour, minute: 0, second: 0, of: date) ?? date | ||
| 282 | } | ||
| 283 | |||
| 274 | static func stamp(_ date: Date, withTime: Bool) -> String { | 284 | static func stamp(_ date: Date, withTime: Bool) -> String { |
| 275 | let formatter = DateFormatter() | 285 | let formatter = DateFormatter() |
| 276 | formatter.locale = Locale(identifier: "en_US_POSIX") | 286 | formatter.locale = Locale(identifier: "en_US_POSIX") |
| @@ -335,7 +345,7 @@ private struct EntryFields: View { | |||
| 335 | } | 345 | } |
| 336 | 346 | ||
| 337 | static func initial(_ stamp: Timestamp?) -> Date { | 347 | static func initial(_ stamp: Timestamp?) -> Date { |
| 338 | guard let stamp else { return Date() } | 348 | guard let stamp else { return Calendar.current.startOfDay(for: Date()) } |
| 339 | let point = stamp.start | 349 | let point = stamp.start |
| 340 | return Calendar.current.date(from: DateComponents(year: point.year, month: point.month, day: point.day, hour: point.hour, minute: point.minute)) ?? Date() | 350 | return Calendar.current.date(from: DateComponents(year: point.year, month: point.month, day: point.day, hour: point.hour, minute: point.minute)) ?? Date() |
| 341 | } | 351 | } |
| @@ -363,6 +373,7 @@ private struct DateTimeSheet: View { | |||
| 363 | Form { | 373 | Form { |
| 364 | DatePicker(title, selection: $date, displayedComponents: .date).datePickerStyle(.graphical) | 374 | DatePicker(title, selection: $date, displayedComponents: .date).datePickerStyle(.graphical) |
| 365 | Toggle("Time", isOn: $withTime) | 375 | Toggle("Time", isOn: $withTime) |
| 376 | .onChange(of: withTime) { if withTime { date = QuestionField.timed(date) } } | ||
| 366 | if withTime { DatePicker("Time", selection: $date, displayedComponents: .hourAndMinute) } | 377 | if withTime { DatePicker("Time", selection: $date, displayedComponents: .hourAndMinute) } |
| 367 | } | 378 | } |
| 368 | .navigationTitle(title) | 379 | .navigationTitle(title) |
| @@ -373,7 +384,11 @@ private struct DateTimeSheet: View { | |||
| 373 | } | 384 | } |
| 374 | } | 385 | } |
| 375 | .presentationDetents([.large]) | 386 | .presentationDetents([.large]) |
| 376 | .onAppear { date = initial } | 387 | .onAppear { |
| 388 | date = initial | ||
| 389 | let parts = Calendar.current.dateComponents([.hour, .minute], from: initial) | ||
| 390 | withTime = parts.hour != 0 || parts.minute != 0 | ||
| 391 | } | ||
| 377 | } | 392 | } |
| 378 | } | 393 | } |
| 379 | 394 | ||
Sources/OrgstarMobile/EditorScreen.swift +13 −13
| @@ -649,10 +649,10 @@ struct KeyBar: View { | |||
| 649 | private static let keys: [(label: String, symbol: String?, keys: String)] = [ | 649 | private static let keys: [(label: String, symbol: String?, keys: String)] = [ |
| 650 | ("Fold", "arrow.right.to.line", "TAB"), | 650 | ("Fold", "arrow.right.to.line", "TAB"), |
| 651 | ("Overview", "arrow.left.to.line", "S-TAB"), | 651 | ("Overview", "arrow.left.to.line", "S-TAB"), |
| 652 | ("Promote", "arrow.left", "M-<left>"), | 652 | ("Promote", "decrease.indent", "M-<left>"), |
| 653 | ("Demote", "arrow.right", "M-<right>"), | 653 | ("Demote", "increase.indent", "M-<right>"), |
| 654 | ("Move up", "arrow.up", "M-<up>"), | 654 | ("Move up", "arrow.up.square", "M-<up>"), |
| 655 | ("Move down", "arrow.down", "M-<down>"), | 655 | ("Move down", "arrow.down.square", "M-<down>"), |
| 656 | ("New heading or item", "plus", "M-RET"), | 656 | ("New heading or item", "plus", "M-RET"), |
| 657 | ("TODO", nil, "C-c C-t"), | 657 | ("TODO", nil, "C-c C-t"), |
| 658 | ("Act at point", "checkmark.square", "C-c C-c"), | 658 | ("Act at point", "checkmark.square", "C-c C-c"), |
| @@ -691,6 +691,7 @@ struct PromptSheet: View { | |||
| 691 | let answer: (String?) -> Void | 691 | let answer: (String?) -> Void |
| 692 | @State private var text = "" | 692 | @State private var text = "" |
| 693 | @State private var date = Date() | 693 | @State private var date = Date() |
| 694 | @State private var withTime = false | ||
| 694 | @State private var keys: [FastSelection.Input] = [] | 695 | @State private var keys: [FastSelection.Input] = [] |
| 695 | 696 | ||
| 696 | var body: some View { | 697 | var body: some View { |
| @@ -710,7 +711,13 @@ struct PromptSheet: View { | |||
| 710 | if prompt.date != nil { | 711 | if prompt.date != nil { |
| 711 | DatePicker("Date", selection: $date, displayedComponents: [.date]) | 712 | DatePicker("Date", selection: $date, displayedComponents: [.date]) |
| 712 | .datePickerStyle(.graphical) | 713 | .datePickerStyle(.graphical) |
| 713 | .onChange(of: date) { text = Self.stamp(date) } | 714 | .onChange(of: date) { text = QuestionField.stamp(date, withTime: withTime) } |
| 715 | Toggle("Time", isOn: $withTime) | ||
| 716 | .onChange(of: withTime) { | ||
| 717 | if withTime { date = QuestionField.timed(date) } | ||
| 718 | text = QuestionField.stamp(date, withTime: withTime) | ||
| 719 | } | ||
| 720 | if withTime { DatePicker("Time", selection: $date, displayedComponents: .hourAndMinute) } | ||
| 714 | } | 721 | } |
| 715 | if !prompt.choices.isEmpty { | 722 | if !prompt.choices.isEmpty { |
| 716 | let matching = prompt.choices.filter { lastPart.isEmpty || $0.localizedCaseInsensitiveContains(lastPart) } | 723 | let matching = prompt.choices.filter { lastPart.isEmpty || $0.localizedCaseInsensitiveContains(lastPart) } |
| @@ -736,7 +743,7 @@ struct PromptSheet: View { | |||
| 736 | } | 743 | } |
| 737 | .onAppear { | 744 | .onAppear { |
| 738 | text = prompt.initial | 745 | text = prompt.initial |
| 739 | if let day = prompt.date?.defaultDate { date = day } | 746 | date = prompt.date?.defaultDate ?? Calendar.current.startOfDay(for: Date()) |
| 740 | } | 747 | } |
| 741 | } | 748 | } |
| 742 | 749 | ||
| @@ -781,13 +788,6 @@ struct PromptSheet: View { | |||
| 781 | if fast.multiple, !fast.inherited.isEmpty { Text("Inherited: :" + fast.inherited.joined(separator: ":") + ":") } | 788 | if fast.multiple, !fast.inherited.isEmpty { Text("Inherited: :" + fast.inherited.joined(separator: ":") + ":") } |
| 782 | } | 789 | } |
| 783 | } | 790 | } |
| 784 | |||
| 785 | static func stamp(_ date: Date) -> String { | ||
| 786 | let formatter = DateFormatter() | ||
| 787 | formatter.locale = Locale(identifier: "en_US_POSIX") | ||
| 788 | formatter.dateFormat = "yyyy-MM-dd" | ||
| 789 | return formatter.string(from: date) | ||
| 790 | } | ||
| 791 | } | 791 | } |
| 792 | 792 | ||
| 793 | /// `org-edit-special` and `org-table-edit-field`: the text edited apart, put back with Save. | 793 | /// `org-edit-special` and `org-table-edit-field`: the text edited apart, put back with Save. |
Sources/OrgstarMobile/MobileEditor+Display.swift +14 −2
| @@ -221,13 +221,25 @@ extension MobileEditor { | |||
| 221 | textView.scrollRangeToVisible(NSRange(location: target, length: 0)) | 221 | textView.scrollRangeToVisible(NSRange(location: target, length: 0)) |
| 222 | } | 222 | } |
| 223 | 223 | ||
| 224 | /// The caret left hidden text (a tap past a fold): what hides it opens. | 224 | /// The caret in hidden text: an arrow key moving forward into a fold jumps past it and |
| 225 | /// moving back jumps to the end of the heading line, as on the Mac; a tap past a fold | ||
| 226 | /// opens it. | ||
| 225 | func selectionChanged() { | 227 | func selectionChanged() { |
| 226 | let interval = Perf.begin("editor.selection") | 228 | let interval = Perf.begin("editor.selection") |
| 227 | defer { interval.end() } | 229 | defer { interval.end() } |
| 228 | redrawSelectedBlocks() | 230 | redrawSelectedBlocks() |
| 229 | let caret = textView.selectedRange.location | 231 | let caret = textView.selectedRange.location |
| 230 | if hidden.containing(caret) != nil { unfold(around: caret) } | 232 | defer { |
| 233 | previousCaret = textView.selectedRange.location | ||
| 234 | movedByArrow = false | ||
| 235 | } | ||
| 236 | if let range = hidden.containing(caret) { | ||
| 237 | if movedByArrow, textView.selectedRange.length == 0 { | ||
| 238 | textView.selectedRange = NSRange(location: caret >= previousCaret ? range.upperBound : range.lowerBound - 1, length: 0) | ||
| 239 | } else { | ||
| 240 | unfold(around: caret) | ||
| 241 | } | ||
| 242 | } | ||
| 231 | revealCaretLine() | 243 | revealCaretLine() |
| 232 | } | 244 | } |
| 233 | } | 245 | } |
Sources/OrgstarMobile/MobileEditor.swift +4
| @@ -108,6 +108,9 @@ final class MobileEditor: NSObject, DocumentBuffer { | |||
| 108 | internal(set) var fold = FoldState() | 108 | internal(set) var fold = FoldState() |
| 109 | var globalVisibility: GlobalVisibility? | 109 | var globalVisibility: GlobalVisibility? |
| 110 | let hidden = LockedRanges() | 110 | let hidden = LockedRanges() |
| 111 | /// An arrow key moved the caret, and where it was before; the caret skips folds then. | ||
| 112 | var movedByArrow = false | ||
| 113 | var previousCaret = 0 | ||
| 111 | /// Blocks drawn on a band. | 114 | /// Blocks drawn on a band. |
| 112 | let shaded = LockedRanges() | 115 | let shaded = LockedRanges() |
| 113 | let fragmentStyle = FragmentStyle() | 116 | let fragmentStyle = FragmentStyle() |
| @@ -444,6 +447,7 @@ final class MobileEditor: NSObject, DocumentBuffer { | |||
| 444 | /// The Emacs keymap's commands on an iPad keyboard. Keys it doesn't bind, Command shortcuts | 447 | /// The Emacs keymap's commands on an iPad keyboard. Keys it doesn't bind, Command shortcuts |
| 445 | /// and editing keys (C-a, C-e, C-k...) are the text system's. | 448 | /// and editing keys (C-a, C-e, C-k...) are the text system's. |
| 446 | func handleKey(_ key: UIKey) -> Bool { | 449 | func handleKey(_ key: UIKey) -> Bool { |
| 450 | movedByArrow = [.keyboardUpArrow, .keyboardDownArrow, .keyboardLeftArrow, .keyboardRightArrow].contains(key.keyCode) | ||
| 447 | guard let chord = Self.chord(key), !chord.modifiers.contains(.command) else { return false } | 451 | guard let chord = Self.chord(key), !chord.modifiers.contains(.command) else { return false } |
| 448 | if isearch != nil, isearchKey(chord) { return true } | 452 | if isearch != nil, isearchKey(chord) { return true } |
| 449 | if modal { return handleModal(chord) } | 453 | if modal { return handleModal(chord) } |
Sources/OrgstarMobile/MobileTheme.swift +3
| @@ -74,6 +74,9 @@ struct MobileTheme { | |||
| 74 | style.firstLineHeadIndent = CGFloat(firstLine) * column | 74 | style.firstLineHeadIndent = CGFloat(firstLine) * column |
| 75 | style.headIndent = CGFloat(wrapped) * column | 75 | style.headIndent = CGFloat(wrapped) * column |
| 76 | style.lineSpacing = CGFloat(max(0, spec.lineSpacing)) | 76 | style.lineSpacing = CGFloat(max(0, spec.lineSpacing)) |
| 77 | // `tab-width` 8, counted from the line's own start, past org-indent's indentation. | ||
| 78 | style.defaultTabInterval = 8 * column | ||
| 79 | style.tabStops = (1...32).map { NSTextTab(textAlignment: .left, location: style.firstLineHeadIndent + CGFloat($0 * 8) * column) } | ||
| 77 | return style | 80 | return style |
| 78 | } | 81 | } |
| 79 | 82 | ||
Tests/OrgAppTests/RichTextExportTests.swift +8
| @@ -45,11 +45,19 @@ struct RichTextExportTests { | |||
| 45 | let data = DocxWriter.data(from: try RichTextExport.attributed(html: page, directory: nil), tables: tables) | 45 | let data = DocxWriter.data(from: try RichTextExport.attributed(html: page, directory: nil), tables: tables) |
| 46 | let xml = String(decoding: data, as: UTF8.self) | 46 | let xml = String(decoding: data, as: UTF8.self) |
| 47 | #expect(xml.contains("<w:tbl>") && !xml.contains("\u{E000}")) | 47 | #expect(xml.contains("<w:tbl>") && !xml.contains("\u{E000}")) |
| 48 | // A page size of its own, or readers choose a narrow one. | ||
| 49 | #expect(xml.contains("<w:pgSz w:w=")) | ||
| 48 | let back = try NSAttributedString(data: data, options: [:], documentAttributes: nil).string | 50 | let back = try NSAttributedString(data: data, options: [:], documentAttributes: nil).string |
| 49 | #expect(back.contains("Report") && back.contains("Count") && back.contains("second"), "\(back)") | 51 | #expect(back.contains("Report") && back.contains("Count") && back.contains("second"), "\(back)") |
| 50 | #expect(RichTextExport.decode("a &lt; éA "") == "a < éA \"") | 52 | #expect(RichTextExport.decode("a &lt; éA "") == "a < éA \"") |
| 51 | } | 53 | } |
| 52 | 54 | ||
| 55 | @Test func wordPagesAreLetterOrA4() { | ||
| 56 | #expect(PDFExport.usesLetter("US") && !PDFExport.usesLetter("DE") && !PDFExport.usesLetter(nil)) | ||
| 57 | #expect(DocxWriter.section(letter: true).contains("<w:pgSz w:w=\"12240\" w:h=\"15840\"/>")) | ||
| 58 | #expect(DocxWriter.section(letter: false).contains("<w:pgSz w:w=\"11906\" w:h=\"16838\"/>")) | ||
| 59 | } | ||
| 60 | |||
| 53 | @Test func plainTextAndDarkSystemsStayReadable() throws { | 61 | @Test func plainTextAndDarkSystemsStayReadable() throws { |
| 54 | let text = try RichTextExport.attributed(html: Self.html, directory: nil) | 62 | let text = try RichTextExport.attributed(html: Self.html, directory: nil) |
| 55 | let plain = RichTextExport.plain(text) | 63 | let plain = RichTextExport.plain(text) |
Tests/OrgCoreTests/StructureCommandTests.swift +15
| @@ -35,6 +35,21 @@ struct StructureCommandTests { | |||
| 35 | } | 35 | } |
| 36 | #expect(result.selection == [9..<9]) | 36 | #expect(result.selection == [9..<9]) |
| 37 | } | 37 | } |
| 38 | |||
| 39 | /// The caret at the end of a folded heading stands for Emacs's point behind the ellipsis: | ||
| 40 | /// the new heading goes after the subtree, not between the heading and its folded body. | ||
| 41 | @Test func newHeadingAtTheEndOfAFoldedHeadingGoesAfterTheSubtree() { | ||
| 42 | let text = "* One\nbody one\n** One child\nchild body\n* Two\nbody two\n" | ||
| 43 | // As the editors hide a folded heading: the lines after it, to its section's end. | ||
| 44 | let fold = 6..<(text as NSString).range(of: "* Two").location | ||
| 45 | let context = EditContext(revision: 0, text: text, tree: OrgParser.parse(text), selection: [5..<5], hidden: [fold]) | ||
| 46 | guard case .commit(let result) = InsertHeading().run(in: context) else { | ||
| 47 | Issue.record("expected a commit") | ||
| 48 | return | ||
| 49 | } | ||
| 50 | let new = result.edits.sorted { $0.range.lowerBound > $1.range.lowerBound }.reduce(text) { $1.apply(to: $0) } | ||
| 51 | #expect(new == "* One\nbody one\n** One child\nchild body\n* \n* Two\nbody two\n") | ||
| 52 | } | ||
| 38 | } | 53 | } |
| 39 | 54 | ||
| 40 | struct StructureOracleTests { | 55 | struct StructureOracleTests { |
Tests/OrgEditorAppKitTests/EditorTests.swift +9
| @@ -136,6 +136,15 @@ struct FoldingTests { | |||
| 136 | #expect(h.caret == 3) | 136 | #expect(h.caret == 3) |
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | @Test func newHeadingAtTheEndOfAFoldedHeadingGoesAfterItsSubtree() { | ||
| 140 | let h = Harness(outline) | ||
| 141 | h.caret(at: 1) | ||
| 142 | h.editor.cycleAtCaret() | ||
| 143 | h.caret(at: 3) | ||
| 144 | h.editor.run("org.heading.insert") | ||
| 145 | #expect(h.string == "* a\nbody\n** b\nmore\n* \n* c\ntext\n") | ||
| 146 | } | ||
| 147 | |||
| 139 | @Test func copyingAcrossAFoldIncludesHiddenText() { | 148 | @Test func copyingAcrossAFoldIncludesHiddenText() { |
| 140 | let h = Harness(outline) | 149 | let h = Harness(outline) |
| 141 | h.caret(at: 1) | 150 | h.caret(at: 1) |
Tests/OrgEditorAppKitTests/TabTests.swift added +26
| @@ -0,0 +1,26 @@ | |||
| 1 | import AppKit | ||
| 2 | import OrgDocument | ||
| 3 | import Testing | ||
| 4 | @testable import OrgEditorAppKit | ||
| 5 | |||
| 6 | /// Tabs stop every 8 columns from the line's start, as `tab-width` 8 does in Emacs, so text | ||
| 7 | /// aligned with spaces under a tab-indented line stays aligned. | ||
| 8 | @MainActor | ||
| 9 | struct TabTests { | ||
| 10 | static let text = "* Lists\n\t1. Spelling and\n vice-versa.\n\t\ta. Design\n should\n" | ||
| 11 | |||
| 12 | func x(_ h: Harness, _ needle: String) -> CGFloat { | ||
| 13 | h.layout() | ||
| 14 | let offset = (Self.text as NSString).range(of: needle).location | ||
| 15 | return h.textView.firstRect(forCharacterRange: NSRange(location: offset, length: 1), actualRange: nil).minX | ||
| 16 | } | ||
| 17 | |||
| 18 | @Test(arguments: [true, false]) func tabsAreEightColumns(indented: Bool) { | ||
| 19 | let h = Harness(DocumentState(bytes: Array(Self.text.utf8)), layout: false) | ||
| 20 | h.editor.indented = indented | ||
| 21 | h.editor.restyleOutsideEditing(0..<(Self.text as NSString).length) | ||
| 22 | h.drainStyling() | ||
| 23 | #expect(abs(x(h, "Spelling") - x(h, "vice")) < 1) | ||
| 24 | #expect(abs(x(h, "Design") - x(h, "should")) < 1) | ||
| 25 | } | ||
| 26 | } | ||
ios/Orgstar.xcodeproj/project.pbxproj +24 −24
| @@ -700,7 +700,7 @@ | |||
| 700 | isa = XCBuildConfiguration; | 700 | isa = XCBuildConfiguration; |
| 701 | buildSettings = { | 701 | buildSettings = { |
| 702 | CODE_SIGN_STYLE = Automatic; | 702 | CODE_SIGN_STYLE = Automatic; |
| 703 | CURRENT_PROJECT_VERSION = 6; | 703 | CURRENT_PROJECT_VERSION = 7; |
| 704 | DEVELOPMENT_TEAM = ZCNAX3VL9D; | 704 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 705 | GENERATE_INFOPLIST_FILE = NO; | 705 | GENERATE_INFOPLIST_FILE = NO; |
| 706 | INFOPLIST_FILE = OrgstarQuickLook/Info.plist; | 706 | INFOPLIST_FILE = OrgstarQuickLook/Info.plist; |
| @@ -709,7 +709,7 @@ | |||
| 709 | "@executable_path/Frameworks", | 709 | "@executable_path/Frameworks", |
| 710 | "@executable_path/../../Frameworks", | 710 | "@executable_path/../../Frameworks", |
| 711 | ); | 711 | ); |
| 712 | MARKETING_VERSION = 0.4.0; | 712 | MARKETING_VERSION = 0.4.1; |
| 713 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.quicklook; | 713 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.quicklook; |
| 714 | PRODUCT_NAME = "$(TARGET_NAME)"; | 714 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 715 | SKIP_INSTALL = YES; | 715 | SKIP_INSTALL = YES; |
| @@ -722,7 +722,7 @@ | |||
| 722 | buildSettings = { | 722 | buildSettings = { |
| 723 | CODE_SIGN_ENTITLEMENTS = OrgstarShare/OrgstarShare.entitlements; | 723 | CODE_SIGN_ENTITLEMENTS = OrgstarShare/OrgstarShare.entitlements; |
| 724 | CODE_SIGN_STYLE = Automatic; | 724 | CODE_SIGN_STYLE = Automatic; |
| 725 | CURRENT_PROJECT_VERSION = 6; | 725 | CURRENT_PROJECT_VERSION = 7; |
| 726 | DEVELOPMENT_TEAM = ZCNAX3VL9D; | 726 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 727 | GENERATE_INFOPLIST_FILE = NO; | 727 | GENERATE_INFOPLIST_FILE = NO; |
| 728 | INFOPLIST_FILE = OrgstarShare/Info.plist; | 728 | INFOPLIST_FILE = OrgstarShare/Info.plist; |
| @@ -731,7 +731,7 @@ | |||
| 731 | "@executable_path/Frameworks", | 731 | "@executable_path/Frameworks", |
| 732 | "@executable_path/../../Frameworks", | 732 | "@executable_path/../../Frameworks", |
| 733 | ); | 733 | ); |
| 734 | MARKETING_VERSION = 0.4.0; | 734 | MARKETING_VERSION = 0.4.1; |
| 735 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.share; | 735 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.share; |
| 736 | PRODUCT_NAME = "$(TARGET_NAME)"; | 736 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 737 | SKIP_INSTALL = YES; | 737 | SKIP_INSTALL = YES; |
| @@ -744,7 +744,7 @@ | |||
| 744 | buildSettings = { | 744 | buildSettings = { |
| 745 | CODE_SIGN_ENTITLEMENTS = OrgstarShare/OrgstarShare.entitlements; | 745 | CODE_SIGN_ENTITLEMENTS = OrgstarShare/OrgstarShare.entitlements; |
| 746 | CODE_SIGN_STYLE = Automatic; | 746 | CODE_SIGN_STYLE = Automatic; |
| 747 | CURRENT_PROJECT_VERSION = 6; | 747 | CURRENT_PROJECT_VERSION = 7; |
| 748 | DEVELOPMENT_TEAM = ZCNAX3VL9D; | 748 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 749 | GENERATE_INFOPLIST_FILE = NO; | 749 | GENERATE_INFOPLIST_FILE = NO; |
| 750 | INFOPLIST_FILE = OrgstarShare/Info.plist; | 750 | INFOPLIST_FILE = OrgstarShare/Info.plist; |
| @@ -753,7 +753,7 @@ | |||
| 753 | "@executable_path/Frameworks", | 753 | "@executable_path/Frameworks", |
| 754 | "@executable_path/../../Frameworks", | 754 | "@executable_path/../../Frameworks", |
| 755 | ); | 755 | ); |
| 756 | MARKETING_VERSION = 0.4.0; | 756 | MARKETING_VERSION = 0.4.1; |
| 757 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.share; | 757 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.share; |
| 758 | PRODUCT_NAME = "$(TARGET_NAME)"; | 758 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 759 | SKIP_INSTALL = YES; | 759 | SKIP_INSTALL = YES; |
| @@ -767,7 +767,7 @@ | |||
| 767 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 767 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| 768 | CODE_SIGN_ENTITLEMENTS = Orgstar/Orgstar.entitlements; | 768 | CODE_SIGN_ENTITLEMENTS = Orgstar/Orgstar.entitlements; |
| 769 | CODE_SIGN_STYLE = Automatic; | 769 | CODE_SIGN_STYLE = Automatic; |
| 770 | CURRENT_PROJECT_VERSION = 6; | 770 | CURRENT_PROJECT_VERSION = 7; |
| 771 | DEVELOPMENT_TEAM = ZCNAX3VL9D; | 771 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 772 | GENERATE_INFOPLIST_FILE = NO; | 772 | GENERATE_INFOPLIST_FILE = NO; |
| 773 | INFOPLIST_FILE = Orgstar/Info.plist; | 773 | INFOPLIST_FILE = Orgstar/Info.plist; |
| @@ -777,7 +777,7 @@ | |||
| 777 | "$(inherited)", | 777 | "$(inherited)", |
| 778 | "@executable_path/Frameworks", | 778 | "@executable_path/Frameworks", |
| 779 | ); | 779 | ); |
| 780 | MARKETING_VERSION = 0.4.0; | 780 | MARKETING_VERSION = 0.4.1; |
| 781 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar; | 781 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar; |
| 782 | PRODUCT_MODULE_NAME = OrgstarMobile; | 782 | PRODUCT_MODULE_NAME = OrgstarMobile; |
| 783 | PRODUCT_NAME = Orgstar; | 783 | PRODUCT_NAME = Orgstar; |
| @@ -790,7 +790,7 @@ | |||
| 790 | buildSettings = { | 790 | buildSettings = { |
| 791 | CODE_SIGN_ENTITLEMENTS = OrgstarWidgets/OrgstarWidgets.entitlements; | 791 | CODE_SIGN_ENTITLEMENTS = OrgstarWidgets/OrgstarWidgets.entitlements; |
| 792 | CODE_SIGN_STYLE = Automatic; | 792 | CODE_SIGN_STYLE = Automatic; |
| 793 | CURRENT_PROJECT_VERSION = 6; | 793 | CURRENT_PROJECT_VERSION = 7; |
| 794 | DEVELOPMENT_TEAM = ZCNAX3VL9D; | 794 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 795 | GENERATE_INFOPLIST_FILE = NO; | 795 | GENERATE_INFOPLIST_FILE = NO; |
| 796 | INFOPLIST_FILE = OrgstarWidgets/Info.plist; | 796 | INFOPLIST_FILE = OrgstarWidgets/Info.plist; |
| @@ -800,7 +800,7 @@ | |||
| 800 | "@executable_path/Frameworks", | 800 | "@executable_path/Frameworks", |
| 801 | "@executable_path/../../Frameworks", | 801 | "@executable_path/../../Frameworks", |
| 802 | ); | 802 | ); |
| 803 | MARKETING_VERSION = 0.4.0; | 803 | MARKETING_VERSION = 0.4.1; |
| 804 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.widgets; | 804 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.widgets; |
| 805 | PRODUCT_NAME = "$(TARGET_NAME)"; | 805 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 806 | SKIP_INSTALL = YES; | 806 | SKIP_INSTALL = YES; |
| @@ -812,7 +812,7 @@ | |||
| 812 | isa = XCBuildConfiguration; | 812 | isa = XCBuildConfiguration; |
| 813 | buildSettings = { | 813 | buildSettings = { |
| 814 | CODE_SIGN_STYLE = Automatic; | 814 | CODE_SIGN_STYLE = Automatic; |
| 815 | CURRENT_PROJECT_VERSION = 6; | 815 | CURRENT_PROJECT_VERSION = 7; |
| 816 | DEVELOPMENT_TEAM = ZCNAX3VL9D; | 816 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 817 | GENERATE_INFOPLIST_FILE = NO; | 817 | GENERATE_INFOPLIST_FILE = NO; |
| 818 | INFOPLIST_FILE = OrgstarQuickLook/Info.plist; | 818 | INFOPLIST_FILE = OrgstarQuickLook/Info.plist; |
| @@ -821,7 +821,7 @@ | |||
| 821 | "@executable_path/Frameworks", | 821 | "@executable_path/Frameworks", |
| 822 | "@executable_path/../../Frameworks", | 822 | "@executable_path/../../Frameworks", |
| 823 | ); | 823 | ); |
| 824 | MARKETING_VERSION = 0.4.0; | 824 | MARKETING_VERSION = 0.4.1; |
| 825 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.quicklook; | 825 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.quicklook; |
| 826 | PRODUCT_NAME = "$(TARGET_NAME)"; | 826 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 827 | SKIP_INSTALL = YES; | 827 | SKIP_INSTALL = YES; |
| @@ -852,7 +852,7 @@ | |||
| 852 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 852 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| 853 | CODE_SIGN_ENTITLEMENTS = Orgstar/Orgstar.entitlements; | 853 | CODE_SIGN_ENTITLEMENTS = Orgstar/Orgstar.entitlements; |
| 854 | CODE_SIGN_STYLE = Automatic; | 854 | CODE_SIGN_STYLE = Automatic; |
| 855 | CURRENT_PROJECT_VERSION = 6; | 855 | CURRENT_PROJECT_VERSION = 7; |
| 856 | DEVELOPMENT_TEAM = ZCNAX3VL9D; | 856 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 857 | GENERATE_INFOPLIST_FILE = NO; | 857 | GENERATE_INFOPLIST_FILE = NO; |
| 858 | INFOPLIST_FILE = Orgstar/Info.plist; | 858 | INFOPLIST_FILE = Orgstar/Info.plist; |
| @@ -862,7 +862,7 @@ | |||
| 862 | "$(inherited)", | 862 | "$(inherited)", |
| 863 | "@executable_path/Frameworks", | 863 | "@executable_path/Frameworks", |
| 864 | ); | 864 | ); |
| 865 | MARKETING_VERSION = 0.4.0; | 865 | MARKETING_VERSION = 0.4.1; |
| 866 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar; | 866 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar; |
| 867 | PRODUCT_MODULE_NAME = OrgstarMobile; | 867 | PRODUCT_MODULE_NAME = OrgstarMobile; |
| 868 | PRODUCT_NAME = Orgstar; | 868 | PRODUCT_NAME = Orgstar; |
| @@ -875,7 +875,7 @@ | |||
| 875 | buildSettings = { | 875 | buildSettings = { |
| 876 | CODE_SIGN_ENTITLEMENTS = OrgstarWidgets/OrgstarWidgets.entitlements; | 876 | CODE_SIGN_ENTITLEMENTS = OrgstarWidgets/OrgstarWidgets.entitlements; |
| 877 | CODE_SIGN_STYLE = Automatic; | 877 | CODE_SIGN_STYLE = Automatic; |
| 878 | CURRENT_PROJECT_VERSION = 6; | 878 | CURRENT_PROJECT_VERSION = 7; |
| 879 | DEVELOPMENT_TEAM = ZCNAX3VL9D; | 879 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 880 | GENERATE_INFOPLIST_FILE = NO; | 880 | GENERATE_INFOPLIST_FILE = NO; |
| 881 | INFOPLIST_FILE = OrgstarWidgets/Info.plist; | 881 | INFOPLIST_FILE = OrgstarWidgets/Info.plist; |
| @@ -885,7 +885,7 @@ | |||
| 885 | "@executable_path/Frameworks", | 885 | "@executable_path/Frameworks", |
| 886 | "@executable_path/../../Frameworks", | 886 | "@executable_path/../../Frameworks", |
| 887 | ); | 887 | ); |
| 888 | MARKETING_VERSION = 0.4.0; | 888 | MARKETING_VERSION = 0.4.1; |
| 889 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.widgets; | 889 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.widgets; |
| 890 | PRODUCT_NAME = "$(TARGET_NAME)"; | 890 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 891 | SKIP_INSTALL = YES; | 891 | SKIP_INSTALL = YES; |
| @@ -919,7 +919,7 @@ | |||
| 919 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 919 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| 920 | CODE_SIGN_ENTITLEMENTS = OrgstarWatch/OrgstarWatch.entitlements; | 920 | CODE_SIGN_ENTITLEMENTS = OrgstarWatch/OrgstarWatch.entitlements; |
| 921 | CODE_SIGN_STYLE = Automatic; | 921 | CODE_SIGN_STYLE = Automatic; |
| 922 | CURRENT_PROJECT_VERSION = 6; | 922 | CURRENT_PROJECT_VERSION = 7; |
| 923 | DEVELOPMENT_TEAM = ZCNAX3VL9D; | 923 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 924 | GENERATE_INFOPLIST_FILE = NO; | 924 | GENERATE_INFOPLIST_FILE = NO; |
| 925 | INFOPLIST_FILE = OrgstarWatch/Info.plist; | 925 | INFOPLIST_FILE = OrgstarWatch/Info.plist; |
| @@ -927,7 +927,7 @@ | |||
| 927 | "$(inherited)", | 927 | "$(inherited)", |
| 928 | "@executable_path/Frameworks", | 928 | "@executable_path/Frameworks", |
| 929 | ); | 929 | ); |
| 930 | MARKETING_VERSION = 0.4.0; | 930 | MARKETING_VERSION = 0.4.1; |
| 931 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp; | 931 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp; |
| 932 | PRODUCT_NAME = "$(TARGET_NAME)"; | 932 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 933 | SDKROOT = watchos; | 933 | SDKROOT = watchos; |
| @@ -944,7 +944,7 @@ | |||
| 944 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 944 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| 945 | CODE_SIGN_ENTITLEMENTS = OrgstarWatch/OrgstarWatch.entitlements; | 945 | CODE_SIGN_ENTITLEMENTS = OrgstarWatch/OrgstarWatch.entitlements; |
| 946 | CODE_SIGN_STYLE = Automatic; | 946 | CODE_SIGN_STYLE = Automatic; |
| 947 | CURRENT_PROJECT_VERSION = 6; | 947 | CURRENT_PROJECT_VERSION = 7; |
| 948 | DEVELOPMENT_TEAM = ZCNAX3VL9D; | 948 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 949 | GENERATE_INFOPLIST_FILE = NO; | 949 | GENERATE_INFOPLIST_FILE = NO; |
| 950 | INFOPLIST_FILE = OrgstarWatch/Info.plist; | 950 | INFOPLIST_FILE = OrgstarWatch/Info.plist; |
| @@ -952,7 +952,7 @@ | |||
| 952 | "$(inherited)", | 952 | "$(inherited)", |
| 953 | "@executable_path/Frameworks", | 953 | "@executable_path/Frameworks", |
| 954 | ); | 954 | ); |
| 955 | MARKETING_VERSION = 0.4.0; | 955 | MARKETING_VERSION = 0.4.1; |
| 956 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp; | 956 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp; |
| 957 | PRODUCT_NAME = "$(TARGET_NAME)"; | 957 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 958 | SDKROOT = watchos; | 958 | SDKROOT = watchos; |
| @@ -969,7 +969,7 @@ | |||
| 969 | SKIP_INSTALL = YES; | 969 | SKIP_INSTALL = YES; |
| 970 | CODE_SIGN_ENTITLEMENTS = OrgstarWatchWidgets/OrgstarWatchWidgets.entitlements; | 970 | CODE_SIGN_ENTITLEMENTS = OrgstarWatchWidgets/OrgstarWatchWidgets.entitlements; |
| 971 | CODE_SIGN_STYLE = Automatic; | 971 | CODE_SIGN_STYLE = Automatic; |
| 972 | CURRENT_PROJECT_VERSION = 6; | 972 | CURRENT_PROJECT_VERSION = 7; |
| 973 | DEVELOPMENT_TEAM = ZCNAX3VL9D; | 973 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 974 | GENERATE_INFOPLIST_FILE = NO; | 974 | GENERATE_INFOPLIST_FILE = NO; |
| 975 | INFOPLIST_FILE = OrgstarWatchWidgets/Info.plist; | 975 | INFOPLIST_FILE = OrgstarWatchWidgets/Info.plist; |
| @@ -978,7 +978,7 @@ | |||
| 978 | "@executable_path/Frameworks", | 978 | "@executable_path/Frameworks", |
| 979 | "@executable_path/../../Frameworks", | 979 | "@executable_path/../../Frameworks", |
| 980 | ); | 980 | ); |
| 981 | MARKETING_VERSION = 0.4.0; | 981 | MARKETING_VERSION = 0.4.1; |
| 982 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp.widgets; | 982 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp.widgets; |
| 983 | PRODUCT_NAME = "$(TARGET_NAME)"; | 983 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 984 | SDKROOT = watchos; | 984 | SDKROOT = watchos; |
| @@ -994,7 +994,7 @@ | |||
| 994 | SKIP_INSTALL = YES; | 994 | SKIP_INSTALL = YES; |
| 995 | CODE_SIGN_ENTITLEMENTS = OrgstarWatchWidgets/OrgstarWatchWidgets.entitlements; | 995 | CODE_SIGN_ENTITLEMENTS = OrgstarWatchWidgets/OrgstarWatchWidgets.entitlements; |
| 996 | CODE_SIGN_STYLE = Automatic; | 996 | CODE_SIGN_STYLE = Automatic; |
| 997 | CURRENT_PROJECT_VERSION = 6; | 997 | CURRENT_PROJECT_VERSION = 7; |
| 998 | DEVELOPMENT_TEAM = ZCNAX3VL9D; | 998 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 999 | GENERATE_INFOPLIST_FILE = NO; | 999 | GENERATE_INFOPLIST_FILE = NO; |
| 1000 | INFOPLIST_FILE = OrgstarWatchWidgets/Info.plist; | 1000 | INFOPLIST_FILE = OrgstarWatchWidgets/Info.plist; |
| @@ -1003,7 +1003,7 @@ | |||
| 1003 | "@executable_path/Frameworks", | 1003 | "@executable_path/Frameworks", |
| 1004 | "@executable_path/../../Frameworks", | 1004 | "@executable_path/../../Frameworks", |
| 1005 | ); | 1005 | ); |
| 1006 | MARKETING_VERSION = 0.4.0; | 1006 | MARKETING_VERSION = 0.4.1; |
| 1007 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp.widgets; | 1007 | PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp.widgets; |
| 1008 | PRODUCT_NAME = "$(TARGET_NAME)"; | 1008 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 1009 | SDKROOT = watchos; | 1009 | SDKROOT = watchos; |
scripts/build-app.sh +1 −1
| @@ -8,7 +8,7 @@ | |||
| 8 | set -eu | 8 | set -eu |
| 9 | 9 | ||
| 10 | cd "$(dirname "$0")/.." | 10 | cd "$(dirname "$0")/.." |
| 11 | version="${1:-0.4.0}" | 11 | version="${1:-0.4.1}" |
| 12 | build="${2:-$version}" | 12 | build="${2:-$version}" |
| 13 | sign="${ORGSTAR_SIGN:--}" | 13 | sign="${ORGSTAR_SIGN:--}" |
| 14 | app=".build/app/orgstar.app" | 14 | app=".build/app/orgstar.app" |
scripts/build-ios-app.sh +1 −1
| @@ -5,7 +5,7 @@ | |||
| 5 | set -eu | 5 | set -eu |
| 6 | 6 | ||
| 7 | cd "$(dirname "$0")/.." | 7 | cd "$(dirname "$0")/.." |
| 8 | version="${1:-0.4.0}" | 8 | version="${1:-0.4.1}" |
| 9 | app=".build/ios-app/orgstar.app" | 9 | app=".build/ios-app/orgstar.app" |
| 10 | products=".build/ios/Build/Products/Debug-iphonesimulator" | 10 | products=".build/ios/Build/Products/Debug-iphonesimulator" |
| 11 | 11 | ||
scripts/build-watch-app.sh +1 −1
| @@ -7,7 +7,7 @@ | |||
| 7 | set -eu | 7 | set -eu |
| 8 | 8 | ||
| 9 | cd "$(dirname "$0")/.." | 9 | cd "$(dirname "$0")/.." |
| 10 | version="${1:-0.4.0}" | 10 | version="${1:-0.4.1}" |
| 11 | app=".build/watch-app/OrgstarWatch.app" | 11 | app=".build/watch-app/OrgstarWatch.app" |
| 12 | products=".build/watch/Build/Products/Debug-watchsimulator" | 12 | products=".build/watch/Build/Products/Debug-watchsimulator" |
| 13 | # The app group the complications read the agenda from, on the watch. | 13 | # The app group the complications read the agenda from, on the watch. |