From 497996216932817ae27489cf743b42fc693b950e Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Tue, 15 Sep 2026 13:48:06 +0700 Subject: [PATCH 1/6] style(editor): clear the vendored editor packages' lint violations --- .../View/CodeSuggestionLabelView.swift | 4 +- .../View/SuggestionContentView.swift | 10 +-- .../Window/SuggestionController.swift | 4 +- .../Window/SuggestionWindowPlacement.swift | 4 +- .../TextViewController+Cursor.swift | 2 +- .../TextViewController+EmphasizeBracket.swift | 4 +- .../TextViewController+Highlighter.swift | 6 +- .../TextViewController+IndentLines.swift | 2 +- .../TextViewController+Lifecycle.swift | 6 +- .../TextViewController+MoveLines.swift | 6 +- .../TextViewController+ReloadUI.swift | 1 - .../TextViewController+TextViewDelegate.swift | 2 +- .../TextViewController+ToggleComment.swift | 4 +- .../Controller/TextViewController.swift | 15 ++-- .../Enums/CaptureModifier.swift | 1 - .../Extensions/Color+Hex.swift | 4 +- .../Extensions/IndexSet+NSRange.swift | 2 +- .../NSBezierPath+RoundedCorners.swift | 15 ++-- .../Extensions/NSColor+LightDark.swift | 2 +- .../Extensions/NSFont/NSFont+RulerFont.swift | 2 +- .../NSRange+/NSRange+InputEdit.swift | 24 +++--- .../Extensions/NSRange+/NSRange+TSRange.swift | 2 +- .../Extensions/String+/String+Groups.swift | 2 +- .../Extensions/TextView+/TextView+Menu.swift | 2 - .../Extensions/TextView+/TextView+Point.swift | 2 +- .../TextView+/TextView+TextFormation.swift | 13 ++- .../TextView+/TextView+createReadBlock.swift | 6 +- .../Extensions/Tree+prettyPrint.swift | 26 +++--- .../Filters/DeleteWhitespaceFilter.swift | 2 +- .../Find/FindViewController.swift | 2 +- .../Find/PanelView/FindPanelView.swift | 4 +- .../ViewModel/FindPanelViewModel+Find.swift | 1 - .../FindPanelViewModel+Replace.swift | 2 +- .../Find/ViewModel/FindPanelViewModel.swift | 6 +- .../Gutter/GutterView.swift | 6 +- .../HighlightProviderState.swift | 6 +- .../HighlightProviding.swift | 4 +- .../Highlighting/Highlighter.swift | 14 ++-- .../StyledRangeContainer+runsIn.swift | 2 +- .../StyledRangeContainer.swift | 28 +++---- .../Highlighting/VisibleRangeProvider.swift | 2 +- .../InvisibleCharactersCoordinator.swift | 2 +- .../LineFolding/Model/LineFoldModel.swift | 2 +- .../LineFolding/View/LineFoldRibbonView.swift | 4 +- .../RangeStore/RangeStore+Coalesce.swift | 16 ++-- .../RangeStore/RangeStore+FindIndex.swift | 4 +- .../RangeStore/RangeStore+OffsetMetric.swift | 2 +- .../RangeStore/RangeStore+StoredRun.swift | 2 +- .../RangeStore/RangeStore.swift | 32 ++++---- .../SourceEditor+Coordinator.swift | 8 +- ...SourceEditorConfiguration+Appearance.swift | 4 +- .../SourceEditorConfiguration+Behavior.swift | 4 +- .../SourceEditorConfiguration+Layout.swift | 4 +- ...ourceEditorConfiguration+Peripherals.swift | 4 +- .../StatementRunRibbonView.swift | 2 +- .../SupportingViews/IconButtonStyle.swift | 6 +- .../SupportingViews/IconToggleStyle.swift | 6 +- .../SupportingViews/PanelTextField.swift | 4 +- .../SourceEditorTextView.swift | 1 - .../CombineCoordinator.swift | 4 +- .../TreeSitter/LanguageLayer.swift | 4 +- .../TreeSitterClient+Highlight.swift | 2 +- .../TreeSitter/TreeSitterClient+Query.swift | 18 ++-- .../TreeSitter/TreeSitterClient.swift | 12 +-- .../TreeSitter/TreeSitterExecutor.swift | 3 +- .../TreeSitter/TreeSitterState.swift | 2 +- .../CaptureModifierSetTests.swift | 2 +- .../CodeEditSourceEditorTests.swift | 2 +- .../SuggestionPanelFocusTests.swift | 8 +- .../SuggestionShowCompletionsGuardTests.swift | 2 +- .../SuggestionWindowPlacementTests.swift | 4 +- .../TextViewController+IndentTests.swift | 2 +- .../TextViewController+MoveLinesTests.swift | 2 +- .../Controller/TextViewControllerTests.swift | 42 +++++----- .../FindPanelTests.swift | 4 +- .../GutterNumberOffsetTests.swift | 2 +- .../Highlighting/HighlighterTests.swift | 18 ++-- .../StyledRangeContainerTests.swift | 20 +++-- .../VisibleRangeProviderTests.swift | 14 ++-- .../LineFoldAccessibilityTests.swift | 8 +- .../LineFoldChunkBoundaryTests.swift | 8 +- .../LineFoldCollapsePathTests.swift | 6 +- .../LineFoldDocumentSwapTests.swift | 6 +- .../LineFoldingTests/LineFoldHoverTests.swift | 6 +- .../LineFoldPlaceholderClickTests.swift | 2 +- .../LineFoldRibbonLookupTests.swift | 8 +- .../LineFoldStorageTests.swift | 4 +- .../LineFoldingModelTests.swift | 8 +- .../RangeStoreTests.swift | 44 +++++----- .../TreeSitterClientTests.swift | 4 +- .../CodeEditTextView/CodeEditTextView.swift | 1 - .../Cursors/CursorTimer.swift | 2 +- .../CodeEditTextView/Cursors/CursorView.swift | 2 +- .../EmphasisManager/EmphasisManager.swift | 2 +- .../Extensions/GC+ApproximateEqual.swift | 4 +- .../NSBezierPath+CGPathFallback.swift | 4 +- .../Extensions/NSBezierPath+SmoothPath.swift | 4 +- .../InvisibleCharactersDelegate.swift | 2 +- .../TextLayoutManager+Public.swift | 6 +- .../TextLayoutManager/TextLayoutManager.swift | 22 ++--- .../TextLayoutManagerRenderDelegate.swift | 6 +- .../TextLine/LineFragment.swift | 6 +- .../TextLine/LineFragmentView.swift | 14 ++-- .../CodeEditTextView/TextLine/TextLine.swift | 6 +- .../TextLine/Typesetter/Typesetter.swift | 2 +- .../TextLineStorage/TextLineStorage.swift | 56 ++++++------- .../SelectionManipulation+Vertical.swift | 2 +- .../TextSelectionManager/TextSelection.swift | 2 +- .../TextSelectionManager+Draw.swift | 1 - .../TextSelectionManager+Update.swift | 6 +- .../TextSelectionManager.swift | 11 ++- .../TextView/TextView+Accessibility.swift | 3 +- .../TextView/TextView+ColumnSelection.swift | 6 +- .../TextView/TextView+Delete.swift | 18 ++-- .../TextView/TextView+FirstResponder.swift | 16 ++-- .../TextView/TextView+Insert.swift | 2 +- .../TextView/TextView+Layout.swift | 6 +- .../TextView/TextView+Lifecycle.swift | 8 +- .../TextView/TextView+NSTextInput.swift | 16 ++-- .../TextView/TextView+ReplaceCharacters.swift | 10 +-- .../TextView/TextView+ScrollToVisible.swift | 7 +- .../TextView/TextView+SetText.swift | 8 +- .../TextView/TextView+StorageDelegate.swift | 6 +- .../TextView/TextView+UndoRedo.swift | 7 +- .../CodeEditTextView/TextView/TextView.swift | 10 +-- .../Utils/CEUndoManager.swift | 8 +- .../CodeEditTextView/Utils/KillRing.swift | 9 +- .../CodeEditTextView/Utils/LineEnding.swift | 5 +- .../AccessibilityTests.swift | 8 +- .../CmdUpAtEndOfDocumentTests.swift | 6 +- .../EmphasisManagerTests.swift | 2 +- .../CodeEditTextViewTests/IMEInputTests.swift | 2 +- .../CodeEditTextViewTests/KillRingTests.swift | 2 +- ...verridingLayoutManagerRenderingTests.swift | 12 +-- .../TextLayoutManagerAttachmentsTests.swift | 8 +- .../TextLayoutManagerTests.swift | 46 +++++------ .../LineEndingTests.swift | 20 ++--- .../LineFragmentRendererTests.swift | 2 +- .../MarkedTextTests.swift | 2 +- .../NSBezierPathSmoothPathTests.swift | 2 +- .../NSTextInputRangeGuardTests.swift | 2 +- .../SpecialCharacterLayoutTests.swift | 22 ++--- .../TextLayoutLineStorageTests.swift | 80 +++++++++--------- .../TextLineDisplayRangeTests.swift | 2 +- .../TextSelectionManagerTests.swift | 82 +++++++++++-------- .../CodeEditTextViewTests/TextViewTests.swift | 2 +- .../TypesetterTests.swift | 10 +-- .../VisualLineEndOfDocumentTests.swift | 6 +- .../WordSelectionTests.swift | 2 +- .../Editor/EditorLifecycleTeardownTests.swift | 4 +- 150 files changed, 615 insertions(+), 645 deletions(-) diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/CodeSuggestionLabelView.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/CodeSuggestionLabelView.swift index aa3457b9c7..bd3f1b5ff8 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/CodeSuggestionLabelView.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/CodeSuggestionLabelView.swift @@ -9,7 +9,7 @@ import AppKit import SwiftUI struct CodeSuggestionLabelView: View { - static let HORIZONTAL_PADDING: CGFloat = 13 + static let horizontalPadding: CGFloat = 13 let suggestion: CodeSuggestionEntry let labelColor: NSColor @@ -95,7 +95,7 @@ struct CodeSuggestionLabelView: View { } } .padding(.vertical, 3) - .padding(.horizontal, Self.HORIZONTAL_PADDING) + .padding(.horizontal, Self.horizontalPadding) .buttonStyle(PlainButtonStyle()) } } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/SuggestionContentView.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/SuggestionContentView.swift index 257d707012..a326cd1e80 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/SuggestionContentView.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/SuggestionContentView.swift @@ -54,7 +54,7 @@ struct SuggestionContentView: View { } } } - .padding(.vertical, SuggestionController.WINDOW_PADDING) + .padding(.vertical, SuggestionController.windowPadding) .frame(height: listMaxHeight) .onChange(of: model.selectedIndex) { newIndex in withAnimation(.easeInOut(duration: 0.1)) { @@ -81,7 +81,7 @@ struct SuggestionContentView: View { .fill(index == model.selectedIndex ? Color(nsColor: .selectedContentBackgroundColor) : Color.clear) - .padding(.horizontal, SuggestionController.WINDOW_PADDING) + .padding(.horizontal, SuggestionController.windowPadding) ) .contentShape(Rectangle()) .onTapGesture(count: 1) { @@ -110,12 +110,12 @@ struct SuggestionContentView: View { 64 ) let textWidth = CGFloat(maxLabelLength) * font.charWidth - return max(iconWidth + textWidth + CodeSuggestionLabelView.HORIZONTAL_PADDING * 2, 280) + return max(iconWidth + textWidth + CodeSuggestionLabelView.horizontalPadding * 2, 280) } private var listMaxHeight: CGFloat { - let visibleRows = min(CGFloat(model.items.count), SuggestionController.MAX_VISIBLE_ROWS) - return Self.rowHeight * visibleRows + SuggestionController.WINDOW_PADDING * 2 + let visibleRows = min(CGFloat(model.items.count), SuggestionController.maxVisibleRows) + return Self.rowHeight * visibleRows + SuggestionController.windowPadding * 2 } private var noCompletionsView: some View { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionController.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionController.swift index a34c252750..283b75fc5d 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionController.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionController.swift @@ -26,9 +26,9 @@ public final class SuggestionController: NSWindowController { // MARK: - Private Properties /// Maximum number of visible rows (8.5) - static let MAX_VISIBLE_ROWS: CGFloat = 8.5 + static let maxVisibleRows: CGFloat = 8.5 /// Padding at top and bottom of the window - static let WINDOW_PADDING: CGFloat = 5 + static let windowPadding: CGFloat = 5 /// Tracks when the window is placed above the cursor var isWindowAboveCursor = false diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionWindowPlacement.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionWindowPlacement.swift index a0912f08bf..d96627066e 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionWindowPlacement.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionWindowPlacement.swift @@ -54,8 +54,8 @@ internal enum SuggestionWindowPlacement { screenFrame: NSRect, editorFrame: NSRect? ) -> CGFloat { - let anchorX = cursorRect.origin.x - SuggestionController.WINDOW_PADDING - - CodeSuggestionLabelView.HORIZONTAL_PADDING - font.pointSize + let anchorX = cursorRect.origin.x - SuggestionController.windowPadding + - CodeSuggestionLabelView.horizontalPadding - font.pointSize let leftLimit = max(screenFrame.minX, editorFrame?.minX ?? screenFrame.minX) let rightLimit = min(screenFrame.maxX, editorFrame?.maxX ?? screenFrame.maxX) diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Cursor.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Cursor.swift index ed2791d279..3e9173fc09 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Cursor.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Cursor.swift @@ -5,8 +5,8 @@ // Created by Elias Wahl on 15.03.23. // -import Foundation import AppKit +import Foundation extension TextViewController { /// Sets new cursor positions. diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+EmphasizeBracket.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+EmphasizeBracket.swift index c4c8633b12..cd68508f1f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+EmphasizeBracket.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+EmphasizeBracket.swift @@ -37,7 +37,7 @@ extension TextViewController { pair.0, pair.1, from: range.location, - limit: min((textView.visibleTextRange ?? .zero).max + 4096, textView.documentRange.max), + limit: min((textView.visibleTextRange ?? .zero).max + 4_096, textView.documentRange.max), reverse: false ) { emphasizeCharacter(characterIndex) @@ -52,7 +52,7 @@ extension TextViewController { pair.1, pair.0, from: range.location - 1, - limit: max((textView.visibleTextRange?.location ?? 0) - 4096, textView.documentRange.location), + limit: max((textView.visibleTextRange?.location ?? 0) - 4_096, textView.documentRange.location), reverse: true ) { emphasizeCharacter(characterIndex) diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Highlighter.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Highlighter.swift index fb057a7e3a..b1e6bb0266 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Highlighter.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Highlighter.swift @@ -8,7 +8,7 @@ import Foundation import SwiftTreeSitter -extension TextViewController { +package extension TextViewController { /// Tears down and rebuilds the highlighter for the text view's current storage. /// /// Ends with an explicit `invalidate()` so the rebuilt highlighter queries the @@ -16,7 +16,7 @@ extension TextViewController { /// triggers (an edit, a frame change, or an invalidation); after a mid-session /// storage swap such as `setText`, none of those is guaranteed to fire, and /// without this the document stays unstyled until the next layout change. - package func setUpHighlighter() { + func setUpHighlighter() { if let highlighter { textView.removeStorageDelegate(highlighter) self.highlighter = nil @@ -39,7 +39,7 @@ extension TextViewController { /// providers early. /// /// - Parameter newProviders: All the new providers. - package func setHighlightProviders(_ newProviders: [HighlightProviding]) { + func setHighlightProviders(_ newProviders: [HighlightProviding]) { highlighter?.setProviders(newProviders) highlightProviders = newProviders } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+IndentLines.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+IndentLines.swift index da0a8a82b6..3eb5a3edde 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+IndentLines.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+IndentLines.swift @@ -113,7 +113,7 @@ extension TextViewController { selectionIndex: Int, lineCount: Int ) -> Int { - return 1 + ((textSelectionCount - selectionIndex) - 1) * lineCount + 1 + ((textSelectionCount - selectionIndex) - 1) * lineCount } /// This method is used to handle tabs appropriately when multiple lines are selected, diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Lifecycle.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Lifecycle.swift index 54a30c8b1a..d38a028494 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Lifecycle.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Lifecycle.swift @@ -25,7 +25,7 @@ extension TextViewController { textCoordinators.forEach { $0.val?.controllerDidDisappear(controller: self) } } - override public func loadView() { + override public func loadView() { // swiftlint:disable:this prohibited_super_call super.loadView() scrollView = SourceEditorScrollView() @@ -46,8 +46,8 @@ extension TextViewController { findViewController.view.viewDidMoveToSuperview() self.findViewController = findViewController - if let _undoManager { - textView.setUndoManager(_undoManager) + if let editorUndoManager { + textView.setUndoManager(editorUndoManager) } styleTextView() diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+MoveLines.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+MoveLines.swift index 5f8e73802f..f3a8012303 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+MoveLines.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+MoveLines.swift @@ -7,9 +7,9 @@ import Foundation -extension TextViewController { +public extension TextViewController { /// Moves the selected lines up by one line. - public func moveLinesUp() { + func moveLinesUp() { guard !cursorPositions.isEmpty else { return } guard let selection = textView.selectionManager.textSelections.first, let lineIndexes = getOverlappingLines(for: selection.range) else { return } @@ -58,7 +58,7 @@ extension TextViewController { } /// Moves the selected lines down by one line. - public func moveLinesDown() { + func moveLinesDown() { guard !cursorPositions.isEmpty else { return } guard let selection = textView.selectionManager.textSelections.first, let lineIndexes = getOverlappingLines(for: selection.range) else { return } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ReloadUI.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ReloadUI.swift index 8359aca2cd..fd99112e09 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ReloadUI.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ReloadUI.swift @@ -13,6 +13,5 @@ extension TextViewController { styleScrollView() styleTextView() - } } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+TextViewDelegate.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+TextViewDelegate.swift index acca4a56c0..c676c39f4a 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+TextViewDelegate.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+TextViewDelegate.swift @@ -5,8 +5,8 @@ // Created by Khan Winter on 10/14/23. // -import Foundation import CodeEditTextView +import Foundation import TextStory extension TextViewController: TextViewDelegate { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ToggleComment.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ToggleComment.swift index 2bfa39d66b..b64150f208 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ToggleComment.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ToggleComment.swift @@ -5,8 +5,8 @@ // Created by Sophia Hooley on 4/21/24. // -import CodeEditTextView import AppKit +import CodeEditTextView extension TextViewController { /// Method called when CMD + / key sequence is recognized. @@ -31,7 +31,6 @@ extension TextViewController { textView.undoManager?.endUndoGrouping() } - // swiftlint:disable cyclomatic_complexity /// Populates the comment cache with information about the lines within a specified range, /// determining whether comment characters should be inserted or removed. /// - Parameters: @@ -115,7 +114,6 @@ extension TextViewController { lineCount: intermediateLines.count ) } - // swiftlint:enable cyclomatic_complexity /// Calculates the shift range factor based on the counts of start and /// end comment characters and the number of intermediate lines. diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController.swift index 508052d111..fb509e46ba 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController.swift @@ -17,24 +17,22 @@ import TextFormation /// A view controller class for managing a source editor. Uses ``CodeEditTextView/TextView`` for input and rendering, /// tree-sitter for syntax highlighting, and TextFormation for live editing completions. public class TextViewController: NSViewController { - // swiftlint:disable:next line_length public static let cursorPositionUpdatedNotification: Notification.Name = .init("TextViewController.cursorPositionNotification") - // swiftlint:disable:next line_length public static let scrollPositionDidUpdateNotification: Notification.Name = .init("TextViewController.scrollPositionDidUpdateNotification") // MARK: - Views and Child VCs weak var findViewController: FindViewController? - internal(set) public var scrollView: SourceEditorScrollView! - internal(set) public var textView: TextView! + public internal(set) var scrollView: SourceEditorScrollView! + public internal(set) var textView: TextView! var gutterView: GutterView! /// Middleman between the text view to our invisible characters config, with knowledge of things like the /// /// user's theme and indent option to help correctly draw invisible character placeholders. var invisibleCharactersCoordinator: InvisibleCharactersCoordinator - var _undoManager: CEUndoManager! + var editorUndoManager: CEUndoManager! var systemAppearance: NSAppearance.Name? var localEventMonitor: Any? @@ -79,7 +77,7 @@ public class TextViewController: NSViewController { } /// The current cursors' positions ordered by the location of the cursor. - internal(set) public var cursorPositions: [CursorPosition] = [] + public internal(set) var cursorPositions: [CursorPosition] = [] /// The provided highlight provider. public var highlightProviders: [HighlightProviding] @@ -167,7 +165,7 @@ public class TextViewController: NSViewController { /// The tree sitter client managed by the source editor. /// /// This will be `nil` if another highlighter provider is passed to the source editor. - internal(set) public var treeSitterClient: TreeSitterClient? + public internal(set) var treeSitterClient: TreeSitterClient? var foldProvider: LineFoldProvider @@ -222,7 +220,7 @@ public class TextViewController: NSViewController { self.cursorPositions = cursorPositions self.highlightProviders = highlightProviders self.foldProvider = foldProvider ?? LineIndentationFoldProvider() - self._undoManager = undoManager + self.editorUndoManager = undoManager self.invisibleCharactersCoordinator = InvisibleCharactersCoordinator(configuration: configuration) self.completionDelegate = completionDelegate @@ -254,7 +252,6 @@ public class TextViewController: NSViewController { $0.prepareCoordinator(controller: self) } self.textCoordinators = coordinators.map { WeakCoordinator($0) } - } required init?(coder: NSCoder) { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/CaptureModifier.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/CaptureModifier.swift index 895f04b2e1..2a3045215b 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/CaptureModifier.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/CaptureModifier.swift @@ -58,7 +58,6 @@ public enum CaptureModifier: Int8, CaseIterable, Sendable { } } - // swiftlint:disable:next cyclomatic_complexity public static func fromString(_ string: String) -> CaptureModifier? { switch string { case "declaration": diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Color+Hex.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Color+Hex.swift index a231845c6f..72ab7048b7 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Color+Hex.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Color+Hex.swift @@ -8,7 +8,6 @@ import SwiftUI public extension Color { - /// Initializes a `Color` from a HEX String (e.g.: `#1D2E3F`) and an optional alpha value. /// - Parameters: /// - hex: A String of a HEX representation of a color (format: `#1D2E3F`) @@ -51,12 +50,11 @@ public extension Color { /// The alpha (opacity) component of the Color (0.0 - 1.0) var alphaComponent: Double { - return NSColor(self).alphaComponent + NSColor(self).alphaComponent } } public extension NSColor { - /// Initializes a `NSColor` from a HEX String (e.g.: `#1D2E3F`) and an optional alpha value. /// - Parameters: /// - hex: A String of a HEX representation of a color (format: `#1D2E3F`) diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/IndexSet+NSRange.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/IndexSet+NSRange.swift index b004172963..8cca107945 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/IndexSet+NSRange.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/IndexSet+NSRange.swift @@ -33,6 +33,6 @@ extension IndexSet { /// Returns true if self contains all of the integers in range. func contains(integersIn range: NSRange) -> Bool { - return self.contains(integersIn: range.intRange) + self.contains(integersIn: range.intRange) } } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSBezierPath+RoundedCorners.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSBezierPath+RoundedCorners.swift index 25208fdcdf..141bbead3c 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSBezierPath+RoundedCorners.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSBezierPath+RoundedCorners.swift @@ -12,20 +12,19 @@ import AppKit extension NSBezierPath { struct Corners: OptionSet { - public let rawValue: Int + let rawValue: Int - public init(rawValue: Corners.RawValue) { + init(rawValue: Int) { self.rawValue = rawValue } - public static let topLeft = Corners(rawValue: 1 << 0) - public static let bottomLeft = Corners(rawValue: 1 << 1) - public static let topRight = Corners(rawValue: 1 << 2) - public static let bottomRight = Corners(rawValue: 1 << 3) - public static let all: Corners = Corners(rawValue: 0b1111) + static let topLeft = Corners(rawValue: 1 << 0) + static let bottomLeft = Corners(rawValue: 1 << 1) + static let topRight = Corners(rawValue: 1 << 2) + static let bottomRight = Corners(rawValue: 1 << 3) + static let all = Corners(rawValue: 0b1111) } - // swiftlint:disable:next function_body_length convenience init(rect: CGRect, roundedCorners corners: Corners, cornerRadius: CGFloat) { self.init() diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSColor+LightDark.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSColor+LightDark.swift index 9e89342025..b5871b7be3 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSColor+LightDark.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSColor+LightDark.swift @@ -10,7 +10,7 @@ import AppKit extension NSColor { convenience init(light: NSColor, dark: NSColor) { self.init(name: nil) { appearance in - return switch appearance.bestMatch(from: [.aqua, .darkAqua]) { + switch appearance.bestMatch(from: [.aqua, .darkAqua]) { case .darkAqua: dark default: diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSFont/NSFont+RulerFont.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSFont/NSFont+RulerFont.swift index 0221f3361a..f7730020bc 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSFont/NSFont+RulerFont.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSFont/NSFont+RulerFont.swift @@ -5,8 +5,8 @@ // Created by Elias Wahl on 17.03.23. // -import Foundation import AppKit +import Foundation extension NSFont { var rulerFont: NSFont { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+InputEdit.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+InputEdit.swift index 3bc0736862..e1a8a219b9 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+InputEdit.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+InputEdit.swift @@ -5,8 +5,8 @@ // Created by Khan Winter on 9/12/22. // -import Foundation import CodeEditTextView +import Foundation import SwiftTreeSitter extension InputEdit { @@ -34,32 +34,30 @@ extension InputEdit { } extension NSRange { - // swiftlint:disable line_length /// Modifies the range to account for an edit. /// Largely based on code from /// [tree-sitter](https://github.com/tree-sitter/tree-sitter/blob/ddeaa0c7f534268b35b4f6cb39b52df082754413/lib/src/subtree.c#L691-L720) mutating func applyInputEdit(_ edit: InputEdit) { - // swiftlint:enable line_length let endIndex = NSMaxRange(self) let isPureInsertion = edit.oldEndByte == edit.startByte // Edit is after the range - if (edit.startByte/2) > endIndex { + if (edit.startByte / 2) > endIndex { return - } else if edit.oldEndByte/2 < location { + } else if edit.oldEndByte / 2 < location { // If the edit is entirely before this range - self.location += (Int(edit.newEndByte) - Int(edit.oldEndByte))/2 - } else if edit.startByte/2 < location { + self.location += (Int(edit.newEndByte) - Int(edit.oldEndByte)) / 2 + } else if edit.startByte / 2 < location { // If the edit starts in the space before this range and extends into this range - length -= Int(edit.oldEndByte)/2 - location - location = Int(edit.newEndByte)/2 - } else if edit.startByte/2 == location && isPureInsertion { + length -= Int(edit.oldEndByte) / 2 - location + location = Int(edit.newEndByte) / 2 + } else if edit.startByte / 2 == location && isPureInsertion { // If the edit is *only* an insertion right at the beginning of the range - location = Int(edit.newEndByte)/2 + location = Int(edit.newEndByte) / 2 } else { // Otherwise, the edit is entirely within this range - if edit.startByte/2 < endIndex || (edit.startByte/2 == endIndex && isPureInsertion) { - length = (Int(edit.newEndByte)/2 - location) + (length - (Int(edit.oldEndByte)/2 - location)) + if edit.startByte / 2 < endIndex || (edit.startByte / 2 == endIndex && isPureInsertion) { + length = (Int(edit.newEndByte) / 2 - location) + (length - (Int(edit.oldEndByte) / 2 - location)) } } } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+TSRange.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+TSRange.swift index 98412461e6..1934eec8cc 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+TSRange.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+TSRange.swift @@ -10,7 +10,7 @@ import SwiftTreeSitter extension NSRange { var tsRange: TSRange { - return TSRange( + TSRange( points: .zero..<(.zero), bytes: (UInt32(self.location) * 2)..<(UInt32(self.location + self.length) * 2) ) diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/String+/String+Groups.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/String+/String+Groups.swift index 87758f4075..b01fbd35b3 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/String+/String+Groups.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/String+/String+Groups.swift @@ -6,8 +6,8 @@ // import Foundation -import TextStory import TextFormation +import TextStory // Helper extension to extract capture groups extension String { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+Menu.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+Menu.swift index 4f244faebe..4a29590570 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+Menu.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+Menu.swift @@ -9,7 +9,6 @@ import AppKit import CodeEditTextView extension TextView { - /// Setup context menus func setupMenus() { guard let menu = menu else { return } @@ -41,7 +40,6 @@ extension TextView { } func codeMenu(_ menu: NSMenu) -> NSMenu { - menu.insertItem(withTitle: "Refactor", action: nil, keyEquivalent: "", diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+Point.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+Point.swift index 3008ae489c..746f02177f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+Point.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+Point.swift @@ -5,8 +5,8 @@ // Created by Khan Winter on 1/18/24. // -import Foundation import CodeEditTextView +import Foundation import SwiftTreeSitter extension TextView { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+TextFormation.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+TextFormation.swift index a3cccd19ed..772c65eac3 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+TextFormation.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+TextFormation.swift @@ -5,19 +5,18 @@ // Created by Khan Winter on 10/14/23. // -import Foundation import CodeEditTextView -import TextStory +import Foundation import TextFormation +import TextStory extension TextView: @retroactive TextStoring {} extension TextView: @retroactive TextInterface { public var selectedRange: NSRange { get { - return selectionManager + selectionManager .textSelections - .sorted(by: { $0.range.lowerBound < $1.range.lowerBound }) - .first? + .min(by: { $0.range.lowerBound < $1.range.lowerBound })? .range ?? .zero } set { @@ -30,7 +29,7 @@ extension TextView: @retroactive TextInterface { } public func substring(from range: NSRange) -> String? { - return textStorage.substring(from: range) + textStorage.substring(from: range) } /// Applies the mutation to the text view. @@ -40,7 +39,7 @@ extension TextView: @retroactive TextInterface { /// - Parameter mutation: The mutation to apply. public func applyMutation(_ mutation: TextMutation) { guard !mutation.isEmpty else { return } - _undoManager?.registerMutation(mutation) + editorUndoManager?.registerMutation(mutation) textStorage.replaceCharacters(in: mutation.range, with: mutation.string) selectionManager.didReplaceCharacters( in: mutation.range, diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+createReadBlock.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+createReadBlock.swift index 2e00dff368..e754336446 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+createReadBlock.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+createReadBlock.swift @@ -5,8 +5,8 @@ // Created by Khan Winter on 5/20/23. // -import Foundation import CodeEditTextView +import Foundation import SwiftTreeSitter extension TextView { @@ -18,7 +18,7 @@ extension TextView { /// /// - Returns: A new block for reading contents for tree-sitter. func createReadBlock() -> Parser.ReadBlock { - return { [weak self] byteOffset, _ in + { [weak self] byteOffset, _ in let workItem: () -> Data? = { let limit = self?.documentRange.length ?? 0 let location = byteOffset / 2 @@ -41,7 +41,7 @@ extension TextView { /// /// - Returns: A new block for reading contents for tree-sitter. func createReadCallback() -> SwiftTreeSitter.Predicate.TextProvider { - return { [weak self] range, _ in + { [weak self] range, _ in let workItem: () -> String? = { self?.textStorage.substring(from: range) } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Tree+prettyPrint.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Tree+prettyPrint.swift index bf1cf8f5f3..034c8aa0bc 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Tree+prettyPrint.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Tree+prettyPrint.swift @@ -36,7 +36,7 @@ extension Tree { if cursor.goToFirstChild() { while true { - if cursor.currentNode != nil && cursor.currentNode!.isNamed { + if cursor.currentNode?.isNamed == true { print("") } @@ -53,16 +53,13 @@ extension Tree { } if visible { - print(")", terminator: depth == 1 ? "\n": "") + print(")", terminator: depth == 1 ? "\n" : "") } } - if cursor.currentNode?.childCount == 0 { - if !cursor.currentNode!.isNamed { - print("{\(cursor.currentNode!.nodeType ?? "NONE")}") - } else { - print("\"\(cursor.currentNode!.nodeType ?? "NONE")\"") - } + if let node = cursor.currentNode, node.childCount == 0 { + let nodeType = node.nodeType ?? "NONE" + print(node.isNamed ? "\"\(nodeType)\"" : "{\(nodeType)}") } else { p(cursor, depth: 1) } @@ -97,7 +94,7 @@ extension MutableTree { if cursor.goToFirstChild() { while true { - if cursor.currentNode != nil && cursor.currentNode!.isNamed { + if cursor.currentNode?.isNamed == true { print("") } @@ -114,16 +111,13 @@ extension MutableTree { } if visible { - print(")", terminator: depth == 1 ? "\n": "") + print(")", terminator: depth == 1 ? "\n" : "") } } - if cursor.currentNode?.childCount == 0 { - if !cursor.currentNode!.isNamed { - print("{\(cursor.currentNode!.nodeType ?? "NONE")}") - } else { - print("\"\(cursor.currentNode!.nodeType ?? "NONE")\"") - } + if let node = cursor.currentNode, node.childCount == 0 { + let nodeType = node.nodeType ?? "NONE" + print(node.isNamed ? "\"\(nodeType)\"" : "{\(nodeType)}") } else { p(cursor, depth: 1) } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Filters/DeleteWhitespaceFilter.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Filters/DeleteWhitespaceFilter.swift index 8e7aced20e..7cf82e5cf7 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Filters/DeleteWhitespaceFilter.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Filters/DeleteWhitespaceFilter.swift @@ -5,8 +5,8 @@ // Created by Khan Winter on 1/28/23. // -import Foundation import CodeEditTextView +import Foundation import TextFormation import TextStory diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindViewController.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindViewController.swift index d85a153c2a..3286023d82 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindViewController.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindViewController.swift @@ -46,7 +46,7 @@ final class FindViewController: NSViewController { fatalError("init(coder:) has not been implemented") } - override func loadView() { + override func loadView() { // swiftlint:disable:this prohibited_super_call super.loadView() // Set up the `childView` as a subview of our view. Constrained to all edges, except the top is constrained to diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindPanelView.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindPanelView.swift index e74e18df2c..68b0335bf0 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindPanelView.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindPanelView.swift @@ -5,9 +5,9 @@ // Created by Austin Condiff on 3/12/25. // -import SwiftUI import AppKit import CodeEditTextView +import SwiftUI /// A SwiftUI view that provides a find and replace interface for the text editor. /// @@ -95,7 +95,7 @@ private struct FindModePickerWidthPreferenceKey: PreferenceKey { /// A mock target for previews that implements the FindPanelTarget protocol class MockFindPanelTarget: FindPanelTarget { var textView: TextView! - var findPanelTargetView: NSView = NSView() + var findPanelTargetView = NSView() var cursorPositions: [CursorPosition] = [] func setCursorPositions(_ positions: [CursorPosition], scrollToVisible: Bool) {} diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Find.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Find.swift index ded2f09fa2..a65ff20f08 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Find.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Find.swift @@ -114,5 +114,4 @@ extension FindPanelViewModel { return bestIndex >= 0 ? bestIndex : nil } - } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Replace.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Replace.swift index 6d23af4081..0f1da9485f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Replace.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Replace.swift @@ -5,8 +5,8 @@ // Created by Khan Winter on 4/18/25. // -import Foundation import CodeEditTextView +import Foundation extension FindPanelViewModel { /// Replace one or all ``findMatches`` with the contents of ``replaceText``. diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel.swift index e48d53ea14..905aa0c4d8 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel.swift @@ -5,9 +5,9 @@ // Created by Austin Condiff on 3/12/25. // -import SwiftUI -import Combine import CodeEditTextView +import Combine +import SwiftUI class FindPanelViewModel: ObservableObject { enum Notifications { @@ -46,7 +46,7 @@ class FindPanelViewModel: ObservableObject { /// The height of the find panel. var panelHeight: CGFloat { - return mode == .replace ? 54 : 28 + mode == .replace ? 54 : 28 } /// The number of current find matches. diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Gutter/GutterView.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Gutter/GutterView.swift index ab7e638da1..2fa8af1654 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Gutter/GutterView.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Gutter/GutterView.swift @@ -52,7 +52,7 @@ public class GutterView: NSView { } @Invalidating(.display) - var edgeInsets: EdgeInsets = EdgeInsets(leading: GutterView.windowEdgeLeadingInset, trailing: 12) + var edgeInsets = EdgeInsets(leading: GutterView.windowEdgeLeadingInset, trailing: 12) /// The margin a gutter keeps to its left when it runs down the side of a window. static let windowEdgeLeadingInset: CGFloat = 20 @@ -96,7 +96,7 @@ public class GutterView: NSView { var selectedLineTextColor: NSColor? = .labelColor @Invalidating(.display) - var selectedLineColor: NSColor = NSColor.selectedTextBackgroundColor.withSystemEffect(.disabled) + var selectedLineColor = NSColor.selectedTextBackgroundColor.withSystemEffect(.disabled) /// Toggle the visibility of the line fold decoration. @Invalidating(.display) @@ -472,7 +472,7 @@ public class GutterView: NSView { let lineNumberWidth = CTLineGetTypographicBounds(ctLine, &ascent, nil, nil) let fontHeightDifference = ((fragment?.height ?? 0) - fontLineHeight) / 4 - let yPos = linePosition.yPos + ascent + (fragment?.heightDifference ?? 0)/2 + fontHeightDifference + let yPos = linePosition.yPos + ascent + (fragment?.heightDifference ?? 0) / 2 + fontHeightDifference // Leading padding + (width - linewidth) let xPos = lineNumberLeading + (numberAreaWidth - lineNumberWidth) diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightProviding/HighlightProviderState.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightProviding/HighlightProviderState.swift index 222f355c2b..923aece006 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightProviding/HighlightProviderState.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightProviding/HighlightProviderState.swift @@ -30,7 +30,7 @@ class HighlightProviderState { private let logger = Logger(subsystem: Bundle.main.bundleIdentifier ?? "", category: "HighlightProviderState") /// The length to chunk ranges into when passing to the highlighter. - private static let rangeChunkLimit = 4096 + private static let rangeChunkLimit = 4_096 private static let largeDocThreshold = 50_000 @@ -42,10 +42,10 @@ class HighlightProviderState { /// Any indexes that highlights have been requested for, but haven't been applied. /// Indexes/ranges are added to this when highlights are requested and removed /// after they are applied - private var pendingSet: IndexSet = IndexSet() + private var pendingSet = IndexSet() /// The set of valid indexes - private var validSet: IndexSet = IndexSet() + private var validSet = IndexSet() // MARK: - Providers diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightProviding/HighlightProviding.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightProviding/HighlightProviding.swift index cc3c4472c9..86e7c2c4f3 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightProviding/HighlightProviding.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightProviding/HighlightProviding.swift @@ -61,6 +61,6 @@ public protocol HighlightProviding: AnyObject { ) } -extension HighlightProviding { - public func willApplyEdit(textView: TextView, range: NSRange) { } +public extension HighlightProviding { + func willApplyEdit(textView: TextView, range: NSRange) { } } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/Highlighter.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/Highlighter.swift index 93680ec17e..cf96f3b5b9 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/Highlighter.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/Highlighter.swift @@ -69,7 +69,7 @@ public enum EditorHighlighting { /// @MainActor class Highlighter: NSObject { - static private let logger = Logger(subsystem: Bundle.main.bundleIdentifier ?? "", category: "Highlighter") + private static let logger = Logger(subsystem: Bundle.main.bundleIdentifier ?? "", category: "Highlighter") /// The current language of the editor. private var language: CodeLanguage @@ -89,7 +89,7 @@ class Highlighter: NSObject { /// Counts upwards to provide unique IDs for new highlight providers. private var providerIdCounter: Int - public var maxHighlightableLength: Int = EditorHighlighting.maxHighlightableCharacters + var maxHighlightableLength: Int = EditorHighlighting.maxHighlightableCharacters // MARK: - Init @@ -114,7 +114,7 @@ class Highlighter: NSObject { styleContainer.delegate = self visibleRangeProvider.delegate = self - self.highlightProviders = providers.enumerated().map { (idx, provider) in + self.highlightProviders = providers.enumerated().map { idx, provider in HighlightProviderState( id: providerIds[idx], delegate: styleContainer, @@ -129,17 +129,17 @@ class Highlighter: NSObject { // MARK: - Public /// Invalidates all text in the editor. Useful for updating themes. - public func invalidate() { + func invalidate() { highlightProviders.forEach { $0.invalidate() } } - public func invalidate(_ set: IndexSet) { + func invalidate(_ set: IndexSet) { highlightProviders.forEach { $0.invalidate(set) } } /// Sets the language and causes a re-highlight of the entire text. /// - Parameter language: The language to update to. - public func setLanguage(language: CodeLanguage) { + func setLanguage(language: CodeLanguage) { guard let textView = self.textView else { return } // Remove all current highlights. Makes the language setting feel snappier and tells the user we're doing @@ -161,7 +161,7 @@ class Highlighter: NSObject { /// /// - Note: Each provider will be identified by it's object ID. /// - Parameter providers: All providers to use. - public func setProviders(_ providers: [HighlightProviding]) { + func setProviders(_ providers: [HighlightProviding]) { guard let textView else { return } self.styleContainer.updateStorageLength(newLength: textView.textStorage.length) diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/StyledRangeContainer/StyledRangeContainer+runsIn.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/StyledRangeContainer/StyledRangeContainer+runsIn.swift index 69e6a93ca5..aa1a3590cf 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/StyledRangeContainer/StyledRangeContainer+runsIn.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/StyledRangeContainer/StyledRangeContainer+runsIn.swift @@ -26,7 +26,7 @@ extension StyledRangeContainer { } // Ordered by priority, lower = higher priority. - var allRuns = _storage.values + var allRuns = providerStores.values .sorted(by: { $0.priority < $1.priority }) .map { $0.store.runs(in: range.intRange) } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/StyledRangeContainer/StyledRangeContainer.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/StyledRangeContainer/StyledRangeContainer.swift index c77e2b58f9..f02e61a9da 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/StyledRangeContainer/StyledRangeContainer.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/StyledRangeContainer/StyledRangeContainer.swift @@ -70,7 +70,7 @@ class StyledRangeContainer { } } - var _storage: [ProviderID: (store: RangeStore, priority: Int)] = [:] + var providerStores: [ProviderID: (store: RangeStore, priority: Int)] = [:] weak var delegate: StyledRangeContainerDelegate? /// Initialize the container with a list of provider identifiers. Each provider is given an id, they should be @@ -80,40 +80,40 @@ class StyledRangeContainer { /// - providers: An array of identifiers given to providers. init(documentLength: Int, providers: [ProviderID]) { for provider in providers { - _storage[provider] = (store: RangeStore(documentLength: documentLength), priority: provider) + providerStores[provider] = (store: RangeStore(documentLength: documentLength), priority: provider) } } func addProvider(_ id: ProviderID, priority: Int, documentLength: Int) { - assert(!_storage.keys.contains(id), "Provider already exists") - _storage[id] = (store: RangeStore(documentLength: documentLength), priority: priority) + assert(!providerStores.keys.contains(id), "Provider already exists") + providerStores[id] = (store: RangeStore(documentLength: documentLength), priority: priority) } func setPriority(providerId: ProviderID, priority: Int) { - _storage[providerId]?.priority = priority + providerStores[providerId]?.priority = priority } func removeProvider(_ id: ProviderID) { - guard let provider = _storage[id]?.store else { return } + guard let provider = providerStores[id]?.store else { return } applyHighlightResult( provider: id, highlights: [], rangeToHighlight: NSRange(location: 0, length: provider.length) ) - _storage.removeValue(forKey: id) + providerStores.removeValue(forKey: id) } func storageUpdated(editedRange: NSRange, changeInLength delta: Int) { - for key in _storage.keys { - _storage[key]?.store.storageUpdated(editedRange: editedRange, changeInLength: delta) + for key in providerStores.keys { + providerStores[key]?.store.storageUpdated(editedRange: editedRange, changeInLength: delta) } } } extension StyledRangeContainer: HighlightProviderStateDelegate { func updateStorageLength(newLength: Int) { - for key in _storage.keys { - guard var value = _storage[key] else { continue } + for key in providerStores.keys { + guard var value = providerStores[key] else { continue } var store = value.store let length = store.length if length != newLength { @@ -126,7 +126,7 @@ extension StyledRangeContainer: HighlightProviderStateDelegate { } value.store = store - _storage[key] = value + providerStores[key] = value } } @@ -139,7 +139,7 @@ extension StyledRangeContainer: HighlightProviderStateDelegate { /// - rangeToHighlight: The range to apply the highlights to. func applyHighlightResult(provider: ProviderID, highlights: [HighlightRange], rangeToHighlight: NSRange) { assert(rangeToHighlight != .notFound, "NSNotFound is an invalid highlight range") - guard var storage = _storage[provider]?.store else { + guard var storage = providerStores[provider]?.store else { assertionFailure("No storage found for the given provider: \(provider)") return } @@ -166,7 +166,7 @@ extension StyledRangeContainer: HighlightProviderStateDelegate { } storage.set(runs: runs, for: rangeToHighlight.intRange) - _storage[provider]?.store = storage + providerStores[provider]?.store = storage delegate?.styleContainerDidUpdate(in: rangeToHighlight) } } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/VisibleRangeProvider.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/VisibleRangeProvider.swift index 2a8457d7c1..91428e250b 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/VisibleRangeProvider.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/VisibleRangeProvider.swift @@ -26,7 +26,7 @@ class VisibleRangeProvider { /// The set of visible indexes in the text view lazy var visibleSet: IndexSet = { - return IndexSet(integersIn: textView?.visibleTextRange ?? NSRange()) + IndexSet(integersIn: textView?.visibleTextRange ?? NSRange()) }() init(textView: TextView) { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/InvisibleCharacters/InvisibleCharactersCoordinator.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/InvisibleCharacters/InvisibleCharactersCoordinator.swift index ac1a812962..a09c7de742 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/InvisibleCharacters/InvisibleCharactersCoordinator.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/InvisibleCharacters/InvisibleCharactersCoordinator.swift @@ -28,7 +28,7 @@ final class InvisibleCharactersCoordinator: InvisibleCharactersDelegate { /// /// Indicates characters that the user may not have meant to insert, such as a zero-width space: `(0x200D)` or a /// non-standard quote character: `“ (0x201C)`. - public var warningCharacters: Set { + var warningCharacters: Set { didSet { updateTriggerCharacters() } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Model/LineFoldModel.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Model/LineFoldModel.swift index b920dd6247..9ed63b83b3 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Model/LineFoldModel.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Model/LineFoldModel.swift @@ -23,7 +23,7 @@ class LineFoldModel: NSObject, NSTextStorageDelegate, ObservableObject { /// An ordered tree of fold ranges in a document. Can be traversed using ``FoldRange/parent`` /// and ``FoldRange/subFolds``. - @Published var foldCache: LineFoldStorage = LineFoldStorage(documentLength: 0) + @Published var foldCache = LineFoldStorage(documentLength: 0) private var calculator: LineFoldCalculator private var textChangedStream: AsyncStream diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/View/LineFoldRibbonView.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/View/LineFoldRibbonView.swift index 5eb0d94df9..4eed36bfc6 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/View/LineFoldRibbonView.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/View/LineFoldRibbonView.swift @@ -69,7 +69,7 @@ class LineFoldRibbonView: NSView { let color: NSColor } - override public var isFlipped: Bool { + override var isFlipped: Bool { true } @@ -86,7 +86,7 @@ class LineFoldRibbonView: NSView { /// A chevron is a control, not text, so the pointer says so by staying an arrow. Disclosure triangles elsewhere /// in the system do the same. - override public func resetCursorRects() { + override func resetCursorRects() { addCursorRect(bounds, cursor: .arrow) } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+Coalesce.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+Coalesce.swift index d6fb93259c..9d753126d2 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+Coalesce.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+Coalesce.swift @@ -18,28 +18,28 @@ extension RangeStore { /// - Parameter range: The range of the item to coalesce around. mutating func coalesceNearby(range: Range) { var index = findIndex(at: range.lastIndex).index - if index < _guts.endIndex && _guts.index(after: index) != _guts.endIndex { + if index < rope.endIndex && rope.index(after: index) != rope.endIndex { coalesceRunAfter(index: &index) } index = findIndex(at: range.lowerBound).index - if index > _guts.startIndex && index < _guts.endIndex && _guts.count > 1 { - index = _guts.index(before: index) + if index > rope.startIndex && index < rope.endIndex && rope.count > 1 { + index = rope.index(before: index) coalesceRunAfter(index: &index) } } /// Check if the run and the run after it are equal, and if so remove the next one and concatenate the two. private mutating func coalesceRunAfter(index: inout Index) { - let thisRun = _guts[index] - let nextRun = _guts[_guts.index(after: index)] + let thisRun = rope[index] + let nextRun = rope[rope.index(after: index)] if thisRun.compareValue(nextRun) { - _guts.update(at: &index, by: { $0.length += nextRun.length }) + rope.update(at: &index, by: { $0.length += nextRun.length }) var nextIndex = index - _guts.formIndex(after: &nextIndex) - _guts.remove(at: nextIndex) + rope.formIndex(after: &nextIndex) + rope.remove(at: nextIndex) } } } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+FindIndex.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+FindIndex.swift index 0c3438e09c..7700fced01 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+FindIndex.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+FindIndex.swift @@ -10,13 +10,13 @@ extension RangeStore { /// - Parameter offset: The offset to query for. /// - Returns: The index of the containing element in the rope. func findIndex(at offset: Int) -> (index: Index, remaining: Int) { - _guts.find(at: offset, in: OffsetMetric(), preferEnd: false) + rope.find(at: offset, in: OffsetMetric(), preferEnd: false) } /// Finds the value stored at a given string offset. /// - Parameter offset: The offset to query for. /// - Returns: The element stored, if any. func findValue(at offset: Int) -> Element? { - _guts[findIndex(at: offset).index].value + rope[findIndex(at: offset).index].value } } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+OffsetMetric.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+OffsetMetric.swift index efbfb4a12b..4b63e0a453 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+OffsetMetric.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+OffsetMetric.swift @@ -16,7 +16,7 @@ extension RangeStore { } func index(at offset: Int, in element: RangeStore.StoredRun) -> Int { - return offset + offset } } } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+StoredRun.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+StoredRun.swift index b7a7afdf1c..18cd53268b 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+StoredRun.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+StoredRun.swift @@ -19,7 +19,7 @@ extension RangeStore { /// - Parameter other: The range to compare to. /// - Returns: The result of the comparison. func compareValue(_ other: Self) -> Bool { - return if let lhs = value, let rhs = other.value { + if let lhs = value, let rhs = other.value { lhs == rhs } else if let lhs = value { lhs.isEmpty diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore.swift index 5a1d633674..482e6dbc09 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore.swift @@ -19,10 +19,10 @@ struct RangeStore: Sendable { typealias Run = RangeStoreRun typealias RopeType = Rope typealias Index = RopeType.Index - var _guts = RopeType() + var rope = RopeType() var length: Int { - _guts.count(in: OffsetMetric()) + rope.count(in: OffsetMetric()) } /// A small performance improvement for multiple identical queries, as often happens when used @@ -30,7 +30,7 @@ struct RangeStore: Sendable { private var cache: (range: Range, runs: [Run])? init(documentLength: Int) { - self._guts = RopeType([StoredRun(length: documentLength, value: nil)]) + self.rope = RopeType([StoredRun(length: documentLength, value: nil)]) } // MARK: - Core @@ -39,7 +39,7 @@ struct RangeStore: Sendable { /// - Parameter range: The range to query. /// - Returns: A continuous array of runs representing the queried range. func runs(in range: Range) -> [Run] { - let length = _guts.count(in: OffsetMetric()) + let length = rope.count(in: OffsetMetric()) assert(range.lowerBound >= 0, "Negative lowerBound") assert(range.upperBound <= length, "upperBound outside valid range") if let cache, cache.range == range { @@ -48,13 +48,13 @@ struct RangeStore: Sendable { var runs = [Run]() var index = findIndex(at: range.lowerBound).index - var offset: Int = range.lowerBound - _guts.offset(of: index, in: OffsetMetric()) + var offset: Int = range.lowerBound - rope.offset(of: index, in: OffsetMetric()) var remainingLength = range.upperBound - range.lowerBound - while index < _guts.endIndex, - _guts.offset(of: index, in: OffsetMetric()) < range.upperBound, + while index < rope.endIndex, + rope.offset(of: index, in: OffsetMetric()) < range.upperBound, remainingLength > 0 { - let run = _guts[index] + let run = rope[index] let runLength = min(run.length - offset, remainingLength) runs.append(Run(length: runLength, value: run.value)) @@ -62,7 +62,7 @@ struct RangeStore: Sendable { if remainingLength <= 0 { break // Avoid even checking the storage for the next index } - index = _guts.index(after: index) + index = rope.index(after: index) offset = 0 } @@ -75,7 +75,7 @@ struct RangeStore: Sendable { /// - range: The range to write to. mutating func set(value: Element, for range: Range) { assert(range.lowerBound >= 0, "Negative lowerBound") - assert(range.upperBound <= _guts.count(in: OffsetMetric()), "upperBound outside valid range") + assert(range.upperBound <= rope.count(in: OffsetMetric()), "upperBound outside valid range") set(runs: [Run(length: range.length, value: value)], for: range) } @@ -94,7 +94,7 @@ struct RangeStore: Sendable { // This is quite slow in debug builds but is a *really* important assertion for internal state. assert(!runs.contains(where: { $0.length < 0 }), "Runs cannot have negative length.") - _guts.replaceSubrange( + rope.replaceSubrange( range, in: OffsetMetric(), with: runs.map { StoredRun(length: $0.length, value: $0.value) } @@ -122,7 +122,7 @@ extension RangeStore { } storageUpdated( - replacedCharactersIn: storageRange.clamped(to: 0..<_guts.count(in: OffsetMetric())), + replacedCharactersIn: storageRange.clamped(to: 0.., withCount newLength: Int) { assert(range.lowerBound >= 0, "Negative lowerBound") - assert(range.upperBound <= _guts.count(in: OffsetMetric()), "upperBound outside valid range") + assert(range.upperBound <= rope.count(in: OffsetMetric()), "upperBound outside valid range") if newLength != 0 { - _guts.replaceSubrange(range, in: OffsetMetric(), with: [.empty(length: newLength)]) + rope.replaceSubrange(range, in: OffsetMetric(), with: [.empty(length: newLength)]) } else { - _guts.removeSubrange(range, in: OffsetMetric()) + rope.removeSubrange(range, in: OffsetMetric()) } - if _guts.count > 0 { + if !rope.isEmpty { // Coalesce nearby items if necessary. coalesceNearby(range: Range(lowerBound: range.lowerBound, length: newLength)) } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditor/SourceEditor+Coordinator.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditor/SourceEditor+Coordinator.swift index aef4028d83..ee989708ec 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditor/SourceEditor+Coordinator.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditor/SourceEditor+Coordinator.swift @@ -6,13 +6,13 @@ // import AppKit -import SwiftUI -import Combine import CodeEditTextView +import Combine +import SwiftUI -extension SourceEditor { +public extension SourceEditor { @MainActor - public class Coordinator: NSObject { + class Coordinator: NSObject { private weak var controller: TextViewController? let phase = RepresentableSyncPhase() let textSync: TextBindingSync diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Appearance.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Appearance.swift index 91c695e14c..7c3351780c 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Appearance.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Appearance.swift @@ -7,9 +7,9 @@ import AppKit -extension SourceEditorConfiguration { +public extension SourceEditorConfiguration { /// Configure the appearance of the editor. Font, theme, line height, etc. - public struct Appearance: Equatable { + struct Appearance: Equatable { /// The theme for syntax highlighting. public var theme: EditorTheme diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Behavior.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Behavior.swift index 792f489039..e03697b2d1 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Behavior.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Behavior.swift @@ -5,8 +5,8 @@ // Created by Khan Winter on 6/16/25. // -extension SourceEditorConfiguration { - public struct Behavior: Equatable { +public extension SourceEditorConfiguration { + struct Behavior: Equatable { /// Controls whether the text view allows the user to edit text. public var isEditable: Bool = true diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Layout.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Layout.swift index aae7e465e1..93d2d0f423 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Layout.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Layout.swift @@ -7,8 +7,8 @@ import AppKit -extension SourceEditorConfiguration { - public struct Layout: Equatable { +public extension SourceEditorConfiguration { + struct Layout: Equatable { /// The distance to overscroll the editor by, as a multiple of the visible editor height. public var editorOverscroll: CGFloat = 0 diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Peripherals.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Peripherals.swift index 938a2e201c..55d6c873a5 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Peripherals.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Peripherals.swift @@ -7,8 +7,8 @@ import CodeEditTextView -extension SourceEditorConfiguration { - public struct Peripherals: Equatable { +public extension SourceEditorConfiguration { + struct Peripherals: Equatable { /// Whether to show the gutter. public var showGutter: Bool = true diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/StatementRunning/StatementRunRibbonView.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/StatementRunning/StatementRunRibbonView.swift index 458d1fa547..bc278e7dff 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/StatementRunning/StatementRunRibbonView.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/StatementRunning/StatementRunRibbonView.swift @@ -96,7 +96,7 @@ class StatementRunRibbonView: NSView { weak var controller: TextViewController? - override public var isFlipped: Bool { + override var isFlipped: Bool { true } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/IconButtonStyle.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/IconButtonStyle.swift index dfc6ff7852..efc3e41d3a 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/IconButtonStyle.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/IconButtonStyle.swift @@ -101,20 +101,20 @@ extension ButtonStyle where Self == IconButtonStyle { font: Font? = Font.system(size: 14.5, weight: .regular, design: .default), size: CGFloat? = 24 ) -> IconButtonStyle { - return IconButtonStyle(isActive: isActive, font: font, size: size) + IconButtonStyle(isActive: isActive, font: font, size: size) } static func icon( isActive: Bool? = false, font: Font? = Font.system(size: 14.5, weight: .regular, design: .default), size: CGSize? = CGSize(width: 24, height: 24) ) -> IconButtonStyle { - return IconButtonStyle(isActive: isActive, font: font, size: size) + IconButtonStyle(isActive: isActive, font: font, size: size) } static func icon( isActive: Bool? = false, font: Font? = Font.system(size: 14.5, weight: .regular, design: .default) ) -> IconButtonStyle { - return IconButtonStyle(isActive: isActive, font: font) + IconButtonStyle(isActive: isActive, font: font) } static var icon: IconButtonStyle { .init() } } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/IconToggleStyle.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/IconToggleStyle.swift index 2382dfc346..311c010cd1 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/IconToggleStyle.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/IconToggleStyle.swift @@ -42,18 +42,18 @@ extension ToggleStyle where Self == IconToggleStyle { font: Font? = Font.system(size: 14.5, weight: .regular, design: .default), size: CGFloat? = 24 ) -> IconToggleStyle { - return IconToggleStyle(font: font, size: size) + IconToggleStyle(font: font, size: size) } static func icon( font: Font? = Font.system(size: 14.5, weight: .regular, design: .default), size: CGSize? = CGSize(width: 24, height: 24) ) -> IconToggleStyle { - return IconToggleStyle(font: font, size: size) + IconToggleStyle(font: font, size: size) } static func icon( font: Font? = Font.system(size: 14.5, weight: .regular, design: .default) ) -> IconToggleStyle { - return IconToggleStyle(font: font) + IconToggleStyle(font: font) } static var icon: IconToggleStyle { .init() } } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/PanelTextField.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/PanelTextField.swift index 9c66afc676..7ea2de5e42 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/PanelTextField.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/PanelTextField.swift @@ -5,8 +5,8 @@ // Created by Austin Condiff on 11/2/23. // -import SwiftUI import Combine +import SwiftUI struct PanelTextField: View { @Environment(\.colorScheme) @@ -54,7 +54,7 @@ struct PanelTextField: View } @ViewBuilder - public func selectionBackground( + func selectionBackground( _ isFocused: Bool = false ) -> some View { if self.controlActive != .inactive || !text.isEmpty { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/SourceEditorTextView.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/SourceEditorTextView.swift index 740248acbe..dab11921f1 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/SourceEditorTextView.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/SourceEditorTextView.swift @@ -104,5 +104,4 @@ final class SourceEditorTextView: TextView { } context.restoreGState() } - } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TextViewCoordinator/CombineCoordinator.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TextViewCoordinator/CombineCoordinator.swift index 3474c3fd5e..d0101ca50b 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TextViewCoordinator/CombineCoordinator.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TextViewCoordinator/CombineCoordinator.swift @@ -5,9 +5,9 @@ // Created by Khan Winter on 5/19/24. // -import Foundation -import Combine import CodeEditTextView +import Combine +import Foundation /// A ``TextViewCoordinator`` class that publishes text changes and selection changes using Combine publishers. /// diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/LanguageLayer.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/LanguageLayer.swift index 56c7a43db8..936c7ef6a9 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/LanguageLayer.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/LanguageLayer.swift @@ -60,7 +60,7 @@ public class LanguageLayer: Hashable { var ranges: [NSRange] func copy() -> LanguageLayer { - return LanguageLayer( + LanguageLayer( id: id, tsLanguage: tsLanguage, parser: parser, @@ -72,7 +72,7 @@ public class LanguageLayer: Hashable { } public static func == (lhs: LanguageLayer, rhs: LanguageLayer) -> Bool { - return lhs.id == rhs.id && lhs.ranges == rhs.ranges + lhs.id == rhs.id && lhs.ranges == rhs.ranges } public func hash(into hasher: inout Hasher) { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Highlight.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Highlight.swift index 80d6a2aa45..73db285bf3 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Highlight.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Highlight.swift @@ -63,7 +63,7 @@ extension TreeSitterClient { return [] } queryCursor.setRange(range) - queryCursor.matchLimit = Constants.matchLimit + queryCursor.matchLimit = Constants.matchLimit return highlightsFromCursor(cursor: queryCursor, includedRange: range) } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Query.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Query.swift index 7416e9e2fe..fff178df37 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Query.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Query.swift @@ -12,14 +12,14 @@ import TableProGrammars // Functions for querying and navigating the tree-sitter node tree. These functions should throw if not able to be // performed asynchronously as (currently) any editing tasks that would use these must be performed synchronously. -extension TreeSitterClient { - public struct NodeResult { +public extension TreeSitterClient { + struct NodeResult { let id: GrammarID let language: Language public let node: Node } - public struct QueryResult { + struct QueryResult { let id: GrammarID let cursor: ResolvingQueryMatchSequence } @@ -28,7 +28,7 @@ extension TreeSitterClient { /// - Parameter location: The location to get a node for. /// - Returns: All pairs of `Language, Node` where Node is the nearest node in the tree at the given location. /// - Throws: A ``TreeSitterClient.Error`` error. - public func nodesAt(location: Int) throws -> [NodeResult] { + func nodesAt(location: Int) throws -> [NodeResult] { let range = NSRange(location: location, length: 1) return try nodesAt(range: range) } @@ -37,7 +37,7 @@ extension TreeSitterClient { /// - Parameter location: The location to get a node for. /// - Returns: All pairs of `Language, Node` where Node is the nearest node in the tree at the given location. /// - Throws: A ``TreeSitterClient.Error`` error. - public func nodesAt(location: Int) async throws -> [NodeResult] { + func nodesAt(location: Int) async throws -> [NodeResult] { let range = NSRange(location: location, length: 1) return try await nodesAt(range: range) } @@ -46,7 +46,7 @@ extension TreeSitterClient { /// - Parameter range: The range to get a node for. /// - Returns: All pairs of `Language, Node` where Node is the nearest node in the tree in the given range. /// - Throws: A ``TreeSitterClient.Error`` error. - public func nodesAt(range: NSRange) throws -> [NodeResult] { + func nodesAt(range: NSRange) throws -> [NodeResult] { try executor.execSync({ var nodes: [NodeResult] = [] for layer in self.state?.layers ?? [] { @@ -64,7 +64,7 @@ extension TreeSitterClient { /// - Parameter range: The range to get a node for. /// - Returns: All pairs of `Language, Node` where Node is the nearest node in the tree in the given range. /// - Throws: A ``TreeSitterClient.Error`` error. - public func nodesAt(range: NSRange) async throws -> [NodeResult] { + func nodesAt(range: NSRange) async throws -> [NodeResult] { try await executor.exec { var nodes: [NodeResult] = [] for layer in self.state?.layers ?? [] { @@ -82,7 +82,7 @@ extension TreeSitterClient { /// - query: The query to perform. /// - matchingLanguages: A set of languages to limit the query to. Leave empty to not filter out any layers. /// - Returns: Any matching nodes from the query. - public func query(_ query: Query, matchingLanguages: Set = []) throws -> [QueryResult] { + func query(_ query: Query, matchingLanguages: Set = []) throws -> [QueryResult] { try executor.execSync({ guard let readCallback = self.readCallback else { return [] } var result: [QueryResult] = [] @@ -103,7 +103,7 @@ extension TreeSitterClient { /// - query: The query to perform. /// - matchingLanguages: A set of languages to limit the query to. Leave empty to not filter out any layers. /// - Returns: Any matching nodes from the query. - public func query(_ query: Query, matchingLanguages: Set = []) async throws -> [QueryResult] { + func query(_ query: Query, matchingLanguages: Set = []) async throws -> [QueryResult] { try await executor.exec { guard let readCallback = self.readCallback else { return [] } var result: [QueryResult] = [] diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient.swift index ee5b7fae4f..ec93d031b5 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient.swift @@ -27,7 +27,7 @@ import TableProGrammars /// implementation may return synchronously or asynchronously depending on a variety of factors such as document /// length, edit length, highlight length and if the object is available for a synchronous call. public final class TreeSitterClient: HighlightProviding { - static let logger: Logger = Logger(subsystem: Bundle.main.bundleIdentifier ?? "", category: "TreeSitterClient") + static let logger = Logger(subsystem: Bundle.main.bundleIdentifier ?? "", category: "TreeSitterClient") enum TreeSitterClientError: Error { case invalidEdit @@ -73,18 +73,18 @@ public final class TreeSitterClient: HighlightProviding { public static var parserTimeout: TimeInterval = 0.05 /// The maximum length of an edit before it must be processed asynchronously - public static var maxSyncEditLength: Int = 1024 + public static var maxSyncEditLength: Int = 1_024 /// The maximum length a document can be before all queries and edits must be processed asynchronously. public static var maxSyncContentLength: Int = 1_000_000 /// The maximum length a query can be before it must be performed asynchronously. - public static var maxSyncQueryLength: Int = 4096 + public static var maxSyncQueryLength: Int = 4_096 /// The number of characters to read in a read block. /// /// This has diminishing returns on the number of times the read block is called as this number gets large. - public static let charsToReadInBlock: Int = 4096 + public static let charsToReadInBlock: Int = 4_096 /// The duration before a long parse notification is sent. public static var longParseTimeout: Duration = .seconds(0.5) @@ -248,14 +248,14 @@ public final class TreeSitterClient: HighlightProviding { completion: @escaping @MainActor (Result<[HighlightRange], Error>) -> Void ) { let operation = { [weak self] in - return (self?.queryHighlightsForRange(range: range) ?? []).sorted { $0.range.location < $1.range.location } + (self?.queryHighlightsForRange(range: range) ?? []).sorted { $0.range.location < $1.range.location } } let longQuery = range.length > Constants.maxSyncQueryLength // For small highlight queries (typical per-keystroke chunks of 4096 chars), // run synchronously to avoid the async cancellation delay that causes // highlights to only appear after typing stops. - let isSmallQuery = range.length <= 8192 + let isSmallQuery = range.length <= 8_192 let longDocument = !isSmallQuery && textView.documentRange.length > Constants.maxSyncContentLength let execAsync = longQuery || longDocument diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterExecutor.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterExecutor.swift index 8f7423f1cb..668b87b5a9 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterExecutor.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterExecutor.swift @@ -130,14 +130,13 @@ final package class TreeSitterExecutor { } func exec(_ priority: Priority = .access, operation: @escaping () -> T) async throws -> T { - return try await withCheckedThrowingContinuation { continuation in + try await withCheckedThrowingContinuation { continuation in execAsync(priority: priority) { continuation.resume(returning: operation()) return true } onCancel: { continuation.resume(throwing: CancellationError()) } - } } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterState.swift b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterState.swift index ce6767dc4b..944e9987dd 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterState.swift +++ b/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterState.swift @@ -220,7 +220,7 @@ public final class TreeSitterState { cursor.matchLimit = TreeSitterClient.Constants.matchLimit let languageRanges = self.injectedLanguagesFrom(cursor: cursor) { range, point in - return readCallback(range, point) + readCallback(range, point) } var updatedRanges = IndexSet() diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CaptureModifierSetTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CaptureModifierSetTests.swift index 57b18352d4..e83b44f0b8 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CaptureModifierSetTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CaptureModifierSetTests.swift @@ -1,5 +1,5 @@ -import XCTest @testable import CodeEditSourceEditor +import XCTest final class CaptureModifierSetTests: XCTestCase { func test_init() { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeEditSourceEditorTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeEditSourceEditorTests.swift index f9e2cfa2dd..f1e014c63c 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeEditSourceEditorTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeEditSourceEditorTests.swift @@ -1,5 +1,5 @@ -import XCTest @testable import CodeEditSourceEditor +import XCTest // swiftlint:disable all final class CodeEditSourceEditorTests: XCTestCase { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionPanelFocusTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionPanelFocusTests.swift index f084fb256f..ec39a91593 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionPanelFocusTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionPanelFocusTests.swift @@ -48,7 +48,7 @@ final class SuggestionPanelFocusTests: XCTestCase { controller.showWindow(attachedTo: parentWindow) RunLoop.main.run(until: Date(timeIntervalSinceNow: 0.2)) - XCTAssertTrue(parentWindow.firstResponder === textView) + XCTAssertIdentical(parentWindow.firstResponder, textView) } @MainActor @@ -64,10 +64,10 @@ final class SuggestionPanelFocusTests: XCTestCase { } controller.showWindow(attachedTo: firstParent) - XCTAssertTrue(window.parent === firstParent) + XCTAssertIdentical(window.parent, firstParent) controller.showWindow(attachedTo: secondParent) - XCTAssertTrue(window.parent === secondParent) + XCTAssertIdentical(window.parent, secondParent) XCTAssertFalse(firstParent.childWindows?.contains(window) ?? false) } @@ -79,7 +79,7 @@ final class SuggestionPanelFocusTests: XCTestCase { defer { parentWindow.close() } controller.showWindow(attachedTo: parentWindow) - XCTAssertTrue(window.parent === parentWindow) + XCTAssertIdentical(window.parent, parentWindow) controller.close() diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionShowCompletionsGuardTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionShowCompletionsGuardTests.swift index 1afbfe4dca..0972a9bfce 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionShowCompletionsGuardTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionShowCompletionsGuardTests.swift @@ -58,7 +58,7 @@ final class SuggestionShowCompletionsGuardTests: XCTestCase { await model.itemsRequestTask?.value XCTAssertEqual(presentedWindows.count, 1) - XCTAssertTrue(presentedWindows.first === window) + XCTAssertIdentical(presentedWindows.first, window) } } diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionWindowPlacementTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionWindowPlacementTests.swift index dcb975576e..36158adcce 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionWindowPlacementTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionWindowPlacementTests.swift @@ -3,7 +3,7 @@ import AppKit import XCTest final class SuggestionWindowPlacementTests: XCTestCase { - private let screenFrame = NSRect(x: 0, y: 0, width: 1440, height: 900) + private let screenFrame = NSRect(x: 0, y: 0, width: 1_440, height: 900) private let editorFrame = NSRect(x: 100, y: 150, width: 900, height: 600) private let font = NSFont.systemFont(ofSize: 12) @@ -96,7 +96,7 @@ final class SuggestionWindowPlacementTests: XCTestCase { } func test_compute_fallsBackToScreenFrameWhenEditorFrameIsNil() { - let cursorRect = NSRect(x: 1300, y: 500, width: 6, height: 16) + let cursorRect = NSRect(x: 1_300, y: 500, width: 6, height: 16) let windowSize = NSSize(width: 280, height: 200) let placement = SuggestionWindowPlacement.compute( diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewController+IndentTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewController+IndentTests.swift index 92eaededb2..b61ad05052 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewController+IndentTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewController+IndentTests.swift @@ -5,10 +5,10 @@ // Created by Ludwig, Tom on 08.10.24. // -import XCTest @testable import CodeEditSourceEditor @testable import CodeEditTextView import CustomDump +import XCTest final class TextViewControllerIndentTests: XCTestCase { var controller: TextViewController! diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewController+MoveLinesTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewController+MoveLinesTests.swift index 82ef656a8a..48327fda79 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewController+MoveLinesTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewController+MoveLinesTests.swift @@ -5,10 +5,10 @@ // Created by Bogdan Belogurov on 01/06/2025. // -import XCTest @testable import CodeEditSourceEditor @testable import CodeEditTextView import CustomDump +import XCTest final class TextViewControllerMoveLinesTests: XCTestCase { var controller: TextViewController! diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewControllerTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewControllerTests.swift index 04f7b3cd82..8f36d1ffbf 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewControllerTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewControllerTests.swift @@ -1,13 +1,11 @@ -import XCTest +import AppKit @testable import CodeEditSourceEditor import SwiftTreeSitter -import AppKit import SwiftUI import TextStory +import XCTest -// swiftlint:disable:next type_body_length final class TextViewControllerTests: XCTestCase { - var controller: TextViewController! var theme: EditorTheme! @@ -16,7 +14,7 @@ final class TextViewControllerTests: XCTestCase { controller = Mock.textViewController(theme: theme) controller.loadView() - controller.view.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) + controller.view.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) controller.view.layoutSubtreeIfNeeded() } @@ -207,13 +205,13 @@ final class TextViewControllerTests: XCTestCase { XCTAssertEqual(controller.textView.string, "\t") // Insert lots of spaces - controller.configuration.behavior.indentOption = .spaces(count: 1000) + controller.configuration.behavior.indentOption = .spaces(count: 1_000) controller.textView.replaceCharacters( in: NSRange(location: 0, length: controller.textView.textStorage.length), with: "" ) controller.textView.insertText("\t", replacementRange: .zero) - XCTAssertEqual(controller.textView.string, String(repeating: " ", count: 1000)) + XCTAssertEqual(controller.textView.string, String(repeating: " ", count: 1_000)) } func test_letterSpacing() throws { @@ -289,41 +287,43 @@ final class TextViewControllerTests: XCTestCase { // Test walking forwards idx = controller.findClosingPair("{", "}", from: 1, limit: 18, reverse: false) - XCTAssert(idx == 17, "Walking forwards failed. Expected `17`, found: `\(String(describing: idx))`") + XCTAssertEqual(idx, 17, "Walking forwards failed. Expected `17`, found: `\(String(describing: idx))`") // Test walking backwards idx = controller.findClosingPair("}", "{", from: 17, limit: 0, reverse: true) - XCTAssert(idx == 0, "Walking backwards failed. Expected `0`, found: `\(String(describing: idx))`") + XCTAssertEqual(idx, 0, "Walking backwards failed. Expected `0`, found: `\(String(describing: idx))`") // Test extra pair controller.textView.string = "{ Loren Ipsum {}} }" idx = controller.findClosingPair("{", "}", from: 1, limit: 19, reverse: false) - XCTAssert( - idx == 16, + XCTAssertEqual( + idx, + 16, "Walking forwards with extra bracket pair failed. Expected `16`, found: `\(String(describing: idx))`" ) // Text extra pair backwards controller.textView.string = "{ Loren Ipsum {{} }" idx = controller.findClosingPair("}", "{", from: 18, limit: 0, reverse: true) - XCTAssert( - idx == 14, + XCTAssertEqual( + idx, + 14, "Walking backwards with extra bracket pair failed. Expected `14`, found: `\(String(describing: idx))`" ) // Test missing pair controller.textView.string = "{ Loren Ipsum { }" idx = controller.findClosingPair("{", "}", from: 1, limit: 17, reverse: false) - XCTAssert( - idx == nil, + XCTAssertNil( + idx, "Walking forwards with missing pair failed. Expected `nil`, found: `\(String(describing: idx))`" ) // Test missing pair backwards controller.textView.string = " Loren Ipsum {} }" idx = controller.findClosingPair("}", "{", from: 17, limit: 0, reverse: true) - XCTAssert( - idx == nil, + XCTAssertNil( + idx, "Walking backwards with missing pair failed. Expected `nil`, found: `\(String(describing: idx))`" ) } @@ -337,7 +337,7 @@ final class TextViewControllerTests: XCTestCase { controller.setText("\nHello World with newline!") - XCTAssert(controller.text == "\nHello World with newline!") + XCTAssertEqual(controller.text, "\nHello World with newline!") XCTAssertEqual(controller.cursorPositions.count, 1) XCTAssertEqual(controller.cursorPositions[0].start.line, 2) XCTAssertEqual(controller.cursorPositions[0].start.column, 1) @@ -364,7 +364,7 @@ final class TextViewControllerTests: XCTestCase { // Test an invalid position is ignored controller.setCursorPositions([CursorPosition(range: NSRange(location: -1, length: 25))]) - XCTAssertTrue(controller.cursorPositions.count == 0) + XCTAssertTrue(controller.cursorPositions.isEmpty) // Test that column and line are correct controller.setText("1\n2\n3\n4\n") @@ -425,7 +425,7 @@ final class TextViewControllerTests: XCTestCase { // Test an invalid position is ignored controller.setCursorPositions([CursorPosition(line: -1, column: 10)]) - XCTAssertTrue(controller.cursorPositions.count == 0) + XCTAssertTrue(controller.cursorPositions.isEmpty) // Test that column and line are correct controller.setText("1\n2\n3\n4\n") @@ -604,5 +604,3 @@ final class TextViewControllerTests: XCTestCase { } } } - -// swiftlint:disable:this file_length diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/FindPanelTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/FindPanelTests.swift index 4ddacbc4c8..64b0d97a33 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/FindPanelTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/FindPanelTests.swift @@ -1,7 +1,7 @@ -import Testing import AppKit -import CodeEditTextView @testable import CodeEditSourceEditor +import CodeEditTextView +import Testing @MainActor struct FindPanelTests { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/GutterNumberOffsetTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/GutterNumberOffsetTests.swift index 27b286da3c..874435866f 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/GutterNumberOffsetTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/GutterNumberOffsetTests.swift @@ -4,9 +4,9 @@ // import AppKit +@testable import CodeEditSourceEditor import CodeEditTextView import Testing -@testable import CodeEditSourceEditor /// Where the line number is actually painted, read back off the gutter. /// diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/HighlighterTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/HighlighterTests.swift index 9125cf0c95..0e0db2ac8b 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/HighlighterTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/HighlighterTests.swift @@ -42,7 +42,7 @@ final class HighlighterTests: XCTestCase { } class SentryStorageDelegate: NSObject, NSTextStorageDelegate { - var editedIndices: IndexSet = IndexSet() + var editedIndices = IndexSet() func textStorage( _ textStorage: NSTextStorage, @@ -59,7 +59,7 @@ final class HighlighterTests: XCTestCase { override func setUp() { attributeProvider = MockAttributeProvider() textView = Mock.textView() - textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) + textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) } @MainActor @@ -77,7 +77,7 @@ final class HighlighterTests: XCTestCase { } let attributeProvider = MockAttributeProvider() let textView = Mock.textView() - textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) + textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) textView.setText("Hello World!") let highlighter = Mock.highlighter( textView: textView, @@ -122,7 +122,7 @@ final class HighlighterTests: XCTestCase { let highlightProvider1 = MockHighlightProvider(queryResponse: { .success([]) }) let attributeProvider = MockAttributeProvider() let textView = Mock.textView() - textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) + textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) textView.setText("Hello World!") let highlighter = Mock.highlighter( textView: textView, @@ -146,7 +146,7 @@ final class HighlighterTests: XCTestCase { let attributeProvider = MockAttributeProvider() let textView = Mock.textView() - textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) + textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) textView.setText("Hello World!") let highlighter = Mock.highlighter( @@ -173,7 +173,7 @@ final class HighlighterTests: XCTestCase { let attributeProvider = MockAttributeProvider() let textView = Mock.textView() - textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) + textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) textView.setText("Hello World!") let highlighter = Mock.highlighter( @@ -204,7 +204,7 @@ final class HighlighterTests: XCTestCase { let attributeProvider = MockAttributeProvider() let textView = Mock.textView() - textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) + textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) textView.setText("Hello World!") let highlighter = Mock.highlighter( @@ -281,7 +281,7 @@ final class HighlighterTests: XCTestCase { func test_editDoesNotHighlightDocumentOverMaxLength() { let highlightProvider = MockHighlightProvider(queryResponse: { .success([]) }) let textView = Mock.textView() - textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) + textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) textView.setText(String(repeating: "a", count: 64)) let highlighter = Mock.highlighter( @@ -305,7 +305,7 @@ final class HighlighterTests: XCTestCase { func test_editHighlightsDocumentUnderMaxLength() { let highlightProvider = MockHighlightProvider(queryResponse: { .success([]) }) let textView = Mock.textView() - textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) + textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) textView.setText("SELECT 1;") let highlighter = Mock.highlighter( diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/StyledRangeContainerTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/StyledRangeContainerTests.swift index 1c4663f292..c674e1b507 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/StyledRangeContainerTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/StyledRangeContainerTests.swift @@ -1,5 +1,5 @@ -import XCTest @testable import CodeEditSourceEditor +import XCTest final class StyledRangeContainerTests: XCTestCase { typealias Run = RangeStoreRun @@ -10,15 +10,15 @@ final class StyledRangeContainerTests: XCTestCase { let store = StyledRangeContainer(documentLength: 100, providers: providers) // Have to do string conversion due to missing Comparable conformance pre-macOS 14 - XCTAssertEqual(store._storage.keys.sorted(), providers) + XCTAssertEqual(store.providerStores.keys.sorted(), providers) XCTAssert( - store._storage.values.allSatisfy({ $0.store.length == 100 }), + store.providerStores.values.allSatisfy({ $0.store.length == 100 }), "One or more providers have incorrect length" ) } @MainActor - func test_setHighlights() { + func test_setHighlights() throws { let providers = [0, 1] let store = StyledRangeContainer(documentLength: 100, providers: providers) @@ -28,11 +28,13 @@ final class StyledRangeContainerTests: XCTestCase { rangeToHighlight: NSRange(location: 0, length: 100) ) - XCTAssertNotNil(store._storage[providers[0]]) - XCTAssertEqual(store._storage[providers[0]]!.store.count, 3) - XCTAssertNil(store._storage[providers[0]]!.store.runs(in: 0..<100)[0].value?.capture) - XCTAssertEqual(store._storage[providers[0]]!.store.runs(in: 0..<100)[1].value?.capture, .comment) - XCTAssertNil(store._storage[providers[0]]!.store.runs(in: 0..<100)[2].value?.capture) + let storage = try XCTUnwrap(store.providerStores[providers[0]]) + XCTAssertEqual(storage.store.runCount, 3) + + let runs = storage.store.runs(in: 0..<100) + XCTAssertNil(runs[0].value?.capture) + XCTAssertEqual(runs[1].value?.capture, .comment) + XCTAssertNil(runs[2].value?.capture) XCTAssertEqual( store.runsIn(range: NSRange(location: 0, length: 100)), diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/VisibleRangeProviderTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/VisibleRangeProviderTests.swift index e75098d85f..da6740e3bd 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/VisibleRangeProviderTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/VisibleRangeProviderTests.swift @@ -1,5 +1,5 @@ -import XCTest @testable import CodeEditSourceEditor +import XCTest final class VisibleRangeProviderTests: XCTestCase { @MainActor @@ -36,23 +36,21 @@ final class VisibleRangeProviderTests: XCTestCase { XCTAssertNotEqual(originalSet, rangeProvider.visibleSet) } - // Skipping due to a bug in the textview that returns all indices for the visible rect - // when not in a scroll view - @MainActor - func _test_updateOnResizeNoScrollView() { + func test_noScrollViewMakesTheWholeDocumentVisible() { let textView = Mock.textView() textView.frame = NSRect(x: 0, y: 0, width: 100, height: 100) textView.string = Array(repeating: "\n", count: 400).joined() textView.layout() let rangeProvider = VisibleRangeProvider(textView: textView) - let originalSet = rangeProvider.visibleSet + let wholeDocument = IndexSet(integersIn: rangeProvider.documentRange) - textView.setFrameSize(NSSize(width: 350, height: 450)) + XCTAssertEqual(rangeProvider.visibleSet, wholeDocument) + textView.setFrameSize(NSSize(width: 350, height: 450)) textView.layout() - XCTAssertNotEqual(originalSet, rangeProvider.visibleSet) + XCTAssertEqual(rangeProvider.visibleSet, wholeDocument) } } diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldAccessibilityTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldAccessibilityTests.swift index 1ef323c32d..83dca4592e 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldAccessibilityTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldAccessibilityTests.swift @@ -4,9 +4,9 @@ // import AppKit +@testable import CodeEditSourceEditor import CodeEditTextView import Testing -@testable import CodeEditSourceEditor /// The fold chevrons are drawn rather than hosted as views, which is what keeps scrolling a long document cheap. A /// drawn control is not a control as far as assistive technology is concerned unless the view says so, so the ribbon @@ -20,10 +20,10 @@ struct LineFoldAccessibilityTests { init() throws { controller = Mock.textViewController(theme: Mock.theme()) controller.textView.string = "A\nB\nC\nD\nE\nF\n" - controller.textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) - controller.textView.updatedViewport(NSRect(x: 0, y: 0, width: 1000, height: 1000)) + controller.textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) + controller.textView.updatedViewport(NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) ribbon = LineFoldRibbonView(controller: controller) - ribbon.frame = NSRect(x: 0, y: 0, width: 14, height: 1000) + ribbon.frame = NSRect(x: 0, y: 0, width: 14, height: 1_000) model = try #require(ribbon.model) model.foldCache = LineFoldStorage( documentLength: controller.textView.textStorage.length, diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldChunkBoundaryTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldChunkBoundaryTests.swift index 6208e1f539..c36714d325 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldChunkBoundaryTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldChunkBoundaryTests.swift @@ -3,10 +3,10 @@ // CodeEditSourceEditor // -import Testing import AppKit -import CodeEditTextView @testable import CodeEditSourceEditor +import CodeEditTextView +import Testing /// The fold calculator pulls lines from the provider 50 at a time, threading the running depth between calls. A local /// variable used to shadow that state and drop it at every chunk boundary, so depth silently reset to zero on the 51st @@ -37,8 +37,8 @@ struct LineFoldChunkBoundaryTests { init() { controller = Mock.textViewController(theme: Mock.theme()) controller.textView.string = (0..<120).map { "line \($0)" }.joined(separator: "\n") - controller.textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 4000) - controller.textView.updatedViewport(NSRect(x: 0, y: 0, width: 1000, height: 4000)) + controller.textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 4_000) + controller.textView.updatedViewport(NSRect(x: 0, y: 0, width: 1_000, height: 4_000)) } @Test("Depth carries across the 50 line chunk boundary") diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldCollapsePathTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldCollapsePathTests.swift index 0a47c2c554..425edf7f0f 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldCollapsePathTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldCollapsePathTests.swift @@ -4,9 +4,9 @@ // import AppKit +@testable import CodeEditSourceEditor import CodeEditTextView import Testing -@testable import CodeEditSourceEditor /// A fold can be toggled from the gutter's chevron or by clicking the placeholder that stands in for it, and the two /// used to record the change in different ways: only one of them relaid out the text and redrew the gutter. Both now @@ -20,8 +20,8 @@ struct LineFoldCollapsePathTests { init() throws { controller = Mock.textViewController(theme: Mock.theme()) controller.textView.string = "A\nB\nC\nD\nE\nF\n" - controller.textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) - controller.textView.updatedViewport(NSRect(x: 0, y: 0, width: 1000, height: 1000)) + controller.textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) + controller.textView.updatedViewport(NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) ribbon = LineFoldRibbonView(controller: controller) model = try #require(ribbon.model) model.foldCache = LineFoldStorage( diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldDocumentSwapTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldDocumentSwapTests.swift index 55d7559ca8..be3daa8bef 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldDocumentSwapTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldDocumentSwapTests.swift @@ -4,9 +4,9 @@ // import AppKit +@testable import CodeEditSourceEditor import CodeEditTextView import Testing -@testable import CodeEditSourceEditor /// A recalculation deliberately carries collapse state across by depth and start offset, which is what keeps a region /// folded while the reader types above it. Replacing the document makes those offsets meaningless, so the collapse @@ -20,8 +20,8 @@ struct LineFoldDocumentSwapTests { controller = Mock.textViewController(theme: Mock.theme()) controller.loadView() controller.textView.string = "A\nB\nC\nD\nE\nF\n" - controller.textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) - controller.textView.updatedViewport(NSRect(x: 0, y: 0, width: 1000, height: 1000)) + controller.textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) + controller.textView.updatedViewport(NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) model = try #require(controller.gutterView.foldingRibbon.model) model.foldCache = LineFoldStorage( documentLength: controller.textView.textStorage.length, diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldHoverTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldHoverTests.swift index c6a4b862eb..404a065fb9 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldHoverTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldHoverTests.swift @@ -4,9 +4,9 @@ // import AppKit +@testable import CodeEditSourceEditor import CodeEditTextView import Testing -@testable import CodeEditSourceEditor /// The gutter's chevron and a collapsed fold's placeholder are two controls onto the same fold, so both report which /// fold the pointer is on into one place. Splitting that state was what let the chevron stay dim while the reader was @@ -20,8 +20,8 @@ struct LineFoldHoverTests { init() throws { controller = Mock.textViewController(theme: Mock.theme()) controller.textView.string = "A\nB\nC\nD\nE\nF\n" - controller.textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) - controller.textView.updatedViewport(NSRect(x: 0, y: 0, width: 1000, height: 1000)) + controller.textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) + controller.textView.updatedViewport(NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) ribbon = LineFoldRibbonView(controller: controller) ribbon.model?.foldCache = LineFoldStorage( documentLength: controller.textView.textStorage.length, diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldPlaceholderClickTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldPlaceholderClickTests.swift index 29a92540c5..316ee1dec3 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldPlaceholderClickTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldPlaceholderClickTests.swift @@ -4,9 +4,9 @@ // import AppKit +@testable import CodeEditSourceEditor import CodeEditTextView import Testing -@testable import CodeEditSourceEditor /// A placeholder stands in for code the reader asked to hide and now wants back, so one click brings it back rather /// than selecting it. Attachments that stand in for content of their own keep the selecting behaviour. diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldRibbonLookupTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldRibbonLookupTests.swift index a0dcbd1fd1..5a3534cb85 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldRibbonLookupTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldRibbonLookupTests.swift @@ -4,9 +4,9 @@ // import AppKit +@testable import CodeEditSourceEditor import CodeEditTextView import Testing -@testable import CodeEditSourceEditor /// The ribbon draws one chevron per line that opens a fold, and that chevron has to fold the largest block starting /// there. A statement and the parenthesised body inside it commonly begin on the same line, so without a rule the @@ -19,8 +19,8 @@ struct LineFoldRibbonLookupTests { init() { controller = Mock.textViewController(theme: Mock.theme()) controller.textView.string = "A\nB\nC\nD\nE\nF\n" - controller.textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) - controller.textView.updatedViewport(NSRect(x: 0, y: 0, width: 1000, height: 1000)) + controller.textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) + controller.textView.updatedViewport(NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) ribbon = LineFoldRibbonView(controller: controller) } @@ -74,7 +74,7 @@ struct LineFoldRibbonLookupTests { // past the last line. Resolving that to nothing lost every chevron at the bottom of a document. let range = try #require( ribbon.documentRange( - covering: NSRect(x: 0, y: 0, width: 14, height: 5000), + covering: NSRect(x: 0, y: 0, width: 14, height: 5_000), layoutManager: controller.textView.layoutManager ) ) diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldStorageTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldStorageTests.swift index 44467bde23..08e94d1523 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldStorageTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldStorageTests.swift @@ -5,13 +5,13 @@ // Created by Khan Winter on 5/29/25. // -import Testing @testable import CodeEditSourceEditor +import Testing struct LineFoldStorageTests { // Helper to create a collapsed provider set private func collapsedSet(_ items: (Int, Int)...) -> Set { - Set(items.map { (depth, start) in + Set(items.map { depth, start in LineFoldStorage.DepthStartPair(depth: depth, start: start) }) } diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldingModelTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldingModelTests.swift index 2787b40760..750b1faa98 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldingModelTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldingModelTests.swift @@ -5,10 +5,10 @@ // Created by Khan Winter on 5/8/25. // -import Testing import AppKit -import CodeEditTextView @testable import CodeEditSourceEditor +import CodeEditTextView +import Testing @MainActor struct LineFoldingModelTests { @@ -45,8 +45,8 @@ struct LineFoldingModelTests { controller = Mock.textViewController(theme: Mock.theme()) textView = controller.textView textView.string = "A\nB\nC\nD\nE\nF\n" - textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) - textView.updatedViewport(NSRect(x: 0, y: 0, width: 1000, height: 1000)) + textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) + textView.updatedViewport(NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) } /// A little unintuitive but we only expect two folds with this. Our provider goes 0-1-2-2-1-0, but we don't diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/RangeStoreTests.swift b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/RangeStoreTests.swift index 1603a6487d..5a250a5576 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/RangeStoreTests.swift +++ b/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/RangeStoreTests.swift @@ -1,9 +1,9 @@ -import Testing @testable import CodeEditSourceEditor +import Testing extension RangeStore { - var length: Int { _guts.summary.length } - var count: Int { _guts.count } + var length: Int { rope.summary.length } + var runCount: Int { rope.count } } @Suite @@ -13,7 +13,7 @@ struct RangeStoreTests { @Test func initWithLength() { for _ in 0..<100 { - let length = Int.random(in: 0..<1000) + let length = Int.random(in: 0..<1_000) let store = Store(documentLength: length) #expect(store.length == length) } @@ -26,7 +26,7 @@ struct RangeStoreTests { var store = Store(documentLength: 100) store.storageUpdated(replacedCharactersIn: 10..<12, withCount: 0) #expect(store.length == 98, "Failed to remove correct range") - #expect(store.count == 1, "Failed to coalesce") + #expect(store.runCount == 1, "Failed to coalesce") } @Test @@ -34,7 +34,7 @@ struct RangeStoreTests { var store = Store(documentLength: 100) store.storageUpdated(replacedCharactersIn: 95..<100, withCount: 0) #expect(store.length == 95, "Failed to remove correct range") - #expect(store.count == 1, "Failed to coalesce") + #expect(store.runCount == 1, "Failed to coalesce") } @Test @@ -50,7 +50,7 @@ struct RangeStoreTests { ) store.storageUpdated(replacedCharactersIn: 9..<10, withCount: 0) #expect(store.length == 9, "Failed to remove correct range") - #expect(store.count == 2) + #expect(store.runCount == 2) } @Test @@ -58,7 +58,7 @@ struct RangeStoreTests { var store = Store(documentLength: 100) store.storageUpdated(replacedCharactersIn: 0..<15, withCount: 0) #expect(store.length == 85, "Failed to remove correct range") - #expect(store.count == 1, "Failed to coalesce") + #expect(store.runCount == 1, "Failed to coalesce") } @Test @@ -66,7 +66,7 @@ struct RangeStoreTests { var store = Store(documentLength: 100) store.storageUpdated(replacedCharactersIn: 0..<100, withCount: 0) #expect(store.length == 0, "Failed to remove correct range") - #expect(store.count == 0, "Failed to remove all runs") + #expect(store.runCount == 0, "Failed to remove all runs") } @Test @@ -74,7 +74,7 @@ struct RangeStoreTests { var store = Store(documentLength: 100) store.storageUpdated(replacedCharactersIn: 45..<45, withCount: 10) #expect(store.length == 110) - #expect(store.count == 1, "Failed to coalesce") + #expect(store.runCount == 1, "Failed to coalesce") } @Test @@ -82,7 +82,7 @@ struct RangeStoreTests { var store = Store(documentLength: 100) store.storageUpdated(replacedCharactersIn: 100..<100, withCount: 10) #expect(store.length == 110) - #expect(store.count == 1, "Failed to coalesce") + #expect(store.runCount == 1, "Failed to coalesce") } @Test @@ -90,7 +90,7 @@ struct RangeStoreTests { var store = Store(documentLength: 100) store.storageUpdated(replacedCharactersIn: 0..<0, withCount: 10) #expect(store.length == 110) - #expect(store.count == 1, "Failed to coalesce") + #expect(store.runCount == 1, "Failed to coalesce") } @Test @@ -98,7 +98,7 @@ struct RangeStoreTests { var store = Store(documentLength: 0) store.storageUpdated(replacedCharactersIn: 0..<0, withCount: 10) #expect(store.length == 10) - #expect(store.count == 1, "Failed to coalesce") + #expect(store.runCount == 1, "Failed to coalesce") } @Test @@ -106,7 +106,7 @@ struct RangeStoreTests { var store = Store(documentLength: 100) store.storageUpdated(replacedCharactersIn: 45..<50, withCount: 10) #expect(store.length == 105) - #expect(store.count == 1, "Failed to coalesce") + #expect(store.runCount == 1, "Failed to coalesce") } @Test @@ -114,7 +114,7 @@ struct RangeStoreTests { var store = Store(documentLength: 100) store.storageUpdated(replacedCharactersIn: 95..<100, withCount: 10) #expect(store.length == 105) - #expect(store.count == 1, "Failed to coalesce") + #expect(store.runCount == 1, "Failed to coalesce") } @Test @@ -122,7 +122,7 @@ struct RangeStoreTests { var store = Store(documentLength: 100) store.storageUpdated(replacedCharactersIn: 0..<5, withCount: 10) #expect(store.length == 105) - #expect(store.count == 1, "Failed to coalesce") + #expect(store.runCount == 1, "Failed to coalesce") } @Test @@ -130,7 +130,7 @@ struct RangeStoreTests { var store = Store(documentLength: 100) store.storageUpdated(replacedCharactersIn: 0..<100, withCount: 10) #expect(store.length == 10) - #expect(store.count == 1, "Failed to coalesce") + #expect(store.runCount == 1, "Failed to coalesce") } // MARK: - Styles @@ -140,7 +140,7 @@ struct RangeStoreTests { var store = Store(documentLength: 100) store.set(value: .init(capture: .comment, modifiers: [.static]), for: 45..<50) #expect(store.length == 100) - #expect(store.count == 3) + #expect(store.runCount == 3) let runs = store.runs(in: 0..<100) #expect(runs.count == 3) @@ -162,7 +162,7 @@ struct RangeStoreTests { var store = Store(documentLength: 100) store.set(value: .init(capture: .comment, modifiers: [.static]), for: 45..<50) #expect(store.length == 100) - #expect(store.count == 3) + #expect(store.runCount == 3) let runs = store.runs(in: 47..<100) #expect(runs.count == 2) @@ -230,11 +230,11 @@ struct RangeStoreTests { "Run \($0.offset) has incorrect length: \($0.element.length). Expected \(lengths[$0.offset])" ) #expect( - $0.element.value?.capture == captures[$0.offset], // swiftlint:disable:next line_length + $0.element.value?.capture == captures[$0.offset], "Run \($0.offset) has incorrect capture: \(String(describing: $0.element.value?.capture)). Expected \(String(describing: captures[$0.offset]))" ) #expect( - $0.element.value?.modifiers == modifiers[$0.offset], // swiftlint:disable:next line_length + $0.element.value?.modifiers == modifiers[$0.offset], "Run \($0.offset) has incorrect modifiers: \(String(describing: $0.element.value?.modifiers)). Expected \(modifiers[$0.offset])" ) } @@ -288,7 +288,7 @@ struct RangeStoreTests { return start.. Bool { - return self.x.approxEqual(other.x, tolerance: tolerance) + self.x.approxEqual(other.x, tolerance: tolerance) && self.y.approxEqual(other.y, tolerance: tolerance) } } extension CGRect { func approxEqual(_ other: CGRect, tolerance: CGFloat = 0.5) -> Bool { - return self.origin.approxEqual(other.origin, tolerance: tolerance) + self.origin.approxEqual(other.origin, tolerance: tolerance) && self.width.approxEqual(other.width, tolerance: tolerance) && self.height.approxEqual(other.height, tolerance: tolerance) } diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+CGPathFallback.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+CGPathFallback.swift index a174185d62..7ae6f619ea 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+CGPathFallback.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+CGPathFallback.swift @@ -7,9 +7,9 @@ import AppKit -extension NSBezierPath { +public extension NSBezierPath { /// Converts the `NSBezierPath` instance into a `CGPath`, providing a fallback method for compatibility(macOS < 14). - public var cgPathFallback: CGPath { + var cgPathFallback: CGPath { let path = CGMutablePath() var points = [CGPoint](repeating: .zero, count: 3) diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+SmoothPath.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+SmoothPath.swift index dffb55978e..4ed737640f 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+SmoothPath.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+SmoothPath.swift @@ -22,10 +22,9 @@ extension NSBezierPath { } private func pointIsValid(_ point: CGPoint) -> Bool { - return !point.x.isNaN && !point.y.isNaN + !point.x.isNaN && !point.y.isNaN } - // swiftlint:disable:next function_body_length static func smoothPath(_ points: [NSPoint], radius cornerRadius: CGFloat) -> NSBezierPath? { // Normalizing radius to compensate for the quadraticCurve let radius = cornerRadius * 1.15 @@ -116,7 +115,6 @@ extension NSBezierPath { path.line(to: finalCornerStart) path.quadCurve(to: initialCornerEnd, controlPoint: firstPoint) path.close() - } else if let lastPoint = points.last { // For open paths, just connect to the last point path.line(to: lastPoint) } diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/InvisibleCharacters/InvisibleCharactersDelegate.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/InvisibleCharacters/InvisibleCharactersDelegate.swift index 9b7fa9d75f..c011de3ce5 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/InvisibleCharacters/InvisibleCharactersDelegate.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/InvisibleCharacters/InvisibleCharactersDelegate.swift @@ -5,8 +5,8 @@ // Created by Khan Winter on 6/9/25. // -import Foundation import AppKit +import Foundation public enum InvisibleCharacterStyle: Hashable { case replace(replacementCharacter: String, color: NSColor, font: NSFont) diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Public.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Public.swift index 7b27bcf010..6fb89124eb 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Public.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Public.swift @@ -170,7 +170,7 @@ extension TextLayoutManager { case .text(let ctLine): let fragmentIndex = CTLineGetStringIndexForPosition( ctLine, - CGPoint(x: xPos - edgeInsets.left - contentPosition.xPos, y: fragment.height/2) + CGPoint(x: xPos - edgeInsets.left - contentPosition.xPos, y: fragment.height / 2) ) return fragmentIndex + contentPosition.offset + linePosition.range.location case .attachment: @@ -232,7 +232,7 @@ extension TextLayoutManager { /// - line: The line to calculate rects for. /// - Returns: Multiple bounding rects. Will return one rect for each line fragment that overlaps the given range. public func rectsFor(range: NSRange) -> [CGRect] { - return linesInRange(range).flatMap { self.rectsFor(range: range, in: $0) } + linesInRange(range).flatMap { self.rectsFor(range: range, in: $0) } } /// Calculates all text bounding rects that intersect with a given range, with a given line position. @@ -358,7 +358,7 @@ extension TextLayoutManager { /// - offset: The offset, relative to the start of the *line*. /// - Returns: The x position of the character in the drawn line, from the left. public func characterXPosition(in lineFragment: LineFragment, for offset: Int) -> CGFloat { - renderDelegate?.characterXPosition(in: lineFragment, for: offset) ?? lineFragment._xPos(for: offset) + renderDelegate?.characterXPosition(in: lineFragment, for: offset) ?? lineFragment.xPosition(for: offset) } public func characterRect(in lineFragment: LineFragment, for range: NSRange) -> CGRect { diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager.swift index 293b499794..07a506b96d 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager.swift @@ -5,8 +5,8 @@ // Created by Khan Winter on 6/21/23. // -import Foundation import AppKit +import Foundation /// The text layout manager manages laying out lines in a code document. public class TextLayoutManager: NSObject { @@ -66,13 +66,13 @@ public class TextLayoutManager: NSObject { public weak var renderDelegate: TextLayoutManagerRenderDelegate? { didSet { // Rebuild using potentially overridden behavior. - _estimateLineHeight = nil + cachedLineHeightEstimate = nil lineStorage.removeAll() prepareTextLines() } } - public let attachments: TextAttachmentManager = TextAttachmentManager() + public let attachments = TextAttachmentManager() /// When `false`, this layout manager ignores text storage edits. Used to suspend a secondary layout manager that /// is not currently visible (such as a hidden minimap) so it does not rebuild its line storage on every edit. @@ -89,7 +89,7 @@ public class TextLayoutManager: NSObject { weak var textStorage: NSTextStorage? public var lineStorage: TextLineStorage = TextLineStorage() - var markedTextManager: MarkedTextManager = MarkedTextManager() + var markedTextManager = MarkedTextManager() let viewReuseQueue: ViewReuseQueue = ViewReuseQueue() let lineFragmentRenderer: LineFragmentRenderer @@ -110,7 +110,7 @@ public class TextLayoutManager: NSObject { /// Guard variable for an assertion check in debug builds. /// Ensures that layout calls are not overlapping, potentially causing layout issues. - var layoutLock: NSLock = NSLock() + var layoutLock = NSLock() weak var layoutView: NSView? @@ -174,7 +174,7 @@ public class TextLayoutManager: NSObject { /// Prepares the layout manager for use. /// Parses the text storage object into lines and builds the `lineStorage` object from those lines. func prepareTextLines() { - guard lineStorage.count == 0, let textStorage else { return } + guard lineStorage.isEmpty, let textStorage else { return } #if DEBUG // Grab some performance information if debugging. var info = mach_timebase_info() @@ -218,10 +218,10 @@ public class TextLayoutManager: NSObject { /// Takes into account ``TextLayoutManager/lineHeightMultiplier``. /// - Returns: The estimated line height. public func estimateLineHeight() -> CGFloat { - if let _estimateLineHeight { - return _estimateLineHeight + if let cachedLineHeightEstimate { + return cachedLineHeightEstimate } else if let estimate = renderDelegate?.estimatedLineHeight() { - _estimateLineHeight = estimate + cachedLineHeightEstimate = estimate return estimate } else { let string = NSAttributedString(string: "0", attributes: delegate?.layoutManagerTypingAttributes() ?? [:]) @@ -232,14 +232,14 @@ public class TextLayoutManager: NSObject { var leading: CGFloat = 0 CTLineGetTypographicBounds(ctLine, &ascent, &descent, &leading) let height = (ascent + descent + leading) * lineHeightMultiplier - _estimateLineHeight = height + cachedLineHeightEstimate = height return height } } /// The last known line height estimate. If set to `nil`, will be recalculated the next time /// ``TextLayoutManager/estimateLineHeight()`` is called. - private var _estimateLineHeight: CGFloat? + private var cachedLineHeightEstimate: CGFloat? deinit { lineStorage.removeAll() diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManagerRenderDelegate.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManagerRenderDelegate.swift index 34e930b75e..7b2cb80b25 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManagerRenderDelegate.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManagerRenderDelegate.swift @@ -12,7 +12,7 @@ import AppKit /// /// All methods on this protocol are optional, and default to the default behavior. public protocol TextLayoutManagerRenderDelegate: AnyObject { - func prepareForDisplay( // swiftlint:disable:this function_parameter_count + func prepareForDisplay( textLine: TextLine, displayData: TextLine.DisplayData, range: NSRange, @@ -29,7 +29,7 @@ public protocol TextLayoutManagerRenderDelegate: AnyObject { } public extension TextLayoutManagerRenderDelegate { - func prepareForDisplay( // swiftlint:disable:this function_parameter_count + func prepareForDisplay( textLine: TextLine, displayData: TextLine.DisplayData, range: NSRange, @@ -55,6 +55,6 @@ public extension TextLayoutManagerRenderDelegate { } func characterXPosition(in lineFragment: LineFragment, for offset: Int) -> CGFloat { - lineFragment._xPos(for: offset) + lineFragment.xPosition(for: offset) } } diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragment.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragment.swift index 7a33c654cf..2f924a2b0c 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragment.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragment.swift @@ -150,12 +150,12 @@ public final class LineFragment: Identifiable, Equatable { /// Finds the x position of the offset in the string the fragment represents. /// - /// Underscored, because although this needs to be accessible outside this class, the relevant layout manager method - /// should be used. + /// Callers outside this class should prefer ``TextLayoutManager/characterXPosition(in:for:)``, which gives the + /// render delegate a chance to override the position. /// /// - Parameter offset: The offset, relative to the start of the *line*. /// - Returns: The x position of the character in the drawn line, from the left. - func _xPos(for offset: Int) -> CGFloat { + func xPosition(for offset: Int) -> CGFloat { guard let (content, position) = findContent(at: offset) else { return width } diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragmentView.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragmentView.swift index 66af42872c..15026d1c8a 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragmentView.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragmentView.swift @@ -15,21 +15,21 @@ open class LineFragmentView: NSView { private var backgroundAnimation: CABasicAnimation? #endif - open override var isFlipped: Bool { + override open var isFlipped: Bool { true } - open override var isOpaque: Bool { + override open var isOpaque: Bool { false } - open override func hitTest(_ point: NSPoint) -> NSView? { nil } + override open func hitTest(_ point: NSPoint) -> NSView? { nil } - public override init(frame frameRect: NSRect) { + override public init(frame frameRect: NSRect) { super.init(frame: frameRect) } - required public init?(coder: NSCoder) { + public required init?(coder: NSCoder) { super.init(coder: coder) } @@ -62,7 +62,7 @@ open class LineFragmentView: NSView { } #endif - open override func prepareForReuse() { + override open func prepareForReuse() { super.prepareForReuse() lineFragment = nil @@ -80,7 +80,7 @@ open class LineFragmentView: NSView { } /// Draws the line fragment in the graphics context. - open override func draw(_ dirtyRect: NSRect) { + override open func draw(_ dirtyRect: NSRect) { guard let lineFragment, let context = NSGraphicsContext.current?.cgContext else { return } diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/TextLine.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/TextLine.swift index 68edf6a24b..9bffbdbfff 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/TextLine.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/TextLine.swift @@ -5,15 +5,15 @@ // Created by Khan Winter on 6/21/23. // -import Foundation import AppKit +import Foundation /// Represents a displayable line of text. public final class TextLine: Identifiable, Equatable { - public let id: UUID = UUID() + public let id = UUID() private var needsLayout: Bool = true var maxWidth: CGFloat? - private(set) var typesetter: Typesetter = Typesetter() + private(set) var typesetter = Typesetter() /// The line fragments contained by this text line. public var lineFragments: TextLineStorage { diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/Typesetter/Typesetter.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/Typesetter/Typesetter.swift index 5240178b23..bed4d93452 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/Typesetter/Typesetter.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/Typesetter/Typesetter.swift @@ -15,7 +15,7 @@ import CoreText /// performs the typesetting algorithm and breaks content into runs using attachments. /// /// To retrieve the line fragments generated by this class, access the ``lineFragments`` property. -final public class Typesetter { +public final class Typesetter { struct ContentRun { let range: NSRange let type: RunType diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage.swift index 6336dbd098..3ba5e1a904 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage.swift @@ -7,10 +7,6 @@ import Foundation -// Disabling the file length here due to the fact that we want to keep certain methods private even to this package. -// Specifically, all rotation methods, fixup methods, and internal search methods must be kept private. -// swiftlint:disable file_length - // There is some ugly `Unmanaged` code in this class. This is due to the fact that Swift often has a hard time // optimizing retain/release calls for object trees. For instance, the `metaFixup` method has a lot of retain/release // calls to each node/parent as we do a little walk up the tree. @@ -33,11 +29,11 @@ public final class TextLineStorage { var root: Node? /// The number of characters in the storage object. - private(set) public var length: Int = 0 + public private(set) var length: Int = 0 /// The number of lines in the storage object - private(set) public var count: Int = 0 + public private(set) var count: Int = 0 - public var isEmpty: Bool { count == 0 } + public var isEmpty: Bool { count == 0 } // swiftlint:disable:this empty_count public var height: CGFloat = 0 @@ -47,17 +43,17 @@ public final class TextLineStorage { } public var first: TextLinePosition? { - guard count > 0, let position = search(forIndex: 0) else { return nil } + guard !isEmpty, let position = search(forIndex: 0) else { return nil } return TextLinePosition(position: position) } public var last: TextLinePosition? { - guard count > 0, let position = search(forIndex: count - 1) else { return nil } + guard !isEmpty, let position = search(forIndex: count - 1) else { return nil } return TextLinePosition(position: position) } private var lastNode: NodePosition? { - guard count > 0, let position = search(forIndex: count - 1) else { return nil } + guard !isEmpty, let position = search(forIndex: count - 1) else { return nil } return position } @@ -88,30 +84,30 @@ public final class TextLineStorage { } let insertedNode = Node(length: length, data: line, height: height) - guard root != nil else { + guard let rootNode = root else { root = insertedNode return } insertedNode.color = .red - var currentNode: Unmanaged> = Unmanaged>.passUnretained(root!) + var currentNode = Unmanaged>.passUnretained(rootNode) var shouldContinue = true - var currentOffset: Int = root?.leftSubtreeOffset ?? 0 + var currentOffset: Int = rootNode.leftSubtreeOffset while shouldContinue { let node = currentNode.takeUnretainedValue() if currentOffset >= index { - if node.left != nil { - currentNode = Unmanaged>.passUnretained(node.left!) - currentOffset = (currentOffset - node.leftSubtreeOffset) + (node.left?.leftSubtreeOffset ?? 0) + if let leftChild = node.left { + currentNode = Unmanaged>.passUnretained(leftChild) + currentOffset = (currentOffset - node.leftSubtreeOffset) + leftChild.leftSubtreeOffset } else { node.left = insertedNode insertedNode.parent = node shouldContinue = false } } else { - if node.right != nil { - currentNode = Unmanaged>.passUnretained(node.right!) - currentOffset += node.length + (node.right?.leftSubtreeOffset ?? 0) + if let rightChild = node.right { + currentNode = Unmanaged>.passUnretained(rightChild) + currentOffset += node.length + rightChild.leftSubtreeOffset } else { node.right = insertedNode insertedNode.parent = node @@ -316,9 +312,9 @@ public final class TextLineStorage { left: Int, right: Int, parent: Node? - ) -> (Node?, Int?, CGFloat?, Int) { // swiftlint:disable:this large_tuple + ) -> (Node?, Int?, CGFloat?, Int) { guard left < right else { return (nil, nil, nil, 0) } - let mid = left + (right - left)/2 + let mid = left + (right - left) / 2 let node = Node( length: lines[mid].length, data: lines[mid].data, @@ -437,12 +433,8 @@ private extension TextLineStorage { // The lowest node whose children change. Every width aggregate from there to the root has to be recomputed. let lowestChangedNode: Node? - if nodeZ.left == nil || nodeZ.right == nil { - lowestChangedNode = nodeZ.parent - nodeX = nodeZ.right ?? nodeZ.left - transplant(nodeZ, with: nodeX) - } else { - nodeY = nodeZ.right!.minimum() + if nodeZ.left != nil, let nodeZRight = nodeZ.right { + nodeY = nodeZRight.minimum() lowestChangedNode = nodeY.parent === nodeZ ? nodeY : nodeY.parent // Delete nodeY from it's original place in the tree. @@ -472,6 +464,10 @@ private extension TextLineStorage { // We've inserted nodeY again into a new spot. Update tree meta metaFixup(startingAt: nodeY, delta: nodeY.length, deltaHeight: nodeY.height, nodeAction: .inserted) + } else { + lowestChangedNode = nodeZ.parent + nodeX = nodeZ.right ?? nodeZ.left + transplant(nodeZ, with: nodeX) } updateSubtreeWidths(upFrom: lowestChangedNode) @@ -601,8 +597,8 @@ private extension TextLineStorage { deltaHeight: CGFloat, nodeAction: MetaFixupAction = .none ) { - guard node.parent != nil, root != nil else { return } - let rootRef = Unmanaged>.passUnretained(root!) + guard node.parent != nil, let rootNode = root else { return } + let rootRef = Unmanaged>.passUnretained(rootNode) var ref = Unmanaged>.passUnretained(node) while let node = ref._withUnsafeGuaranteedRef({ $0.parent }), ref.takeUnretainedValue() !== rootRef.takeUnretainedValue() { @@ -696,5 +692,3 @@ private extension TextLineStorage { ) + getSubtreeMeta(startingAt: node.right) } } - -// swiftlint:enable file_length diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/SelectionManipulation/SelectionManipulation+Vertical.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/SelectionManipulation/SelectionManipulation+Vertical.swift index e9868948a2..9ae4b10e8a 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/SelectionManipulation/SelectionManipulation+Vertical.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/SelectionManipulation/SelectionManipulation+Vertical.swift @@ -67,7 +67,7 @@ package extension TextSelectionManager { let newOffset = layoutManager?.textOffsetAtPoint( CGPoint( x: suggestedXPos ?? point.x, - y: point.y - (layoutManager?.estimateLineHeight() ?? 2.0)/2 * (up ? 1 : -3) + y: point.y - (layoutManager?.estimateLineHeight() ?? 2.0) / 2 * (up ? 1 : -3) ) ) else { return NSRange(location: offset, length: 0) diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelection.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelection.swift index c8c28d6792..6609df0eca 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelection.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelection.swift @@ -5,8 +5,8 @@ // Created by Khan Winter on 8/20/24. // -import Foundation import AppKit +import Foundation public extension TextSelectionManager { class TextSelection: Hashable, Equatable { diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Draw.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Draw.swift index 4bc5b49c42..1b3e55855b 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Draw.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Draw.swift @@ -87,5 +87,4 @@ extension TextSelectionManager { context.fill(getFillRects(in: rect, for: textSelection)) context.restoreGState() } - } diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Update.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Update.swift index 0c7957b590..91ebb706fd 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Update.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Update.swift @@ -7,8 +7,8 @@ import Foundation -extension TextSelectionManager { - public func didReplaceCharacters(in range: NSRange, replacementLength: Int) { +public extension TextSelectionManager { + func didReplaceCharacters(in range: NSRange, replacementLength: Int) { // Net shift = chars added - chars removed. Selections past `range.max` move by this delta. // The previous formula short-circuited to `replacementLength` when non-zero, which dropped // the chars-removed term and over-shifted selections after a same-length replace (e.g. the @@ -47,7 +47,7 @@ extension TextSelectionManager { } } - public func notifyAfterEdit(force: Bool = false) { + func notifyAfterEdit(force: Bool = false) { updateSelectionViews(force: force) notifySelectionChanged() } diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager.swift index 91f96e3bff..b59588361e 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager.swift @@ -21,17 +21,16 @@ public protocol TextSelectionManagerDelegate: AnyObject { public class TextSelectionManager: NSObject { // MARK: - Properties - // swiftlint:disable:next line_length - public static let selectionChangedNotification: Notification.Name = Notification.Name("com.CodeEdit.TextSelectionManager.TextSelectionChangedNotification") + public static let selectionChangedNotification = Notification.Name("com.CodeEdit.TextSelectionManager.TextSelectionChangedNotification") - public var insertionPointColor: NSColor = NSColor.labelColor { + public var insertionPointColor = NSColor.labelColor { didSet { textSelections.compactMap({ $0.view as? CursorView }).forEach { $0.color = insertionPointColor } } } public var highlightSelectedLine: Bool = true - public var selectedLineBackgroundColor: NSColor = NSColor.selectedTextBackgroundColor.withSystemEffect(.disabled) - public var selectionBackgroundColor: NSColor = NSColor.selectedTextBackgroundColor + public var selectedLineBackgroundColor = NSColor.selectedTextBackgroundColor.withSystemEffect(.disabled) + public var selectionBackgroundColor = NSColor.selectedTextBackgroundColor public var useSystemCursor: Bool = false { didSet { updateSelectionViews() @@ -45,7 +44,7 @@ public class TextSelectionManager: NSObject { } } - internal(set) public var textSelections: [TextSelection] = [] + public internal(set) var textSelections: [TextSelection] = [] weak var layoutManager: TextLayoutManager? weak var textStorage: NSTextStorage? weak var textView: TextView? diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Accessibility.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Accessibility.swift index 717e4f19c6..877a3b1518 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Accessibility.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Accessibility.swift @@ -84,8 +84,7 @@ extension TextView { override open func accessibilitySelectedTextRange() -> NSRange { guard let selection = selectionManager .textSelections - .sorted(by: { $0.range.lowerBound < $1.range.lowerBound }) - .first else { + .min(by: { $0.range.lowerBound < $1.range.lowerBound }) else { return .notFound } if selection.range.isEmpty { diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ColumnSelection.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ColumnSelection.swift index ad2e631029..baccf379a1 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ColumnSelection.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ColumnSelection.swift @@ -7,21 +7,21 @@ import AppKit -extension TextView { +public extension TextView { /// Set the user's selection to a square region in the editor. /// /// This method will automatically determine a valid region from the provided two points. /// - Parameters: /// - pointA: The first point. /// - pointB: The second point. - public func selectColumns(betweenPointA pointA: CGPoint, pointB: CGPoint) { + func selectColumns(betweenPointA pointA: CGPoint, pointB: CGPoint) { let start = CGPoint(x: min(pointA.x, pointB.x), y: min(pointA.y, pointB.y)) let end = CGPoint(x: max(pointA.x, pointB.x), y: max(pointA.y, pointB.y)) // Collect all overlapping text ranges var selectedRanges: [NSRange] = layoutManager.linesStartingAt(start.y, until: end.y).flatMap { textLine in // Collect fragment ranges - return textLine.data.lineFragments.compactMap { lineFragment -> NSRange? in + textLine.data.lineFragments.compactMap { lineFragment -> NSRange? in let startOffset = self.layoutManager.textOffsetAtPoint( start, fragmentPosition: lineFragment, diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Delete.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Delete.swift index 11ae2c0bd8..4093df0a68 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Delete.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Delete.swift @@ -8,39 +8,39 @@ import AppKit extension TextView { - open override func deleteBackward(_ sender: Any?) { + override open func deleteBackward(_ sender: Any?) { delete(direction: .backward, destination: .character) } - open override func deleteBackwardByDecomposingPreviousCharacter(_ sender: Any?) { + override open func deleteBackwardByDecomposingPreviousCharacter(_ sender: Any?) { delete(direction: .backward, destination: .character, decomposeCharacters: true) } - open override func deleteForward(_ sender: Any?) { + override open func deleteForward(_ sender: Any?) { delete(direction: .forward, destination: .character) } - open override func deleteWordBackward(_ sender: Any?) { + override open func deleteWordBackward(_ sender: Any?) { delete(direction: .backward, destination: .word) } - open override func deleteWordForward(_ sender: Any?) { + override open func deleteWordForward(_ sender: Any?) { delete(direction: .forward, destination: .word) } - open override func deleteToBeginningOfLine(_ sender: Any?) { + override open func deleteToBeginningOfLine(_ sender: Any?) { delete(direction: .backward, destination: .line) } - open override func deleteToEndOfLine(_ sender: Any?) { + override open func deleteToEndOfLine(_ sender: Any?) { delete(direction: .forward, destination: .line) } - open override func deleteToBeginningOfParagraph(_ sender: Any?) { + override open func deleteToBeginningOfParagraph(_ sender: Any?) { delete(direction: .backward, destination: .line) } - open override func deleteToEndOfParagraph(_ sender: Any?) { + override open func deleteToEndOfParagraph(_ sender: Any?) { delete(direction: .forward, destination: .line) } diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+FirstResponder.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+FirstResponder.swift index 01f62eeed5..fbb33fc61d 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+FirstResponder.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+FirstResponder.swift @@ -8,7 +8,7 @@ import AppKit extension TextView { - open override func becomeFirstResponder() -> Bool { + override open func becomeFirstResponder() -> Bool { isFirstResponder = true selectionManager.cursorTimer.resetTimer() selectionManager.updateSelectionViews(force: true) @@ -16,14 +16,14 @@ extension TextView { return super.becomeFirstResponder() } - open override func resignFirstResponder() -> Bool { + override open func resignFirstResponder() -> Bool { isFirstResponder = false selectionManager.removeCursors() needsDisplay = true return super.resignFirstResponder() } - open override var canBecomeKeyView: Bool { + override open var canBecomeKeyView: Bool { super.canBecomeKeyView && acceptsFirstResponder && !isHiddenOrHasHiddenAncestor } @@ -37,19 +37,19 @@ extension TextView { _ = resignFirstResponder() } - open override var needsPanelToBecomeKey: Bool { + override open var needsPanelToBecomeKey: Bool { isSelectable || isEditable } - open override var acceptsFirstResponder: Bool { + override open var acceptsFirstResponder: Bool { isSelectable } - open override func acceptsFirstMouse(for event: NSEvent?) -> Bool { - return true + override open func acceptsFirstMouse(for event: NSEvent?) -> Bool { + true } - open override func resetCursorRects() { + override open func resetCursorRects() { super.resetCursorRects() if isSelectable { addCursorRect( diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Insert.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Insert.swift index 05bd092a75..6415b66e3a 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Insert.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Insert.swift @@ -46,7 +46,7 @@ extension TextView { private func insertMultipleString(_ strings: [String]) { let selectedRanges = selectionManager.textSelections.map(\.range) - guard selectedRanges.count > 0 else { return } + guard !selectedRanges.isEmpty else { return } for idx in (0.. NSRange { - return selectionManager?.textSelections.first?.range ?? NSRange(location: NSNotFound, length: 0) + selectionManager?.textSelections.first?.range ?? NSRange(location: NSNotFound, length: 0) } /// Returns the range of the marked text. @@ -214,7 +214,7 @@ extension TextView: NSTextInputClient { /// /// - Returns: The range of marked text or {NSNotFound, 0} if there is no marked range. @objc public func markedRange() -> NSRange { - return layoutManager?.markedTextManager.markedRanges.first ?? NSRange(location: NSNotFound, length: 0) + layoutManager?.markedTextManager.markedRanges.first ?? NSRange(location: NSNotFound, length: 0) } /// Returns a Boolean value indicating whether the receiver has marked text. @@ -224,7 +224,7 @@ extension TextView: NSTextInputClient { /// /// - Returns: true if the receiver has marked text; otherwise false. @objc public func hasMarkedText() -> Bool { - return layoutManager.markedTextManager.hasMarkedText + layoutManager.markedTextManager.hasMarkedText } /// Returns an array of attribute names recognized by the receiver. @@ -367,7 +367,7 @@ extension TextView: NSTextInputClient { @objc public func fractionOfDistanceThroughGlyph(for point: NSPoint) -> CGFloat { guard let offset = layoutManager.textOffsetAtPoint(point), let characterRect = layoutManager.rectForOffset(offset) else { return 0 } - return (point.x - characterRect.minX)/characterRect.width + return (point.x - characterRect.minX) / characterRect.width } /// Returns the baseline position of a given character relative to the origin of rectangle returned by diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ReplaceCharacters.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ReplaceCharacters.swift index 0d6b455410..8bd8e6ef9f 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ReplaceCharacters.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ReplaceCharacters.swift @@ -8,13 +8,13 @@ import AppKit import TextStory -extension TextView { +public extension TextView { /// Replace the characters in the given ranges with the given string. /// - Parameters: /// - ranges: The ranges to replace /// - string: The string to insert in the ranges. /// - skipUpdateSelection: Skips the selection update step - public func replaceCharacters( + func replaceCharacters( in ranges: [NSRange], with string: String, skipUpdateSelection: Bool = false @@ -32,7 +32,7 @@ extension TextView { for range in ranges.sorted(by: { $0.location > $1.location }) where valid(range: range, string: string) { delegate?.textView(self, willReplaceContentsIn: range, with: string) - _undoManager?.registerMutation( + editorUndoManager?.registerMutation( TextMutation(string: string as String, range: range, limit: textStorage.length) ) textStorage.replaceCharacters( @@ -70,7 +70,7 @@ extension TextView { /// - range: The range to replace. /// - string: The string to insert in the range. /// - skipUpdateSelection: Skips the selection update step - public func replaceCharacters( + func replaceCharacters( in range: NSRange, with string: String, skipUpdateSelection: Bool = false @@ -92,7 +92,7 @@ extension TextView { /// - Note: The selections are iterated in reverse order, so modifications to earlier selections won't affect later /// ones. The method automatically calls `notifyAfterEdit()` on the `selectionManager` after all /// selections are processed. - public func editSelections(callback: (TextView, TextSelectionManager.TextSelection) -> Void) { + func editSelections(callback: (TextView, TextSelectionManager.TextSelection) -> Void) { for textSelection in selectionManager.textSelections.reversed() { callback(self, textSelection) } diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ScrollToVisible.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ScrollToVisible.swift index 3c497b16fd..0de00b9fb4 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ScrollToVisible.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ScrollToVisible.swift @@ -5,8 +5,8 @@ // Created by Khan Winter on 6/15/24. // -import Foundation import AppKit +import Foundation extension TextView { fileprivate typealias Direction = TextSelectionManager.Direction @@ -86,12 +86,11 @@ extension TextView { } /// Get the selection that should be scrolled to visible for the current text selection. - /// - Returns: The the selection to scroll to. + /// - Returns: The lowest selection on screen, which is the one with the greatest upper bound. private func getSelection() -> TextSelection? { selectionManager .textSelections - .sorted(by: { $0.range.max > $1.range.max }) // Get the lowest one. - .first + .max(by: { $0.range.max < $1.range.max }) } /// Returns the offset that isn't the pivot of the selection. diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+SetText.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+SetText.swift index 4f3f146ccd..a0d918b839 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+SetText.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+SetText.swift @@ -7,17 +7,17 @@ import AppKit -extension TextView { +public extension TextView { /// Sets the text view's text to a new value. /// - Parameter text: The new contents of the text view. - public func setText(_ text: String) { + func setText(_ text: String) { let newStorage = NSTextStorage(string: text) self.setTextStorage(newStorage) } /// Set a new text storage object for the view. /// - Parameter textStorage: The new text storage to use. - public func setTextStorage(_ textStorage: NSTextStorage) { + func setTextStorage(_ textStorage: NSTextStorage) { self.textStorage = textStorage if let storageDelegate = textStorage.delegate as? MultiStorageDelegate { @@ -43,7 +43,7 @@ extension TextView { ) ) - _undoManager?.clearStack() + editorUndoManager?.clearStack() textStorage.delegate = storageDelegate needsDisplay = true diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+StorageDelegate.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+StorageDelegate.swift index f35ebf1d95..36f3734e39 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+StorageDelegate.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+StorageDelegate.swift @@ -7,12 +7,12 @@ import AppKit -extension TextView { - public func addStorageDelegate(_ delegate: NSTextStorageDelegate) { +public extension TextView { + func addStorageDelegate(_ delegate: NSTextStorageDelegate) { storageDelegate.addDelegate(delegate) } - public func removeStorageDelegate(_ delegate: NSTextStorageDelegate) { + func removeStorageDelegate(_ delegate: NSTextStorageDelegate) { storageDelegate.removeDelegate(delegate) } } diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+UndoRedo.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+UndoRedo.swift index 14d803fbad..cd2ee0cc49 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+UndoRedo.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+UndoRedo.swift @@ -9,12 +9,12 @@ import AppKit extension TextView { public func setUndoManager(_ newManager: CEUndoManager) { - self._undoManager = newManager - self._undoManager?.setTextView(self) + self.editorUndoManager = newManager + self.editorUndoManager?.setTextView(self) } override public var undoManager: UndoManager? { - _undoManager + editorUndoManager } @objc func undo(_ sender: AnyObject?) { @@ -28,5 +28,4 @@ extension TextView { undoManager?.redo() } } - } diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView.swift index bfcb578df6..4d357bbbe9 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView.swift @@ -44,10 +44,8 @@ open class TextView: NSView, NSTextContent { [.font: NSFont.systemFont(ofSize: 12), .foregroundColor: NSColor.textColor, .kern: 0.0] } - // swiftlint:disable:next line_length public static let textDidChangeNotification: Notification.Name = .init(rawValue: "com.CodeEdit.TextView.TextDidChangeNotification") - // swiftlint:disable:next line_length public static let textWillChangeNotification: Notification.Name = .init(rawValue: "com.CodeEdit.TextView.TextWillChangeNotification") // MARK: - Configuration @@ -289,9 +287,9 @@ open class TextView: NSView, NSTextContent { (" " as NSString).size(withAttributes: [.font: font]).width } - internal(set) public var _undoManager: CEUndoManager? + public internal(set) var editorUndoManager: CEUndoManager? - @objc dynamic open var allowsUndo: Bool + @objc open dynamic var allowsUndo: Bool var scrollView: NSScrollView? { guard let enclosingScrollView, enclosingScrollView.documentView == self else { return nil } @@ -364,13 +362,13 @@ open class TextView: NSView, NSTextContent { layoutManager.attachments.setUpSelectionListener(for: selectionManager) - _undoManager = CEUndoManager(textView: self) + editorUndoManager = CEUndoManager(textView: self) layoutManager.layoutLines() setUpDragGesture() } - required public init?(coder: NSCoder) { + public required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/CEUndoManager.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/CEUndoManager.swift index 2af68d9e0f..845df676a2 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/CEUndoManager.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/CEUndoManager.swift @@ -45,7 +45,7 @@ public class CEUndoManager: UndoManager { private var redoStack: [UndoGroup] = [] private weak var textView: TextView? - private(set) public var isGrouping: Bool = false + public private(set) var isGrouping: Bool = false /// After ``endUndoGrouping`` is called, we'd expect the next mutation to be exclusive no matter what. This /// flag facilitates that, and is set by ``endUndoGrouping`` @@ -156,7 +156,7 @@ public class CEUndoManager: UndoManager { // MARK: - Mutations - public override func registerUndo(withTarget target: Any, selector: Selector, object anObject: Any?) { + override public func registerUndo(withTarget target: Any, selector: Selector, object anObject: Any?) { // no-op, but just in case to save resources: removeAllActions() } @@ -238,8 +238,8 @@ public class CEUndoManager: UndoManager { // Only attempt this check if the mutations are small enough. // If the last mutation was not whitespace, and the new one is, break the group. - if lastMutation.mutation.string.count < 1024 - && mutation.mutation.string.count < 1024 + if lastMutation.mutation.string.count < 1_024 + && mutation.mutation.string.count < 1_024 && !lastMutation.mutation.string.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty && mutation.mutation.string.trimmingCharacters(in: .whitespaces).isEmpty { return false diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/KillRing.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/KillRing.swift index cd13bb066f..889e982da0 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/KillRing.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/KillRing.swift @@ -7,17 +7,13 @@ import Foundation -// swiftlint:disable line_length - /// A global kill ring similar to emacs. With support for killing and yanking multiple cursors. /// /// Documentation sources: /// - [Emacs kill ring](https://www.gnu.org/software/emacs/manual/html_node/emacs/Yanking.html) /// - [Cocoa Docs](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/EventOverview/TextDefaultsBindings/TextDefaultsBindings.html) class KillRing { - static let shared: KillRing = KillRing() - - // swiftlint:enable line_length + static let shared = KillRing() private static let bufferSizeKey = "NSTextKillRingSize" @@ -27,6 +23,7 @@ class KillRing { init(_ size: Int? = nil) { buffer = Array( repeating: [""], + // swiftlint:disable:next storage_environment_defaults count: size ?? max(1, UserDefaults.standard.integer(forKey: Self.bufferSizeKey)) ) } @@ -39,7 +36,7 @@ class KillRing { /// Yanks the current item in the ring. func yank() -> [String] { - return buffer[index] + buffer[index] } /// Yanks an item from the ring, and selects the next one in the ring. diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/LineEnding.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/LineEnding.swift index 99f1b20900..f0957d491b 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/LineEnding.swift +++ b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/LineEnding.swift @@ -41,9 +41,10 @@ public enum LineEnding: String, CaseIterable { let lineEnding = LineEnding(line: lineString) else { continue } - histogram[lineEnding] = histogram[lineEnding]! + 1 + let occurrences = (histogram[lineEnding] ?? 0) + 1 + histogram[lineEnding] = occurrences // after finding 15 lines of a line ending we assume it's correct. - if histogram[lineEnding]! >= 15 { + if occurrences >= 15 { shouldContinue = false } } diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/AccessibilityTests.swift b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/AccessibilityTests.swift index d7b674d06b..a5d449a362 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/AccessibilityTests.swift +++ b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/AccessibilityTests.swift @@ -5,9 +5,9 @@ // Created by Khan Winter on 7/17/25. // -import Testing import AppKit @testable import CodeEditTextView +import Testing @MainActor @Suite @@ -17,7 +17,7 @@ struct AccessibilityTests { init() { textView = TextView(string: sampleText) - textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) + textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) textView.updateFrameIfNeeded() } @@ -92,7 +92,7 @@ struct AccessibilityTests { @Test func accessibilityRangeForInvalidIndex() { - let range = textView.accessibilityRange(for: 1000) + let range = textView.accessibilityRange(for: 1_000) #expect(range == .notFound) } @@ -205,7 +205,7 @@ struct AccessibilityTests { @Test func accessibilityLineForInvalidIndex() { - let lineIndex = textView.accessibilityLine(for: 1000) + let lineIndex = textView.accessibilityLine(for: 1_000) #expect(lineIndex == -1) } diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/CmdUpAtEndOfDocumentTests.swift b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/CmdUpAtEndOfDocumentTests.swift index cdbe831c85..68762a58f6 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/CmdUpAtEndOfDocumentTests.swift +++ b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/CmdUpAtEndOfDocumentTests.swift @@ -1,6 +1,6 @@ -import Testing import AppKit @testable import CodeEditTextView +import Testing /// Regression tests for vertical cursor moves when the cursor sits at the end of a line, /// including the end of the document. Standard macOS NSTextView behavior: @@ -12,9 +12,9 @@ import AppKit struct CmdUpAtEndOfDocumentTests { private func makeLaidOutTextView(_ text: String) -> TextView { let textView = TextView(string: text) - textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) + textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) textView.updateFrameIfNeeded() - textView.layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1000, height: 1000)) + textView.layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) return textView } diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/EmphasisManagerTests.swift b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/EmphasisManagerTests.swift index 6a1a8d185a..b88f377f7e 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/EmphasisManagerTests.swift +++ b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/EmphasisManagerTests.swift @@ -31,7 +31,7 @@ struct EmphasisManagerTests { // No emphasis layers remain #expect(textView.layer?.sublayers?.count == nil) - #expect(textView.emphasisManager?.getEmphases(for: "e").count == 0) + #expect(textView.emphasisManager?.getEmphases(for: "e").isEmpty == true) } @Test() diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/IMEInputTests.swift b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/IMEInputTests.swift index cbf2c397b7..3986b5ea36 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/IMEInputTests.swift +++ b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/IMEInputTests.swift @@ -1,6 +1,6 @@ -import Testing import AppKit @testable import CodeEditTextView +import Testing /// Regression tests for IME commits (Pinyin / Rime / any system that uses marked text). /// diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/KillRingTests.swift b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/KillRingTests.swift index ad092eb413..85726c10ea 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/KillRingTests.swift +++ b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/KillRingTests.swift @@ -1,5 +1,5 @@ -import XCTest @testable import CodeEditTextView +import XCTest class KillRingTests: XCTestCase { func test_killRingYank() { diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/OverridingLayoutManagerRenderingTests.swift b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/OverridingLayoutManagerRenderingTests.swift index 07f222fb69..dceaf82d76 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/OverridingLayoutManagerRenderingTests.swift +++ b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/OverridingLayoutManagerRenderingTests.swift @@ -1,6 +1,6 @@ -import Testing import AppKit @testable import CodeEditTextView +import Testing class MockRenderDelegate: TextLayoutManagerRenderDelegate { var prepareForDisplay: (( @@ -13,7 +13,7 @@ class MockRenderDelegate: TextLayoutManagerRenderDelegate { var estimatedLineHeightOverride: (() -> CGFloat)? - func prepareForDisplay( // swiftlint:disable:this function_parameter_count + func prepareForDisplay( textLine: TextLine, displayData: TextLine.DisplayData, range: NSRange, @@ -51,7 +51,7 @@ struct OverridingLayoutManagerRenderingTests { init() throws { textView = TextView(string: "A\nB\nC\nD") - textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) + textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) textStorage = textView.textStorage layoutManager = try #require(textView.layoutManager) mockDelegate = MockRenderDelegate() @@ -81,8 +81,8 @@ struct OverridingLayoutManagerRenderingTests { } } - layoutManager.invalidateLayoutForRect(NSRect(x: 0, y: 0, width: 1000, height: 1000)) - layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1000, height: 1000)) + layoutManager.invalidateLayoutForRect(NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) + layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) // 4 lines, each 2px tall #expect(layoutManager.lineStorage.height == 8.0) @@ -90,7 +90,7 @@ struct OverridingLayoutManagerRenderingTests { // Edit some text textStorage.replaceCharacters(in: NSRange(location: 0, length: 0), with: "0\n1\r\n2\r") - layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1000, height: 1000)) + layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) #expect(layoutManager.lineCount == 7) #expect(layoutManager.lineStorage.height == 14.0) diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerAttachmentsTests.swift b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerAttachmentsTests.swift index 1841cc5edf..40e64a415e 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerAttachmentsTests.swift +++ b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerAttachmentsTests.swift @@ -5,9 +5,9 @@ // Created by Khan Winter on 5/5/25. // -import Testing import AppKit @testable import CodeEditTextView +import Testing @Suite @MainActor @@ -18,7 +18,7 @@ struct TextLayoutManagerAttachmentsTests { init() throws { textView = TextView(string: "12\n45\n78\n01\n") - textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) + textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) textStorage = textView.textStorage layoutManager = try #require(textView.layoutManager) } @@ -91,7 +91,7 @@ struct TextLayoutManagerAttachmentsTests { func iterateWithAttachments() { layoutManager.attachments.add(DemoTextAttachment(), for: NSRange(start: 1, end: 2)) - let lines = layoutManager.linesStartingAt(0, until: 1000) + let lines = layoutManager.linesStartingAt(0, until: 1_000) // Line "5" is from the trailing newline. That shows up as an empty line in the view. #expect(lines.map { $0.index } == [0, 1, 2, 3, 4]) @@ -103,7 +103,7 @@ struct TextLayoutManagerAttachmentsTests { layoutManager.attachments.add(DemoTextAttachment(), for: NSRange(start: 2, end: 7)) layoutManager.attachments.add(DemoTextAttachment(), for: NSRange(start: 7, end: 11)) - let lines = layoutManager.linesStartingAt(0, until: 1000) + let lines = layoutManager.linesStartingAt(0, until: 1_000) // Line "5" is from the trailing newline. That shows up as an empty line in the view. #expect(lines.map { $0.index } == [0, 4]) diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerTests.swift b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerTests.swift index 045ce5ede8..023f6a40cb 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerTests.swift +++ b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerTests.swift @@ -1,6 +1,6 @@ -import Testing import AppKit @testable import CodeEditTextView +import Testing extension TextLineStorage { /// Validate that the internal tree is intact and correct. @@ -10,18 +10,18 @@ extension TextLineStorage { /// - All lines can be found by iterating `y` positions. func validateInternalState() { func validateLines(_ lines: [TextLineStorage.TextLinePosition]) { - var _lastLine: TextLineStorage.TextLinePosition? + var previousLine: TextLineStorage.TextLinePosition? for line in lines { - guard let lastLine = _lastLine else { + guard let lastLine = previousLine else { #expect(line.index == 0) - _lastLine = line + previousLine = line return } #expect(line.index == lastLine.index + 1) #expect(line.yPos >= lastLine.yPos + lastLine.height) #expect(line.range.location == lastLine.range.max + 1) - _lastLine = line + previousLine = line } } @@ -42,7 +42,7 @@ struct TextLayoutManagerTests { init() throws { textView = TextView(string: "A\nB\nC\nD") - textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) + textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) textView.updateFrameIfNeeded() textStorage = textView.textStorage layoutManager = try #require(textView.layoutManager) @@ -56,7 +56,7 @@ struct TextLayoutManagerTests { ("A\r\nB\nC\rD", NSRange(location: 0, length: 0), 7) // Insert mixed line breaks ] ) - func insertText(_ testItem: (String, NSRange, Int)) throws { // swiftlint:disable:this large_tuple + func insertText(_ testItem: (String, NSRange, Int)) throws { let (insertText, insertRange, lineCount) = testItem textStorage.replaceCharacters(in: insertRange, with: insertText) @@ -92,7 +92,7 @@ struct TextLayoutManagerTests { ("A\r\nB\nC\r", NSRange(location: 0, length: 6), 4) // Mixed line breaks ] ) - func replaceText(_ testItem: (String, NSRange, Int)) throws { // swiftlint:disable:this large_tuple + func replaceText(_ testItem: (String, NSRange, Int)) throws { let (replaceText, replaceRange, lineCount) = testItem textStorage.replaceCharacters(in: replaceRange, with: replaceText) @@ -106,7 +106,7 @@ struct TextLayoutManagerTests { /// call to ``TextLayoutManager/preparePositionForDisplay``. @Test func getRectsDoesNotRemoveLayoutInfo() { - layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1000, height: 1000)) + layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) let lineFragmentIDs = Set( layoutManager.lineStorage .linesInRange(NSRange(location: 0, length: 7)) @@ -140,10 +140,10 @@ struct TextLayoutManagerTests { func yPositionIteratorDoesNotSkipEmptyLines() { // Layout manager keeps 1-length lines at the 2nd and 4th lines. textStorage.mutableString.setString("A\n\nB\n\nC") - layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1000, height: 1000)) + layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) var lineIndexes: [Int] = [] - for line in layoutManager.linesStartingAt(0.0, until: 1000.0) { + for line in layoutManager.linesStartingAt(0.0, until: 1_000.0) { lineIndexes.append(line.index) } @@ -163,7 +163,7 @@ struct TextLayoutManagerTests { func rangeIteratorDoesNotSkipEmptyLines() { // Layout manager keeps 1-length lines at the 2nd and 4th lines. textStorage.mutableString.setString("A\n\nB\n\nC") - layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1000, height: 1000)) + layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) var lineIndexes: [Int] = [] for line in layoutManager.linesInRange(textView.documentRange) { @@ -183,7 +183,7 @@ struct TextLayoutManagerTests { @Test func afterLayoutDoesntNeedLayout() { - layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1000, height: 1000)) + layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) #expect(layoutManager.needsLayout == false) } @@ -192,7 +192,7 @@ struct TextLayoutManagerTests { /// See `editsWithNewlinesForceLayoutGoingDownScreen` @Test func invalidatingRangeLaysOutLines() { - layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1000, height: 1000)) + layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) let lineIds = Set(layoutManager.linesInRange(NSRange(start: 2, end: 4)).map { $0.data.id }) layoutManager.invalidateLayoutForRange(NSRange(start: 2, end: 4)) @@ -219,7 +219,7 @@ struct TextLayoutManagerTests { /// equal the expected invalidated lines. @Test func editsWithNewlinesForceLayoutGoingDownScreen() { - layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1000, height: 1000)) + layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) textStorage.replaceCharacters(in: NSRange(start: 4, end: 4), with: "Z\n") let expectedLineIds = Array( @@ -234,7 +234,7 @@ struct TextLayoutManagerTests { @Test func rectForOffsetReturnsValueAfterEndOfDoc() throws { - layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1000, height: 1000)) + layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) for idx in 0..<10 { // This should return something even after the end of the document. @@ -255,7 +255,7 @@ struct TextLayoutManagerTests { textView: NSView(), delegate: nil ) - manager.layoutLines(in: NSRect(x: 0, y: 0, width: 1000, height: 1000)) + manager.layoutLines(in: NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) // Shrink the text without notifying the standalone manager, leaving its line storage stale and longer. storage.mutableString.setString("S") @@ -274,11 +274,11 @@ struct TextLayoutManagerTests { @Test func textOffsetForPointReturnsValuesEverywhere() throws { - layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1000, height: 1000)) + layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) // textOffsetAtPoint is valid *everywhere*. It should always return something. - for xPos in 0..<1000 { - for yPos in 0..<1000 { + for xPos in 0..<1_000 { + for yPos in 0..<1_000 { #expect(layoutManager.textOffsetAtPoint(CGPoint(x: xPos, y: yPos)) != nil) } } @@ -288,10 +288,10 @@ struct TextLayoutManagerTests { func editingEndOfDocumentInvalidatesLastLine() throws { // Setup a slightly longer final line textStorage.replaceCharacters(in: NSRange(location: 7, length: 0), with: "EFGH") - layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1000, height: 1000)) + layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) textStorage.replaceCharacters(in: NSRange(location: 10, length: 1), with: "") - let invalidatedLineIds = layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1000, height: 1000)) + let invalidatedLineIds = layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) let expectedLineIds = Array( layoutManager.lineStorage.linesInRange(NSRange(location: 6, length: 0)) @@ -302,7 +302,7 @@ struct TextLayoutManagerTests { private func makeLaidOutTextView(string: String) -> TextView { let view = TextView(string: string) - view.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) + view.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) view.updateFrameIfNeeded() return view } diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LineEndingTests.swift b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LineEndingTests.swift index c46f50f639..e3068c7ea8 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LineEndingTests.swift +++ b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LineEndingTests.swift @@ -1,29 +1,29 @@ -import XCTest @testable import CodeEditTextView +import XCTest class LineEndingTests: XCTestCase { func test_lineEndingCreateUnix() { // The \n character - XCTAssertTrue(LineEnding(rawValue: "\n") != nil, "Line ending failed to initialize with the \\n character") + XCTAssertNotNil(LineEnding(rawValue: "\n"), "Line ending failed to initialize with the \\n character") let line = "Loren Ipsum\n" - XCTAssertTrue(LineEnding(line: line) != nil, "Line ending failed to initialize with a line ending in \\n") + XCTAssertNotNil(LineEnding(line: line), "Line ending failed to initialize with a line ending in \\n") } func test_lineEndingCreateCRLF() { // The \r\n sequence - XCTAssertTrue(LineEnding(rawValue: "\r\n") != nil, "Line ending failed to initialize with the \\r\\n sequence") + XCTAssertNotNil(LineEnding(rawValue: "\r\n"), "Line ending failed to initialize with the \\r\\n sequence") let line = "Loren Ipsum\r\n" - XCTAssertTrue(LineEnding(line: line) != nil, "Line ending failed to initialize with a line ending in \\r\\n") + XCTAssertNotNil(LineEnding(line: line), "Line ending failed to initialize with a line ending in \\r\\n") } func test_lineEndingCreateMacOS() { // The \r character - XCTAssertTrue(LineEnding(rawValue: "\r") != nil, "Line ending failed to initialize with the \\r character") + XCTAssertNotNil(LineEnding(rawValue: "\r"), "Line ending failed to initialize with the \\r character") let line = "Loren Ipsum\r" - XCTAssertTrue(LineEnding(line: line) != nil, "Line ending failed to initialize with a line ending in \\r") + XCTAssertNotNil(LineEnding(line: line), "Line ending failed to initialize with a line ending in \\r") } func test_detectLineEndingDefault() { @@ -41,9 +41,9 @@ class LineEndingTests: XCTestCase { let corpus = "abcdefghijklmnopqrstuvwxyz123456789" func makeRandomText(_ goalLineEnding: LineEnding) -> String { - (10.. characterWidth) - #expect(abs(fragment._xPos(for: 1) - characterWidth) < 0.5) + #expect(abs(fragment.xPosition(for: 1) - characterWidth) < 0.5) } @Test("Text after a marker moves right by the box, so nothing is drawn on top of it") func textAfterMarkerIsOffset() throws { let plain = try onlyFragment(typeset("ASELECT", style: nil)) let marked = try onlyFragment(typeset("A\u{8}SELECT")) - let boxWidth = marked._xPos(for: 2) - marked._xPos(for: 1) + let boxWidth = marked.xPosition(for: 2) - marked.xPosition(for: 1) #expect(abs(marked.width - (plain.width + boxWidth)) < 0.5) } @@ -71,7 +71,7 @@ struct SpecialCharacterLayoutTests { let fragment = try onlyFragment(typeset("a\u{A0}b")) let mark = try #require(fragment.specialCharacters.first) #expect(mark.character == .blankSpace) - #expect(abs((fragment._xPos(for: 2) - fragment._xPos(for: 1)) - characterWidth) < 0.5) + #expect(abs((fragment.xPosition(for: 2) - fragment.xPosition(for: 1)) - characterWidth) < 0.5) } @Test("A tag character outside the BMP gets one box and no caret stop between its two halves") @@ -81,13 +81,13 @@ struct SpecialCharacterLayoutTests { #expect(mark.character == .marker(label: "E0041")) #expect(mark.offset == 1) #expect(mark.length == 2) - let boxWidth = fragment._xPos(for: 3) - fragment._xPos(for: 1) + let boxWidth = fragment.xPosition(for: 3) - fragment.xPosition(for: 1) #expect(boxWidth == SpecialCharacterMetrics.markerWidth(label: "E0041", font: font)) guard case .text(let line) = fragment.contents.first?.data else { Issue.record("Expected a text run") return } - let start = fragment._xPos(for: 1) + let start = fragment.xPosition(for: 1) for step in 0...10 { let point = CGPoint(x: start + boxWidth * CGFloat(step) / 10, y: 0) #expect(CTLineGetStringIndexForPosition(line, point) != 2) @@ -106,7 +106,7 @@ struct SpecialCharacterLayoutTests { @Test("With marks off, a right-to-left override still cannot reorder the text") func overrideIsNeutralizedWithoutTheStyle() throws { let fragment = try onlyFragment(typeset("A\u{202E}BCD", style: nil)) - let positions = (0...5).map { fragment._xPos(for: $0) } + let positions = (0...5).map { fragment.xPosition(for: $0) } #expect(positions == positions.sorted()) } @@ -115,8 +115,8 @@ struct SpecialCharacterLayoutTests { let fragment = try onlyFragment(typeset("A\u{8}B\u{A0}C\u{E0041}D")) #expect(fragment.specialCharacters.count == 3) for mark in fragment.specialCharacters { - #expect(abs(mark.minX - fragment._xPos(for: mark.offset)) < 0.5) - #expect(abs(mark.maxX - fragment._xPos(for: mark.offset + mark.length)) < 0.5) + #expect(abs(mark.minX - fragment.xPosition(for: mark.offset)) < 0.5) + #expect(abs(mark.maxX - fragment.xPosition(for: mark.offset + mark.length)) < 0.5) #expect(mark.maxX > mark.minX) } } @@ -130,7 +130,7 @@ struct SpecialCharacterLayoutTests { @Test("A right-to-left override is shown instead of reversing the text after it") func overrideDoesNotReorder() throws { let fragment = try onlyFragment(typeset("A\u{202E}BCD")) - let positions = (0...5).map { fragment._xPos(for: $0) } + let positions = (0...5).map { fragment.xPosition(for: $0) } #expect(positions == positions.sorted()) } diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextLayoutLineStorageTests.swift b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextLayoutLineStorageTests.swift index 01bd0816a6..d21511b84b 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextLayoutLineStorageTests.swift +++ b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextLayoutLineStorageTests.swift @@ -1,9 +1,9 @@ -import XCTest @testable import CodeEditTextView +import XCTest fileprivate extension CGFloat { func approxEqual(_ value: CGFloat) -> Bool { - return abs(self - value) < 0.05 + abs(self - value) < 0.05 } } @@ -11,8 +11,7 @@ extension UUID: @retroactive Identifiable { public var id: UUID { self } } -final class TextLayoutLineStorageTests: XCTestCase { // swiftlint:disable:this type_body_length - +final class TextLayoutLineStorageTests: XCTestCase { /// Creates a balanced height=3 tree useful for testing and debugging. /// - Returns: A new tree. fileprivate func createBalancedTree() -> TextLineStorage { @@ -40,8 +39,8 @@ final class TextLayoutLineStorageTests: XCTestCase { // swiftlint:disable:this t let leftSubtreeData = checkChildren(node.left) let rightSubtreeData = checkChildren(node.right) - XCTAssert(leftSubtreeData.length == node.leftSubtreeOffset, "Left subtree length incorrect") - XCTAssert(leftSubtreeData.count == node.leftSubtreeCount, "Left subtree node count incorrect") + XCTAssertEqual(leftSubtreeData.length, node.leftSubtreeOffset, "Left subtree length incorrect") + XCTAssertEqual(leftSubtreeData.count, node.leftSubtreeCount, "Left subtree node count incorrect") XCTAssert(leftSubtreeData.height.approxEqual(node.leftSubtreeHeight), "Left subtree height incorrect") let subtreeWidth = max(node.width, leftSubtreeData.maxWidth, rightSubtreeData.maxWidth) @@ -57,14 +56,14 @@ final class TextLayoutLineStorageTests: XCTestCase { // swiftlint:disable:this t let rootData = checkChildren(tree.root) - XCTAssert(rootData.count == tree.count, "Node count incorrect") - XCTAssert(rootData.length == tree.length, "Length incorrect") + XCTAssertEqual(rootData.count, tree.count, "Node count incorrect") + XCTAssertEqual(rootData.length, tree.length, "Length incorrect") XCTAssert(rootData.height.approxEqual(tree.height), "Height incorrect") XCTAssertEqual(rootData.maxWidth, tree.maxWidth, "Max width incorrect") var lastIdx = -1 for line in tree { - XCTAssert(lastIdx == line.index - 1, "Incorrect index found") + XCTAssertEqual(lastIdx, line.index - 1, "Incorrect index found") lastIdx = line.index } } @@ -74,9 +73,9 @@ final class TextLayoutLineStorageTests: XCTestCase { // swiftlint:disable:this t // Single Element tree.insert(line: TextLine(), atOffset: 0, length: 1, height: 50.0) - XCTAssert(tree.length == 1, "Tree length incorrect") - XCTAssert(tree.count == 1, "Tree count incorrect") - XCTAssert(tree.height == 50.0, "Tree height incorrect") + XCTAssertEqual(tree.length, 1, "Tree length incorrect") + XCTAssertEqual(tree.count, 1, "Tree count incorrect") + XCTAssertEqual(tree.height, 50.0, "Tree height incorrect") XCTAssert(tree.root?.right == nil && tree.root?.left == nil, "Somehow inserted an extra node.") try assertTreeMetadataCorrect(tree) @@ -143,69 +142,68 @@ final class TextLayoutLineStorageTests: XCTestCase { // swiftlint:disable:this t let originalCount = tree.count let originalLength = tree.length tree.update(atOffset: Int.random(in: 0..() // Single Element tree.insert(line: TextLine(), atOffset: 0, length: 1, height: 1.0) - XCTAssert(tree.length == 1, "Tree length incorrect") + XCTAssertEqual(tree.length, 1, "Tree length incorrect") tree.delete(lineAt: 0) - XCTAssert(tree.length == 0, "Tree failed to delete single node") - XCTAssert(tree.root == nil, "Tree root should be nil") + XCTAssertEqual(tree.length, 0, "Tree failed to delete single node") + XCTAssertNil(tree.root, "Tree root should be nil") try assertTreeMetadataCorrect(tree) // Delete first tree = createBalancedTree() tree.delete(lineAt: 0) - XCTAssert(tree.count == 14, "Tree length incorrect") - XCTAssert(tree.first?.range.length == 2, "Failed to delete leftmost node") + XCTAssertEqual(tree.count, 14, "Tree length incorrect") + XCTAssertEqual(tree.first?.range.length, 2, "Failed to delete leftmost node") try assertTreeMetadataCorrect(tree) // Delete last tree = createBalancedTree() tree.delete(lineAt: tree.length - 1) - XCTAssert(tree.count == 14, "Tree length incorrect") - XCTAssert(tree.last?.range.length == 14, "Failed to delete rightmost node") + XCTAssertEqual(tree.count, 14, "Tree length incorrect") + XCTAssertEqual(tree.last?.range.length, 14, "Failed to delete rightmost node") try assertTreeMetadataCorrect(tree) // Delete mid leaf tree = createBalancedTree() tree.delete(lineAt: 45) - XCTAssert(tree.root?.right?.left?.length == 11, "Failed to remove node 10") - XCTAssert(tree.root?.right?.leftSubtreeOffset == 20, "Failed to update metadata on parent of node 10") - XCTAssert(tree.root?.right?.left?.right == nil, "Failed to replace node 10 with node 11") - XCTAssert(tree.count == 14, "Tree length incorrect") + XCTAssertEqual(tree.root?.right?.left?.length, 11, "Failed to remove node 10") + XCTAssertEqual(tree.root?.right?.leftSubtreeOffset, 20, "Failed to update metadata on parent of node 10") + XCTAssertNil(tree.root?.right?.left?.right, "Failed to replace node 10 with node 11") + XCTAssertEqual(tree.count, 14, "Tree length incorrect") try assertTreeMetadataCorrect(tree) tree = createBalancedTree() tree.delete(lineAt: 66) - XCTAssert(tree.root?.right?.length == 13, "Failed to remove node 12") - XCTAssert(tree.root?.right?.leftSubtreeOffset == 30, "Failed to update metadata on parent of node 13") - XCTAssert(tree.root?.right?.left?.right?.left == nil, "Failed to replace node 12 with node 13") - XCTAssert(tree.count == 14, "Tree length incorrect") + XCTAssertEqual(tree.root?.right?.length, 13, "Failed to remove node 12") + XCTAssertEqual(tree.root?.right?.leftSubtreeOffset, 30, "Failed to update metadata on parent of node 13") + XCTAssertNil(tree.root?.right?.left?.right?.left, "Failed to replace node 12 with node 13") + XCTAssertEqual(tree.count, 14, "Tree length incorrect") try assertTreeMetadataCorrect(tree) // Delete root tree = createBalancedTree() - tree.delete(lineAt: tree.root!.leftSubtreeOffset + 1) - XCTAssert(tree.root?.color == .black, "Root color incorrect") - XCTAssert(tree.root?.right?.left?.left == nil, "Replacement node was not moved to root") - XCTAssert(tree.root?.leftSubtreeCount == 7, "Replacement node was not given correct metadata.") - XCTAssert(tree.root?.leftSubtreeHeight == 7.0, "Replacement node was not given correct metadata.") - XCTAssert(tree.root?.leftSubtreeOffset == 28, "Replacement node was not given correct metadata.") - XCTAssert(tree.count == 14, "Tree length incorrect") + tree.delete(lineAt: try XCTUnwrap(tree.root).leftSubtreeOffset + 1) + XCTAssertEqual(tree.root?.color, .black, "Root color incorrect") + XCTAssertNil(tree.root?.right?.left?.left, "Replacement node was not moved to root") + XCTAssertEqual(tree.root?.leftSubtreeCount, 7, "Replacement node was not given correct metadata.") + XCTAssertEqual(tree.root?.leftSubtreeHeight, 7.0, "Replacement node was not given correct metadata.") + XCTAssertEqual(tree.root?.leftSubtreeOffset, 28, "Replacement node was not given correct metadata.") + XCTAssertEqual(tree.count, 14, "Tree length incorrect") try assertTreeMetadataCorrect(tree) // Delete a bunch of random @@ -216,7 +214,7 @@ final class TextLayoutLineStorageTests: XCTestCase { // swiftlint:disable:this t while !tree.isEmpty { lastCount -= 1 tree.delete(lineAt: Int.random(in: 0.. last, "Out of order after deletion") @@ -296,7 +294,7 @@ final class TextLayoutLineStorageTests: XCTestCase { // swiftlint:disable:this t /// Rotations and the two-child delete are where a width aggregate goes wrong, and a hand-written case reaches only /// the few shapes it was written for. func test_widthAggregateMatchesAModelThroughRandomEdits() throws { - var generator = SeededGenerator(seed: 2709) + var generator = SeededGenerator(seed: 2_709) let tree = TextLineStorage() var model: [(length: Int, width: CGFloat)] = [] @@ -388,7 +386,7 @@ final class TextLayoutLineStorageTests: XCTestCase { // swiftlint:disable:this t } } - func test_transplantWithExistingLeftNodes() throws { // swiftlint:disable:this function_body_length + func test_transplantWithExistingLeftNodes() throws { typealias Storage = TextLineStorage typealias Node = TextLineStorage.Node // Test that when transplanting a node with no left nodes, with a node with left nodes, that diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextLineDisplayRangeTests.swift b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextLineDisplayRangeTests.swift index 54e1324bb0..54d9faf5d0 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextLineDisplayRangeTests.swift +++ b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextLineDisplayRangeTests.swift @@ -1,6 +1,6 @@ import AppKit -import Testing @testable import CodeEditTextView +import Testing /// The line storage is updated from the edited range and can be longer than the string it indexes /// while an edit is still in flight. Slicing the storage with a range from the far side of that diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextSelectionManagerTests.swift b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextSelectionManagerTests.swift index 437a201385..4e90b637cb 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextSelectionManagerTests.swift +++ b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextSelectionManagerTests.swift @@ -1,5 +1,5 @@ -import XCTest @testable import CodeEditTextView +import XCTest final class TextSelectionManagerTests: XCTestCase { var textStorage: NSTextStorage! @@ -36,12 +36,14 @@ final class TextSelectionManagerTests: XCTestCase { decomposeCharacters: decomposeCharacters[idx] ) - XCTAssert( - range.location == expectedRanges[idx].0, + XCTAssertEqual( + range.location, + expectedRanges[idx].0, "Invalid Location. Testing location \(locations[idx]). Expected \(expectedRanges[idx]). Got \(range)" ) - XCTAssert( - range.length == expectedRanges[idx].1, + XCTAssertEqual( + range.length, + expectedRanges[idx].1, "Invalid Location. Testing location \(locations[idx]). Expected \(expectedRanges[idx]). Got \(range)" ) } @@ -61,12 +63,14 @@ final class TextSelectionManagerTests: XCTestCase { decomposeCharacters: decomposeCharacters[idx] ) - XCTAssert( - range.location == expectedRanges[idx].0, + XCTAssertEqual( + range.location, + expectedRanges[idx].0, "Invalid Location. Testing location \(locations[idx]). Expected \(expectedRanges[idx]). Got \(range)" ) - XCTAssert( - range.length == expectedRanges[idx].1, + XCTAssertEqual( + range.length, + expectedRanges[idx].1, "Invalid Location. Testing location \(locations[idx]). Expected \(expectedRanges[idx]). Got \(range)" ) } @@ -85,12 +89,14 @@ final class TextSelectionManagerTests: XCTestCase { decomposeCharacters: false ) - XCTAssert( - range.location == expectedRanges[idx].0, + XCTAssertEqual( + range.location, + expectedRanges[idx].0, "Invalid Location. Testing location \(locations[idx]). Expected \(expectedRanges[idx]). Got \(range)" ) - XCTAssert( - range.length == expectedRanges[idx].1, + XCTAssertEqual( + range.length, + expectedRanges[idx].1, "Invalid Location. Testing location \(locations[idx]). Expected \(expectedRanges[idx]). Got \(range)" ) } @@ -110,12 +116,14 @@ final class TextSelectionManagerTests: XCTestCase { decomposeCharacters: false ) - XCTAssert( - range.location == expectedRanges[idx].0, + XCTAssertEqual( + range.location, + expectedRanges[idx].0, "Invalid Location. Testing location \(locations[idx]). Expected \(expectedRanges[idx]). Got \(range)" ) - XCTAssert( - range.length == expectedRanges[idx].1, + XCTAssertEqual( + range.length, + expectedRanges[idx].1, "Invalid Location. Testing location \(locations[idx]). Expected \(expectedRanges[idx]). Got \(range)" ) } @@ -135,12 +143,14 @@ final class TextSelectionManagerTests: XCTestCase { decomposeCharacters: false ) - XCTAssert( - range.location == expectedRanges[idx].0, + XCTAssertEqual( + range.location, + expectedRanges[idx].0, "Invalid Location. Testing location \(locations[idx]). Expected \(expectedRanges[idx]). Got \(range)" ) - XCTAssert( - range.length == expectedRanges[idx].1, + XCTAssertEqual( + range.length, + expectedRanges[idx].1, "Invalid Location. Testing location \(locations[idx]). Expected \(expectedRanges[idx]). Got \(range)" ) } @@ -159,12 +169,14 @@ final class TextSelectionManagerTests: XCTestCase { decomposeCharacters: false ) - XCTAssert( - range.location == expectedRanges[idx].0, + XCTAssertEqual( + range.location, + expectedRanges[idx].0, "Invalid Location. Testing location \(locations[idx]). Expected \(expectedRanges[idx]). Got \(range)" ) - XCTAssert( - range.length == expectedRanges[idx].1, + XCTAssertEqual( + range.length, + expectedRanges[idx].1, "Invalid Location. Testing location \(locations[idx]). Expected \(expectedRanges[idx]). Got \(range)" ) } @@ -183,12 +195,14 @@ final class TextSelectionManagerTests: XCTestCase { decomposeCharacters: false ) - XCTAssert( - range.location == expectedRanges[idx].0, + XCTAssertEqual( + range.location, + expectedRanges[idx].0, "Invalid Location. Testing location \(locations[idx]). Expected \(expectedRanges[idx]). Got \(range)" ) - XCTAssert( - range.length == expectedRanges[idx].1, + XCTAssertEqual( + range.length, + expectedRanges[idx].1, "Invalid Location. Testing location \(locations[idx]). Expected \(expectedRanges[idx]). Got \(range)" ) } @@ -207,12 +221,14 @@ final class TextSelectionManagerTests: XCTestCase { decomposeCharacters: false ) - XCTAssert( - range.location == expectedRanges[idx].0, + XCTAssertEqual( + range.location, + expectedRanges[idx].0, "Invalid Location. Testing location \(locations[idx]). Expected \(expectedRanges[idx]). Got \(range)" ) - XCTAssert( - range.length == expectedRanges[idx].1, + XCTAssertEqual( + range.length, + expectedRanges[idx].1, "Invalid Location. Testing location \(locations[idx]). Expected \(expectedRanges[idx]). Got \(range)" ) } diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextViewTests.swift b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextViewTests.swift index 7b6ba44bbf..b1b85a5873 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextViewTests.swift +++ b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextViewTests.swift @@ -1,6 +1,6 @@ -import Testing import AppKit @testable import CodeEditTextView +import Testing @Suite @MainActor diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TypesetterTests.swift b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TypesetterTests.swift index 92826c365e..91fd8cc6f7 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TypesetterTests.swift +++ b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TypesetterTests.swift @@ -1,5 +1,5 @@ -import XCTest @testable import CodeEditTextView +import XCTest final class DemoTextAttachment: TextAttachment { var width: CGFloat @@ -120,8 +120,8 @@ class TypesetterTests: XCTestCase { func test_wrapLinesReturnsValidFragmentRanges() throws { // Ensure that when wrapping, each wrapped line fragment has correct ranges. typesetter.typeset( - NSAttributedString(string: String(repeating: "A", count: 1000), attributes: attributes), - documentRange: NSRange(location: 0, length: 1000), + NSAttributedString(string: String(repeating: "A", count: 1_000), attributes: attributes), + documentRange: NSRange(location: 0, length: 1_000), displayData: TextLine.DisplayData( maxWidth: 150, lineHeightMultiplier: 1.0, @@ -136,7 +136,7 @@ class TypesetterTests: XCTestCase { for fragment in typesetter.lineFragments { // The end of the fragment shouldn't extend beyond the valid document range - XCTAssertLessThanOrEqual(fragment.range.max, 1000) + XCTAssertLessThanOrEqual(fragment.range.max, 1_000) // Because we're breaking on characters, and filling each line with the same char // Each fragment should be as long or shorter than the first fragment. XCTAssertLessThanOrEqual(fragment.range.length, firstFragment.range.length) @@ -268,7 +268,7 @@ class TypesetterTests: XCTestCase { func test_wrapLinesDoesNotBreakOnLastNewline() throws { let attachment = DemoTextAttachment(width: 50) - let string = NSAttributedString(string: "AB CD\n12 34\nWX YZ\n", attributes: attributes) + let string = NSAttributedString(string: "AB CD\n12 34\nWX YZ\n", attributes: attributes) typesetter.typeset( string, documentRange: NSRange(location: 0, length: 15), diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/VisualLineEndOfDocumentTests.swift b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/VisualLineEndOfDocumentTests.swift index 3677d45d92..c273d0e73c 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/VisualLineEndOfDocumentTests.swift +++ b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/VisualLineEndOfDocumentTests.swift @@ -1,6 +1,6 @@ -import Testing import AppKit @testable import CodeEditTextView +import Testing /// Regression tests for cmd+arrow (visualLine destination) when the cursor sits at, or one /// position before, the end of a line that has no trailing newline. @@ -10,9 +10,9 @@ import AppKit struct VisualLineEndOfDocumentTests { private func makeLaidOutTextView(_ text: String) -> TextView { let textView = TextView(string: text) - textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000) + textView.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) textView.updateFrameIfNeeded() - textView.layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1000, height: 1000)) + textView.layoutManager.layoutLines(in: NSRect(x: 0, y: 0, width: 1_000, height: 1_000)) return textView } diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/WordSelectionTests.swift b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/WordSelectionTests.swift index 6ab87b276e..9781f202ee 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/WordSelectionTests.swift +++ b/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/WordSelectionTests.swift @@ -1,6 +1,6 @@ -import Testing import AppKit @testable import CodeEditTextView +import Testing @Suite @MainActor diff --git a/TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift b/TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift index a86d7001ab..85f7b01d71 100644 --- a/TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift +++ b/TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift @@ -67,11 +67,11 @@ struct EditorLifecycleTeardownTests { func releaseHeavyStateKeepsUndoStack() { let controller = EditorControllerFixture.make(string: "SELECT 1") controller.textView.replaceCharacters(in: NSRange(location: 8, length: 0), with: " -- note") - #expect(controller.textView._undoManager?.canUndo == true) + #expect(controller.textView.editorUndoManager?.canUndo == true) controller.releaseHeavyState() - #expect(controller.textView._undoManager?.canUndo == true) + #expect(controller.textView.editorUndoManager?.canUndo == true) } @Test("SQLEditorCoordinator.destroy keeps the document") From 8deaccbdcf5b3e9eafec4ef6a8ff5dca47ad1699 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Tue, 15 Sep 2026 13:58:08 +0700 Subject: [PATCH 2/6] refactor(editor)!: move the vendored editor into Packages/TableProEditor and rename its modules --- .../fix-issue/references/verification.md | 2 +- .github/workflows/macos-tests.yml | 17 ++---- .gitignore | 1 - CLAUDE.md | 14 ++--- .../CodeEditSourceEditor/Package.swift | 49 ---------------- .../CodeEditTextView/Package.resolved | 32 ---------- LocalPackages/CodeEditTextView/Package.swift | 53 ----------------- .../CodeEditTextView/CodeEditTextView.swift | 11 ---- .../CodeEditTextView/Utils/Logger.swift | 3 - .../LICENSE-CodeEditSourceEditor.md | 0 .../LICENSE-CodeEditTextView.md | 0 Packages/TableProEditor/ORIGIN.md | 52 +++++++++++++++++ .../TableProEditor}/Package.resolved | 3 +- Packages/TableProEditor/Package.swift | 58 +++++++++++++++++++ .../Model/CodeSuggestionDelegate.swift | 2 +- .../Model/CodeSuggestionEntry.swift | 2 +- .../SuggestionTriggerCharacterModel.swift | 6 +- .../Model/SuggestionViewModel.swift | 4 +- .../View/CodeSuggestionLabelView.swift | 2 +- .../View/SuggestionContentView.swift | 2 +- .../View/SuggestionPreviewView.swift | 2 +- .../Window/SuggestionController+Window.swift | 2 +- .../Window/SuggestionController.swift | 4 +- .../Window/SuggestionWindowPlacement.swift | 2 +- .../TextViewController+Suggestions.swift | 2 +- .../Controller/EditorKeyCommand.swift | 2 +- .../TextViewController+Cursor.swift | 2 +- .../TextViewController+EmphasizeBracket.swift | 4 +- .../TextViewController+FindPanelTarget.swift | 4 +- .../TextViewController+Folding.swift | 4 +- ...extViewController+GutterViewDelegate.swift | 2 +- .../TextViewController+Highlighter.swift | 2 +- .../TextViewController+IndentLines.swift | 6 +- .../TextViewController+Lifecycle.swift | 4 +- .../TextViewController+LineOperations.swift | 4 +- .../TextViewController+MoveLines.swift | 2 +- .../TextViewController+ReloadUI.swift | 2 +- .../TextViewController+StatementRunning.swift | 2 +- .../TextViewController+StyleViews.swift | 4 +- .../TextViewController+TextFormation.swift | 4 +- .../TextViewController+TextViewDelegate.swift | 4 +- .../TextViewController+ToggleComment.swift | 4 +- ...extViewController+ToggleCommentCache.swift | 2 +- .../TextViewController+UnfilteredEdits.swift | 4 +- .../Controller/TextViewController.swift | 6 +- .../Enums/BracketPairEmphasis.swift | 2 +- .../Enums/BracketPairs.swift | 2 +- .../Enums/CaptureModifier.swift | 2 +- .../Enums/CaptureModifierSet.swift | 2 +- .../Enums/CaptureName.swift | 2 +- .../Enums/IndentOption.swift | 2 +- .../Extensions/Color+Hex.swift | 2 +- .../DispatchQueue+dispatchMainIfNot.swift | 2 +- .../Extensions/IndexSet+NSRange.swift | 2 +- .../NSBezierPath+RoundedCorners.swift | 2 +- .../Extensions/NSColor+LightDark.swift | 2 +- .../NSEdgeInsets/NSEdgeInsets+Equatable.swift | 2 +- .../NSEdgeInsets/NSEdgeInsets+Helpers.swift | 2 +- .../Extensions/NSFont/NSFont+CharWidth.swift | 2 +- .../Extensions/NSFont/NSFont+LineHeight.swift | 4 +- .../Extensions/NSFont/NSFont+RulerFont.swift | 2 +- .../NSRange+/NSRange+InputEdit.swift | 4 +- .../NSRange+/NSRange+NSTextRange.swift | 2 +- .../Extensions/NSRange+/NSRange+String.swift | 2 +- .../Extensions/NSRange+/NSRange+TSRange.swift | 2 +- .../Extensions/NSRange+/NSRange+isEmpty.swift | 2 +- .../Extensions/NSRect+Transform.swift | 2 +- .../Extensions/NSString+TextStory.swift | 2 +- .../Extensions/Node+filterChildren.swift | 2 +- .../Extensions/Range+Length.swift | 2 +- .../Extensions/Result+ThrowOrReturn.swift | 2 +- .../Extensions/String+/String+Groups.swift | 2 +- .../Extensions/String+/String+encoding.swift | 2 +- .../Extensions/TextMutation+isEmpty.swift | 2 +- .../Extensions/TextView+/TextView+Menu.swift | 4 +- .../Extensions/TextView+/TextView+Point.swift | 4 +- .../TextView+/TextView+TextFormation.swift | 4 +- .../TextView+/TextView+createReadBlock.swift | 4 +- .../Extensions/Tree+prettyPrint.swift | 2 +- .../Filters/DeleteWhitespaceFilter.swift | 4 +- .../Filters/TabReplacementFilter.swift | 2 +- .../TableProEditorKit}/Find/FindMethod.swift | 2 +- .../Find/FindPanelMode.swift | 2 +- .../Find/FindPanelTarget.swift | 4 +- .../Find/FindViewController+Toggle.swift | 2 +- .../Find/FindViewController.swift | 4 +- .../Find/PanelView/FindControls.swift | 2 +- .../Find/PanelView/FindMethodPicker.swift | 2 +- .../Find/PanelView/FindModePicker.swift | 2 +- .../Find/PanelView/FindPanelContent.swift | 2 +- .../Find/PanelView/FindPanelHostingView.swift | 2 +- .../Find/PanelView/FindPanelView.swift | 4 +- .../Find/PanelView/FindSearchField.swift | 2 +- .../Find/PanelView/ReplaceControls.swift | 2 +- .../Find/PanelView/ReplaceSearchField.swift | 2 +- .../FindPanelViewModel+Emphasis.swift | 4 +- .../ViewModel/FindPanelViewModel+Find.swift | 2 +- .../ViewModel/FindPanelViewModel+Move.swift | 2 +- .../FindPanelViewModel+Replace.swift | 4 +- .../Find/ViewModel/FindPanelViewModel.swift | 4 +- .../Gutter/GutterView.swift | 6 +- .../HighlightProviderState.swift | 4 +- .../HighlightProviding.swift | 4 +- .../Highlighting/HighlightRange.swift | 2 +- .../Highlighting/Highlighter.swift | 4 +- .../StyledRangeContainer+runsIn.swift | 2 +- .../StyledRangeContainer.swift | 2 +- .../Highlighting/VisibleRangeProvider.swift | 4 +- .../InvisibleCharactersConfiguration.swift | 2 +- .../InvisibleCharactersCoordinator.swift | 6 +- .../LineFoldProviders/LineFoldProvider.swift | 4 +- .../LineIndentationFoldProvider.swift | 4 +- .../LineFolding/Model/FoldRange.swift | 2 +- .../Model/LineFoldCalculator.swift | 4 +- .../LineFolding/Model/LineFoldModel.swift | 4 +- .../LineFolding/Model/LineFoldStorage.swift | 2 +- .../Placeholder/FoldPlaceholderSummary.swift | 2 +- .../Placeholder/LineFoldPlaceholder.swift | 4 +- .../View/LineFoldPlaceholderTracker.swift | 4 +- .../LineFoldRibbonView+Accessibility.swift | 4 +- .../View/LineFoldRibbonView+Draw.swift | 4 +- .../LineFolding/View/LineFoldRibbonView.swift | 4 +- .../RangeStore/RangeStore+Coalesce.swift | 2 +- .../RangeStore/RangeStore+FindIndex.swift | 2 +- .../RangeStore/RangeStore+OffsetMetric.swift | 2 +- .../RangeStore/RangeStore+StoredRun.swift | 2 +- .../RangeStore/RangeStore.swift | 2 +- .../RangeStore/RangeStoreElement.swift | 2 +- .../RangeStore/RangeStoreRun.swift | 2 +- .../SourceEditor/RepresentableSyncPhase.swift | 2 +- .../SourceEditor+Coordinator.swift | 4 +- .../SourceEditor/SourceEditor.swift | 4 +- .../SourceEditor/TextBindingSync.swift | 4 +- ...SourceEditorConfiguration+Appearance.swift | 2 +- .../SourceEditorConfiguration+Behavior.swift | 2 +- .../SourceEditorConfiguration+Layout.swift | 2 +- ...ourceEditorConfiguration+Peripherals.swift | 4 +- .../SourceEditorConfiguration.swift | 2 +- .../SourceEditorState/SourceEditorState.swift | 2 +- .../StatementRunning/StatementRun.swift | 2 +- ...StatementRunRibbonView+Accessibility.swift | 4 +- .../StatementRunRibbonView+Draw.swift | 4 +- .../StatementRunRibbonView.swift | 4 +- .../SupportingViews/BezelNotification.swift | 2 +- .../SupportingViews/EffectView.swift | 0 .../SupportingViews/IconButtonStyle.swift | 0 .../SupportingViews/IconToggleStyle.swift | 0 .../SupportingViews/PanelStyles.swift | 0 .../SupportingViews/PanelTextField.swift | 0 .../SourceEditorClipView.swift | 4 +- .../SourceEditorScrollView.swift | 4 +- .../SourceEditorTextView.swift | 4 +- .../CombineCoordinator.swift | 4 +- .../TextViewCoordinator.swift | 4 +- .../Theme/EditorTheme.swift | 2 +- .../Theme/ThemeAttributesProviding.swift | 2 +- .../TreeSitter/Atomic.swift | 2 +- .../TreeSitter/LanguageLayer.swift | 2 +- .../TreeSitter/TreeSitterClient+Edit.swift | 0 .../TreeSitterClient+Highlight.swift | 2 +- .../TreeSitter/TreeSitterClient+Query.swift | 2 +- .../TreeSitterClient+Temporary.swift | 2 +- .../TreeSitter/TreeSitterClient.swift | 8 +-- .../TreeSitter/TreeSitterExecutor.swift | 2 +- .../TreeSitter/TreeSitterState.swift | 2 +- .../Utils/CursorPosition.swift | 2 +- .../Utils/EmphasisGroup.swift | 2 +- .../Utils/WeakCoordinator.swift | 2 +- .../TableProTextEngine/CodeEditTextView.swift | 11 ++++ .../Cursors/CursorSelectionMode.swift | 2 +- .../Cursors/CursorTimer.swift | 2 +- .../Cursors/CursorView.swift | 2 +- .../EmphasisManager/Emphasis.swift | 2 +- .../EmphasisManager/EmphasisManager.swift | 2 +- .../EmphasisManager/EmphasisStyle.swift | 2 +- .../EmphasisManager/EmphasisToolTips.swift | 2 +- .../Extensions/CGRectArray+BoundingRect.swift | 2 +- .../CTTypesetter+SuggestLineBreak.swift | 2 +- .../Extensions/CharacterSet.swift | 2 +- .../Extensions/GC+ApproximateEqual.swift | 2 +- .../NSBezierPath+CGPathFallback.swift | 2 +- .../NSBezierPath+DrawableBounds.swift | 2 +- .../Extensions/NSBezierPath+SmoothPath.swift | 2 +- .../Extensions/NSColor+Greyscale.swift | 2 +- .../Extensions/NSColor+Hex.swift | 2 +- .../Extensions/NSColor+SafeCGColor.swift | 0 .../Extensions/NSRange+/NSRange+clamped.swift | 2 +- .../Extensions/NSRange+/NSRange+init.swift | 2 +- .../Extensions/NSRange+/NSRange+isEmpty.swift | 2 +- .../NSRange+/NSRange+overlaps.swift | 2 +- .../NSRange+/NSRange+resolved.swift | 2 +- .../NSRange+/NSRange+translate.swift | 2 +- .../Extensions/NSTextStorage+getLine.swift | 2 +- .../Extensions/PixelAligned.swift | 2 +- .../InvisibleCharactersDelegate.swift | 2 +- .../MarkedTextManager/MarkedRanges.swift | 2 +- .../MarkedTextManager/MarkedTextManager.swift | 2 +- .../SpecialCharacters/SpecialCharacter.swift | 2 +- .../SpecialCharacterDisplay.swift | 2 +- .../SpecialCharacterGeometry.swift | 2 +- .../SpecialCharacterMarkRenderer.swift | 2 +- .../SpecialCharacterMarksLayer.swift | 2 +- .../SpecialCharacterStyle.swift | 2 +- .../TextAttachments/TextAttachment.swift | 4 +- .../TextAttachmentManager.swift | 2 +- .../TextAttachmentManagerDelegate.swift | 2 +- .../TextLayoutManager+Edits.swift | 2 +- .../TextLayoutManager+Invalidation.swift | 2 +- .../TextLayoutManager+Iterator.swift | 2 +- .../TextLayoutManager+Layout.swift | 2 +- .../TextLayoutManager+Public.swift | 2 +- .../TextLayoutManager/TextLayoutManager.swift | 2 +- .../TextLayoutManagerDelegate.swift | 2 +- .../TextLayoutManagerRenderDelegate.swift | 2 +- .../TextLayoutManager/TextLayoutUpdate.swift | 2 +- .../ClippedLineDrawing+CoreText.swift | 2 +- .../TextLine/ClippedLineDrawing+Plan.swift | 2 +- .../TextLine/ClippedLineDrawing.swift | 2 +- .../TextLine/LineBreakStrategy.swift | 2 +- .../TextLine/LineFragment.swift | 4 +- .../LineFragmentRenderer+Invisibles.swift | 2 +- .../TextLine/LineFragmentRenderer.swift | 4 +- .../TextLine/LineFragmentView.swift | 2 +- .../TextLine/TextLine.swift | 2 +- .../Typesetter/CTLineTypesetData.swift | 2 +- .../LineFragmentTypesetContext.swift | 2 +- .../TextLine/Typesetter/TypesetContext.swift | 2 +- .../TextLine/Typesetter/Typesetter.swift | 2 +- .../TextLineStorage+Iterator.swift | 2 +- .../TextLineStorage+NSTextStorage.swift | 2 +- .../TextLineStorage+Node.swift | 2 +- .../TextLineStorage+Structs.swift | 2 +- .../TextLineStorage/TextLineStorage.swift | 2 +- .../TextSelectionManager/Destination.swift | 2 +- .../TextSelectionManager/Direction.swift | 2 +- .../SelectionManipulation+Horizontal.swift | 2 +- .../SelectionManipulation+Vertical.swift | 2 +- ...lectionManager+SelectionManipulation.swift | 2 +- .../TextSelectionManager/TextSelection.swift | 2 +- .../TextSelectionManager+Draw.swift | 2 +- .../TextSelectionManager+FillRects.swift | 2 +- .../TextSelectionManager+Move.swift | 2 +- .../TextSelectionManager+Update.swift | 2 +- .../TextSelectionManager.swift | 2 +- .../TextView/DraggingTextRenderer.swift | 2 +- .../TextView/TextView+Accessibility.swift | 2 +- .../TextView/TextView+ColumnSelection.swift | 2 +- .../TextView/TextView+CopyPaste.swift | 2 +- .../TextView/TextView+Delete.swift | 2 +- .../TextView/TextView+Drag.swift | 2 +- .../TextView/TextView+FirstResponder.swift | 2 +- .../TextView/TextView+Insert.swift | 2 +- .../TextView/TextView+KeyDown.swift | 2 +- .../TextView/TextView+Layout.swift | 2 +- .../TextView/TextView+Lifecycle.swift | 2 +- .../TextView/TextView+Menu.swift | 2 +- .../TextView/TextView+Mouse.swift | 2 +- .../TextView/TextView+Move.swift | 2 +- .../TextView/TextView+NSTextInput.swift | 2 +- .../TextView/TextView+ReplaceCharacters.swift | 2 +- .../TextView/TextView+ScrollToVisible.swift | 2 +- .../TextView/TextView+Select.swift | 2 +- .../TextView/TextView+SetText.swift | 2 +- .../TextView/TextView+Setup.swift | 2 +- .../TextView/TextView+StorageDelegate.swift | 2 +- .../TextView+TextLayoutManagerDelegate.swift | 2 +- ...extView+TextSelectionManagerDelegate.swift | 2 +- .../TextView/TextView+UndoRedo.swift | 2 +- .../TextView/TextView.swift | 2 +- .../TextView/TextViewDelegate.swift | 2 +- .../Utils/CEUndoManager.swift | 2 +- .../Utils/HorizontalEdgeInsets.swift | 2 +- .../TableProTextEngine}/Utils/KillRing.swift | 2 +- .../Utils/LineEnding.swift | 2 +- .../TableProTextEngine/Utils/Logger.swift | 3 + .../Utils/MultiStorageDelegate.swift | 2 +- .../Utils/PasteboardTextReader.swift | 2 +- .../Utils/ViewReuseQueue.swift | 2 +- .../TableProTextEngineObjC}/CGContextHidden.m | 2 +- .../include/CGContextHidden.h | 2 +- .../include/module.modulemap | 2 +- .../CaptureModifierSetTests.swift | 2 +- .../CodeEditSourceEditorTests.swift | 4 +- .../CodeSuggestion/SuggestionApplyTests.swift | 2 +- .../SuggestionControllerPlacementTests.swift | 2 +- .../SuggestionCursorsUpdatedTests.swift | 2 +- .../SuggestionPanelFocusTests.swift | 2 +- .../SuggestionShowCompletionsGuardTests.swift | 2 +- .../SuggestionWindowPlacementTests.swift | 2 +- .../TextViewControllerSuggestionsTests.swift | 2 +- .../TextViewController+IndentTests.swift | 6 +- .../TextViewController+MoveLinesTests.swift | 6 +- ...extViewControllerFloatingInsetsTests.swift | 6 +- .../Controller/TextViewControllerTests.swift | 2 +- .../FindPanelTests.swift | 4 +- .../GutterNumberOffsetTests.swift | 6 +- .../HighlightProviderStateTest.swift | 4 +- .../Highlighting/HighlighterTests.swift | 4 +- .../StyledRangeContainerTests.swift | 2 +- .../VisibleRangeProviderTests.swift | 2 +- .../LineFoldAccessibilityTests.swift | 6 +- .../LineFoldChunkBoundaryTests.swift | 6 +- .../LineFoldCollapsePathTests.swift | 6 +- .../LineFoldDocumentSwapTests.swift | 6 +- .../LineFoldingTests/LineFoldHoverTests.swift | 6 +- .../LineFoldPlaceholderClickTests.swift | 6 +- .../LineFoldRibbonLookupTests.swift | 6 +- .../LineFoldStorageTests.swift | 4 +- .../LineFoldingModelTests.swift | 6 +- .../Tests/TableProEditorKitTests}/Mock.swift | 4 +- .../RangeStoreTests.swift | 2 +- .../RepresentableSyncPhaseTests.swift | 2 +- .../SourceEditorBindingSyncTests.swift | 4 +- .../SourceEditorScrollViewTests.swift | 6 +- .../TreeSitterClientTests.swift | 4 +- .../TreeSitterExecutorTests.swift | 2 +- .../AccessibilityTests.swift | 4 +- .../ClippedLineDrawingFixtures.swift | 2 +- .../ClippedLineDrawingRenderingTests.swift | 2 +- .../ClippedLineDrawingTests.swift | 2 +- .../CmdShiftLeftAtEndOfDocumentTests.swift | 2 +- .../CmdUpAtEndOfDocumentTests.swift | 2 +- .../CopyPasteTests.swift | 2 +- .../CutLineTests.swift | 2 +- .../EmphasisGeometryUpdateTests.swift | 2 +- .../EmphasisManagerTests.swift | 2 +- .../IMEInputTests.swift | 2 +- .../KillRingTests.swift | 2 +- ...verridingLayoutManagerRenderingTests.swift | 2 +- .../TextLayoutManagerAttachmentsTests.swift | 4 +- .../TextLayoutManagerFragmentViewTests.swift | 2 +- .../TextLayoutManagerLineWidthTests.swift | 2 +- .../TextLayoutManagerTests.swift | 2 +- .../LineEndingTests.swift | 2 +- .../LineFragmentRendererTests.swift | 2 +- .../LineSeparatorLineModelTests.swift | 2 +- .../MarkedTextTests.swift | 2 +- .../NSBezierPathSmoothPathTests.swift | 2 +- .../NSTextInputRangeGuardTests.swift | 2 +- .../SelectAllWithTrailingNewlineTests.swift | 2 +- .../SelectionBehaviourTests.swift | 2 +- .../SelectionGeometryTests.swift | 2 +- .../SpecialCharacterLayoutTests.swift | 2 +- .../SpecialCharacterTests.swift | 2 +- .../TextInputControlCharacterTests.swift | 2 +- .../TextLayoutLineStorageTests.swift | 2 +- .../TextLineDisplayRangeTests.swift | 2 +- .../TextSelectionManagerTests.swift | 2 +- .../TextViewDragImageTests.swift | 2 +- .../TextViewScrollInsetsTests.swift | 2 +- .../TextViewTests.swift | 2 +- .../TypesetterTests.swift | 2 +- .../VisualLineEndOfDocumentTests.swift | 2 +- .../WordNavigationUnicodeTests.swift | 2 +- .../WordSelectionTests.swift | 2 +- .../InlineSuggestion/GhostTextRenderer.swift | 6 +- .../InlineSuggestionManager.swift | 4 +- .../Infrastructure/ClipboardService.swift | 2 +- .../SQL/InvisibleCharacterRemover.swift | 2 +- .../Core/Utilities/Text/RevealedText.swift | 2 +- TablePro/Core/Vim/VimCursorManager.swift | 6 +- .../Core/Vim/VimEngine+InsertReplace.swift | 2 +- TablePro/Core/Vim/VimEngine+Operators.swift | 2 +- TablePro/Core/Vim/VimKeyInterceptor.swift | 4 +- TablePro/Core/Vim/VimTextBufferAdapter.swift | 6 +- .../Resources/ThirdPartyLicenses/licenses.yml | 19 +++--- TablePro/Theme/ThemeEngine.swift | 4 +- .../Views/AIChat/AIChatCodeBlockView.swift | 2 +- .../Views/Components/SQLReviewSheet.swift | 2 +- TablePro/Views/Editor/EditorEventRouter.swift | 2 +- TablePro/Views/Editor/EditorPeripherals.swift | 2 +- .../Folding/FoldPreviewController.swift | 4 +- .../Editor/Folding/FoldPreviewView.swift | 2 +- .../Editor/Folding/FoldProviderResolver.swift | 2 +- .../Editor/Folding/SQLLineFoldProvider.swift | 4 +- .../Views/Editor/QueryCompletionAdapter.swift | 6 +- .../Editor/QueryDiagnosticsController.swift | 6 +- TablePro/Views/Editor/QueryEditorView.swift | 2 +- ...ditorCoordinator+InvisibleCharacters.swift | 4 +- .../Views/Editor/SQLEditorCoordinator.swift | 6 +- TablePro/Views/Editor/SQLEditorView.swift | 8 +-- .../Views/Editor/StatementRunController.swift | 4 +- .../Views/Editor/TableProEditorTheme.swift | 6 +- .../TextViewController+FindActions.swift | 2 +- TablePro/Views/Import/SQLCodePreview.swift | 4 +- .../Main/Child/MainEditorContentView.swift | 2 +- .../MainContentCoordinator+Explain.swift | 2 +- .../MainContentCoordinator+TabSwitch.swift | 2 +- ...ContentCommandActions+TextInputFocus.swift | 2 +- .../Views/Main/MainContentCoordinator.swift | 2 +- TablePro/Views/Results/JSONCodeEditor.swift | 4 +- TablePro/Views/Structure/DDLTextView.swift | 6 +- .../Views/Structure/TriggerEditorView.swift | 2 +- ...ineSuggestionManagerCompositionTests.swift | 4 +- .../SQL/InvisibleCharacterRemoverTests.swift | 2 +- .../SQL/SQLFoldPlaceholderLabelTests.swift | 2 +- .../Utilities/SQL/StatementBlankTests.swift | 2 +- .../Vim/VimTextBufferAdapterPerfTests.swift | 2 +- .../Editor/PasteHighlightCancelTests.swift | 4 +- .../EditorContextMenuRoutingTests.swift | 2 +- .../Editor/EditorControllerFixture.swift | 4 +- .../EditorKeyMonitorCompositionTests.swift | 4 +- .../Editor/EditorLifecycleTeardownTests.swift | 4 +- .../Editor/EditorPeripheralSurfaceTests.swift | 4 +- .../Views/Editor/EditorPeripheralsTests.swift | 2 +- .../Editor/FoldCommandBehaviourTests.swift | 4 +- .../Views/Editor/FoldGutterLayoutTests.swift | 4 +- .../Editor/FoldPreviewHitTestTests.swift | 4 +- .../Views/Editor/GutterHighlightTests.swift | 4 +- ...QueryCompletionAdapterLifecycleTests.swift | 4 +- .../Editor/QueryDiagnosticsRefreshTests.swift | 4 +- .../Editor/QueryEditorLargePasteTests.swift | 6 +- ...emoveInvisibleCharactersCommandTests.swift | 4 +- .../Editor/SQLEditorLongLineScrollTests.swift | 4 +- .../Editor/SQLFoldPerformanceGuardTests.swift | 4 +- .../StatementNavigationCommandTests.swift | 4 +- .../Editor/StatementRunControllerTests.swift | 4 +- .../StatementRunPerformanceGuardTests.swift | 4 +- .../Editor/SyntaxHighlightingTests.swift | 2 +- .../Editor/TypesetterWrapLengthTests.swift | 4 +- ...nContentCoordinatorDisplayStateTests.swift | 2 +- ...MainContentCoordinatorTabSwitchTests.swift | 2 +- ...ContentCoordinatorTableMetadataTests.swift | 2 +- docs/development/architecture.mdx | 3 +- docs/development/building.mdx | 2 +- docs/development/code-style.mdx | 10 ++-- docs/development/setup.mdx | 5 +- project.yml | 12 ++-- scripts/check-doc-symbols.sh | 2 +- 429 files changed, 714 insertions(+), 748 deletions(-) delete mode 100644 LocalPackages/CodeEditSourceEditor/Package.swift delete mode 100644 LocalPackages/CodeEditTextView/Package.resolved delete mode 100644 LocalPackages/CodeEditTextView/Package.swift delete mode 100644 LocalPackages/CodeEditTextView/Sources/CodeEditTextView/CodeEditTextView.swift delete mode 100644 LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/Logger.swift rename LocalPackages/CodeEditSourceEditor/LICENSE.md => Packages/TableProEditor/LICENSE-CodeEditSourceEditor.md (100%) rename LocalPackages/CodeEditTextView/LICENSE.md => Packages/TableProEditor/LICENSE-CodeEditTextView.md (100%) create mode 100644 Packages/TableProEditor/ORIGIN.md rename {LocalPackages/CodeEditSourceEditor => Packages/TableProEditor}/Package.resolved (95%) create mode 100644 Packages/TableProEditor/Package.swift rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/CodeSuggestion/Model/CodeSuggestionDelegate.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/CodeSuggestion/Model/CodeSuggestionEntry.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/CodeSuggestion/Model/SuggestionTriggerCharacterModel.swift (93%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/CodeSuggestion/Model/SuggestionViewModel.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/CodeSuggestion/View/CodeSuggestionLabelView.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/CodeSuggestion/View/SuggestionContentView.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/CodeSuggestion/View/SuggestionPreviewView.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/CodeSuggestion/Window/SuggestionController+Window.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/CodeSuggestion/Window/SuggestionController.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/CodeSuggestion/Window/SuggestionWindowPlacement.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/CodeSuggestion/Window/TextViewController+Suggestions.swift (96%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/EditorKeyCommand.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+Cursor.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+EmphasizeBracket.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+FindPanelTarget.swift (94%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+Folding.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+GutterViewDelegate.swift (91%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+Highlighter.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+IndentLines.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+Lifecycle.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+LineOperations.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+MoveLines.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+ReloadUI.swift (92%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+StatementRunning.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+StyleViews.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+TextFormation.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+TextViewDelegate.swift (96%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+ToggleComment.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+ToggleCommentCache.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController+UnfilteredEdits.swift (95%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Controller/TextViewController.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Enums/BracketPairEmphasis.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Enums/BracketPairs.swift (96%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Enums/CaptureModifier.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Enums/CaptureModifierSet.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Enums/CaptureName.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Enums/IndentOption.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/Color+Hex.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/DispatchQueue+dispatchMainIfNot.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/IndexSet+NSRange.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/NSBezierPath+RoundedCorners.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/NSColor+LightDark.swift (94%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/NSEdgeInsets/NSEdgeInsets+Equatable.swift (93%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/NSEdgeInsets/NSEdgeInsets+Helpers.swift (90%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/NSFont/NSFont+CharWidth.swift (89%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/NSFont/NSFont+LineHeight.swift (84%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/NSFont/NSFont+RulerFont.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/NSRange+/NSRange+InputEdit.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/NSRange+/NSRange+NSTextRange.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/NSRange+/NSRange+String.swift (95%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/NSRange+/NSRange+TSRange.swift (92%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/NSRange+/NSRange+isEmpty.swift (86%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/NSRect+Transform.swift (94%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/NSString+TextStory.swift (94%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/Node+filterChildren.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/Range+Length.swift (95%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/Result+ThrowOrReturn.swift (94%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/String+/String+Groups.swift (96%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/String+/String+encoding.swift (93%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/TextMutation+isEmpty.swift (93%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/TextView+/TextView+Menu.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/TextView+/TextView+Point.swift (89%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/TextView+/TextView+TextFormation.swift (96%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/TextView+/TextView+createReadBlock.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Extensions/Tree+prettyPrint.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Filters/DeleteWhitespaceFilter.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Filters/TabReplacementFilter.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/FindMethod.swift (95%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/FindPanelMode.swift (92%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/FindPanelTarget.swift (91%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/FindViewController+Toggle.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/FindViewController.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/PanelView/FindControls.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/PanelView/FindMethodPicker.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/PanelView/FindModePicker.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/PanelView/FindPanelContent.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/PanelView/FindPanelHostingView.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/PanelView/FindPanelView.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/PanelView/FindSearchField.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/PanelView/ReplaceControls.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/PanelView/ReplaceSearchField.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/ViewModel/FindPanelViewModel+Emphasis.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/ViewModel/FindPanelViewModel+Find.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/ViewModel/FindPanelViewModel+Move.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/ViewModel/FindPanelViewModel+Replace.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Find/ViewModel/FindPanelViewModel.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Gutter/GutterView.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Highlighting/HighlightProviding/HighlightProviderState.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Highlighting/HighlightProviding/HighlightProviding.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Highlighting/HighlightRange.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Highlighting/Highlighter.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Highlighting/StyledRangeContainer/StyledRangeContainer+runsIn.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Highlighting/StyledRangeContainer/StyledRangeContainer.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Highlighting/VisibleRangeProvider.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/InvisibleCharacters/InvisibleCharactersConfiguration.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/InvisibleCharacters/InvisibleCharactersCoordinator.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/LineFolding/LineFoldProviders/LineFoldProvider.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/LineFolding/LineFoldProviders/LineIndentationFoldProvider.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/LineFolding/Model/FoldRange.swift (92%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/LineFolding/Model/LineFoldCalculator.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/LineFolding/Model/LineFoldModel.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/LineFolding/Model/LineFoldStorage.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/LineFolding/Placeholder/FoldPlaceholderSummary.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/LineFolding/Placeholder/LineFoldPlaceholder.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/LineFolding/View/LineFoldPlaceholderTracker.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/LineFolding/View/LineFoldRibbonView+Accessibility.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/LineFolding/View/LineFoldRibbonView+Draw.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/LineFolding/View/LineFoldRibbonView.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/RangeStore/RangeStore+Coalesce.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/RangeStore/RangeStore+FindIndex.swift (96%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/RangeStore/RangeStore+OffsetMetric.swift (94%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/RangeStore/RangeStore+StoredRun.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/RangeStore/RangeStore.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/RangeStore/RangeStoreElement.swift (86%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/RangeStore/RangeStoreRun.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SourceEditor/RepresentableSyncPhase.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SourceEditor/SourceEditor+Coordinator.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SourceEditor/SourceEditor.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SourceEditor/TextBindingSync.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SourceEditorConfiguration/SourceEditorConfiguration+Appearance.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SourceEditorConfiguration/SourceEditorConfiguration+Behavior.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SourceEditorConfiguration/SourceEditorConfiguration+Layout.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SourceEditorConfiguration/SourceEditorConfiguration+Peripherals.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SourceEditorConfiguration/SourceEditorConfiguration.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SourceEditorState/SourceEditorState.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/StatementRunning/StatementRun.swift (95%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/StatementRunning/StatementRunRibbonView+Accessibility.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/StatementRunning/StatementRunRibbonView+Draw.swift (96%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/StatementRunning/StatementRunRibbonView.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SupportingViews/BezelNotification.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SupportingViews/EffectView.swift (100%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SupportingViews/IconButtonStyle.swift (100%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SupportingViews/IconToggleStyle.swift (100%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SupportingViews/PanelStyles.swift (100%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SupportingViews/PanelTextField.swift (100%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SupportingViews/SourceEditorClipView.swift (96%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SupportingViews/SourceEditorScrollView.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/SupportingViews/SourceEditorTextView.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/TextViewCoordinator/CombineCoordinator.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/TextViewCoordinator/TextViewCoordinator.swift (96%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Theme/EditorTheme.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Theme/ThemeAttributesProviding.swift (93%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/TreeSitter/Atomic.swift (96%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/TreeSitter/LanguageLayer.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/TreeSitter/TreeSitterClient+Edit.swift (100%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/TreeSitter/TreeSitterClient+Highlight.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/TreeSitter/TreeSitterClient+Query.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/TreeSitter/TreeSitterClient+Temporary.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/TreeSitter/TreeSitterClient.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/TreeSitter/TreeSitterExecutor.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/TreeSitter/TreeSitterState.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Utils/CursorPosition.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Utils/EmphasisGroup.swift (87%) rename {LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor => Packages/TableProEditor/Sources/TableProEditorKit}/Utils/WeakCoordinator.swift (94%) create mode 100644 Packages/TableProEditor/Sources/TableProTextEngine/CodeEditTextView.swift rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Cursors/CursorSelectionMode.swift (86%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Cursors/CursorTimer.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Cursors/CursorView.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/EmphasisManager/Emphasis.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/EmphasisManager/EmphasisManager.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/EmphasisManager/EmphasisStyle.swift (97%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/EmphasisManager/EmphasisToolTips.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/CGRectArray+BoundingRect.swift (95%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/CTTypesetter+SuggestLineBreak.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/CharacterSet.swift (93%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/GC+ApproximateEqual.swift (97%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/NSBezierPath+CGPathFallback.swift (97%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/NSBezierPath+DrawableBounds.swift (95%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/NSBezierPath+SmoothPath.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/NSColor+Greyscale.swift (95%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/NSColor+Hex.swift (94%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/NSColor+SafeCGColor.swift (100%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/NSRange+/NSRange+clamped.swift (96%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/NSRange+/NSRange+init.swift (90%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/NSRange+/NSRange+isEmpty.swift (88%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/NSRange+/NSRange+overlaps.swift (95%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/NSRange+/NSRange+resolved.swift (97%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/NSRange+/NSRange+translate.swift (91%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/NSTextStorage+getLine.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Extensions/PixelAligned.swift (95%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/InvisibleCharacters/InvisibleCharactersDelegate.swift (95%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/MarkedTextManager/MarkedRanges.swift (93%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/MarkedTextManager/MarkedTextManager.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/SpecialCharacters/SpecialCharacter.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/SpecialCharacters/SpecialCharacterDisplay.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/SpecialCharacters/SpecialCharacterGeometry.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/SpecialCharacters/SpecialCharacterMarkRenderer.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/SpecialCharacters/SpecialCharacterMarksLayer.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/SpecialCharacters/SpecialCharacterStyle.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLayoutManager/TextAttachments/TextAttachment.swift (93%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLayoutManager/TextAttachments/TextAttachmentManager.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLayoutManager/TextAttachments/TextAttachmentManagerDelegate.swift (93%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLayoutManager/TextLayoutManager+Edits.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLayoutManager/TextLayoutManager+Invalidation.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLayoutManager/TextLayoutManager+Iterator.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLayoutManager/TextLayoutManager+Layout.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLayoutManager/TextLayoutManager+Public.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLayoutManager/TextLayoutManager.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLayoutManager/TextLayoutManagerDelegate.swift (97%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLayoutManager/TextLayoutManagerRenderDelegate.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLayoutManager/TextLayoutUpdate.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLine/ClippedLineDrawing+CoreText.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLine/ClippedLineDrawing+Plan.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLine/ClippedLineDrawing.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLine/LineBreakStrategy.swift (93%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLine/LineFragment.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLine/LineFragmentRenderer+Invisibles.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLine/LineFragmentRenderer.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLine/LineFragmentView.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLine/TextLine.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLine/Typesetter/CTLineTypesetData.swift (92%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLine/Typesetter/LineFragmentTypesetContext.swift (95%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLine/Typesetter/TypesetContext.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLine/Typesetter/Typesetter.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLineStorage/TextLineStorage+Iterator.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLineStorage/TextLineStorage+NSTextStorage.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLineStorage/TextLineStorage+Node.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLineStorage/TextLineStorage+Structs.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextLineStorage/TextLineStorage.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextSelectionManager/Destination.swift (92%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextSelectionManager/Direction.swift (90%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextSelectionManager/SelectionManipulation/SelectionManipulation+Horizontal.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextSelectionManager/SelectionManipulation/SelectionManipulation+Vertical.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextSelectionManager/SelectionManipulation/TextSelectionManager+SelectionManipulation.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextSelectionManager/TextSelection.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextSelectionManager/TextSelectionManager+Draw.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextSelectionManager/TextSelectionManager+FillRects.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextSelectionManager/TextSelectionManager+Move.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextSelectionManager/TextSelectionManager+Update.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextSelectionManager/TextSelectionManager.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/DraggingTextRenderer.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+Accessibility.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+ColumnSelection.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+CopyPaste.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+Delete.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+Drag.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+FirstResponder.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+Insert.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+KeyDown.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+Layout.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+Lifecycle.swift (97%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+Menu.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+Mouse.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+Move.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+NSTextInput.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+ReplaceCharacters.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+ScrollToVisible.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+Select.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+SetText.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+Setup.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+StorageDelegate.swift (94%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+TextLayoutManagerDelegate.swift (97%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+TextSelectionManagerDelegate.swift (93%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView+UndoRedo.swift (96%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextView.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/TextView/TextViewDelegate.swift (97%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Utils/CEUndoManager.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Utils/HorizontalEdgeInsets.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Utils/KillRing.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Utils/LineEnding.swift (99%) create mode 100644 Packages/TableProEditor/Sources/TableProTextEngine/Utils/Logger.swift rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Utils/MultiStorageDelegate.swift (98%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Utils/PasteboardTextReader.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextView => Packages/TableProEditor/Sources/TableProTextEngine}/Utils/ViewReuseQueue.swift (99%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextViewObjC => Packages/TableProEditor/Sources/TableProTextEngineObjC}/CGContextHidden.m (92%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextViewObjC => Packages/TableProEditor/Sources/TableProTextEngineObjC}/include/CGContextHidden.h (90%) rename {LocalPackages/CodeEditTextView/Sources/CodeEditTextViewObjC => Packages/TableProEditor/Sources/TableProTextEngineObjC}/include/module.modulemap (50%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/CaptureModifierSetTests.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/CodeEditSourceEditorTests.swift (92%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/CodeSuggestion/SuggestionApplyTests.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/CodeSuggestion/SuggestionControllerPlacementTests.swift (96%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/CodeSuggestion/SuggestionCursorsUpdatedTests.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/CodeSuggestion/SuggestionPanelFocusTests.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/CodeSuggestion/SuggestionShowCompletionsGuardTests.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/CodeSuggestion/SuggestionWindowPlacementTests.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/CodeSuggestion/TextViewControllerSuggestionsTests.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/Controller/TextViewController+IndentTests.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/Controller/TextViewController+MoveLinesTests.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/Controller/TextViewControllerFloatingInsetsTests.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/Controller/TextViewControllerTests.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/FindPanelTests.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/GutterNumberOffsetTests.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/Highlighting/HighlightProviderStateTest.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/Highlighting/HighlighterTests.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/Highlighting/StyledRangeContainerTests.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/Highlighting/VisibleRangeProviderTests.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/LineFoldingTests/LineFoldAccessibilityTests.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/LineFoldingTests/LineFoldChunkBoundaryTests.swift (96%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/LineFoldingTests/LineFoldCollapsePathTests.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/LineFoldingTests/LineFoldDocumentSwapTests.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/LineFoldingTests/LineFoldHoverTests.swift (98%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/LineFoldingTests/LineFoldPlaceholderClickTests.swift (93%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/LineFoldingTests/LineFoldRibbonLookupTests.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/LineFoldingTests/LineFoldStorageTests.swift (96%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/LineFoldingTests/LineFoldingModelTests.swift (96%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/Mock.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/RangeStoreTests.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/RepresentableSyncPhaseTests.swift (97%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/SourceEditorBindingSyncTests.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/SourceEditorScrollViewTests.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/TreeSitterClientTests.swift (99%) rename {LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests => Packages/TableProEditor/Tests/TableProEditorKitTests}/TreeSitterExecutorTests.swift (98%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/AccessibilityTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/ClippedLineDrawingFixtures.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/ClippedLineDrawingRenderingTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/ClippedLineDrawingTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/CmdShiftLeftAtEndOfDocumentTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/CmdUpAtEndOfDocumentTests.swift (98%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/CopyPasteTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/CutLineTests.swift (98%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/EmphasisGeometryUpdateTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/EmphasisManagerTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/IMEInputTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/KillRingTests.swift (98%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/LayoutManager/OverridingLayoutManagerRenderingTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/LayoutManager/TextLayoutManagerAttachmentsTests.swift (98%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/LayoutManager/TextLayoutManagerFragmentViewTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/LayoutManager/TextLayoutManagerLineWidthTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/LayoutManager/TextLayoutManagerTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/LineEndingTests.swift (98%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/LineFragmentRendererTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/LineSeparatorLineModelTests.swift (98%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/MarkedTextTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/NSBezierPathSmoothPathTests.swift (96%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/NSTextInputRangeGuardTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/SelectAllWithTrailingNewlineTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/SelectionBehaviourTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/SelectionGeometryTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/SpecialCharacterLayoutTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/SpecialCharacterTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/TextInputControlCharacterTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/TextLayoutLineStorageTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/TextLineDisplayRangeTests.swift (97%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/TextSelectionManagerTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/TextViewDragImageTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/TextViewScrollInsetsTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/TextViewTests.swift (98%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/TypesetterTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/VisualLineEndOfDocumentTests.swift (98%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/WordNavigationUnicodeTests.swift (99%) rename {LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests => Packages/TableProEditor/Tests/TableProTextEngineTests}/WordSelectionTests.swift (99%) diff --git a/.claude/skills/fix-issue/references/verification.md b/.claude/skills/fix-issue/references/verification.md index fc27525ea2..4858c7f0e8 100644 --- a/.claude/skills/fix-issue/references/verification.md +++ b/.claude/skills/fix-issue/references/verification.md @@ -129,7 +129,7 @@ The `DEVELOPER_DIR` export above is required; without it SwiftLint aborts with ` Two things to know: -- **SwiftLint's `included:` scope is `TablePro` only.** `Plugins/`, `LocalPackages/`, and the test targets are never linted by a bare `swiftlint lint`. Pass explicit paths to lint a change outside the app target. +- **SwiftLint's `included:` scope is `TablePro` and `Packages`.** The rest of `Plugins/` and the app's test targets are never linted by a bare `swiftlint lint`. Pass explicit paths to lint a change outside that scope. - **Local `swiftformat` is a version behind the repo `.swiftformat`** and rejects `--ifdefindent`, so it cannot run here. Rely on SwiftLint plus reading the diff. - **Never remove a `swiftlint:disable force_unwrapping` comment** to satisfy a local run. There are five of them, inline in four files, not in the config: `.swiftlint.yml` enables the rule as an opt-in and sets it to `warning`. The CI toolchain differs from this one, so a disable that looks unnecessary here is load-bearing there. diff --git a/.github/workflows/macos-tests.yml b/.github/workflows/macos-tests.yml index d8c9b96b3f..ba5257b1fc 100644 --- a/.github/workflows/macos-tests.yml +++ b/.github/workflows/macos-tests.yml @@ -12,7 +12,6 @@ on: - "TablePro/**" - "Plugins/**" - "Packages/**" - - "LocalPackages/**" - "TableProTests/**" - "TableProUITests/**" - "Native/**" @@ -95,7 +94,7 @@ jobs: --base "$BASE_SHA" \ --ref "$REF" \ --skip-release-commit \ - 'TablePro/' 'Plugins/' 'Packages/' 'LocalPackages/' \ + 'TablePro/' 'Plugins/' 'Packages/' \ 'TableProTests/' 'TableProUITests/' 'Native/' 'Configs/' 'Libs/' 'scripts/' \ '\.github/actions/' '\.github/macos-(ui-)?test-quarantine\.txt$' \ 'TablePro\.xcodeproj/project\.xcworkspace/xcshareddata/swiftpm/Package\.resolved$' \ @@ -145,16 +144,12 @@ jobs: if: needs.changes.outputs.oracle == 'true' run: swift test --package-path Packages/TableProOracle --force-resolved-versions - - name: Run CodeEditTextView package tests - run: swift test --package-path LocalPackages/CodeEditTextView --force-resolved-versions - # The editor's own suites, 111 XCTest cases and 102 Swift Testing cases, roughly half of them - # TablePro's. Two XCTest cases skip themselves on a headless runner (no screen, no key window), - # so the expected result is 111 executed with 2 skipped. Pinned to the tracked Package.resolved - # like its siblings; note that this package and CodeEditTextView are path-linked, so a - # SwiftTreeSitter bump has to land in both lockfiles or this step fails rather than floating. - - name: Run CodeEditSourceEditor package tests - run: swift test --package-path LocalPackages/CodeEditSourceEditor --force-resolved-versions + # The editor, both targets. Two XCTest cases skip themselves on a headless runner (no screen, + # no key window), so the expected result is 112 executed with 2 skipped, plus 102 Swift Testing + # cases. Pinned to the tracked Package.resolved like its siblings. + - name: Run TableProEditor package tests + run: swift test --package-path Packages/TableProEditor --force-resolved-versions # Compiles the app, both test bundles and all 31 plugins once, then hands the products to the # test jobs. That build used to happen inside the same job that ran the tests, which meant the diff --git a/.gitignore b/.gitignore index 1fed5acda7..8b135f85f7 100644 --- a/.gitignore +++ b/.gitignore @@ -63,7 +63,6 @@ playground.xcworkspace .swiftpm/ .build/ -LocalPackages/*/Example/**/Package.resolved # Coverage profile output *.profraw diff --git a/CLAUDE.md b/CLAUDE.md index dd7d6cf652..3101c268bd 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -26,9 +26,9 @@ TablePro is a native macOS database client (SwiftUI + AppKit), a fast, lightweig - **Registry-only** (the other 23): MongoDB, Oracle, DuckDB, MSSQL, Cassandra, Etcd, CloudflareD1, CloudflareR2SQL, DynamoDB, BigQuery, Spanner, LibSQL, Snowflake, Elasticsearch, Typesense, Beancount, SurrealDB, Teradata, Trino, Dameng, Kafka, Weaviate, Parquet export. Parquet is registry-only because it links its own copy of DuckDB, which does the encoding, and that is too large to ship in the app for one format. Distributed via [TableProApp/plugins](https://github.com/TableProApp/plugins) `plugins.json`, installed into the user plugins directory. - **C bridges**: Each plugin contains its own C bridge module (e.g., `Plugins/MySQLDriverPlugin/CMariaDB/`, `Plugins/PostgreSQLDriverPlugin/CLibPQ/`) - **Static libs**: `Libs/` holds pre-built `.a` files and `Libs/ios/` holds the iOS xcframeworks. Both are downloaded by `scripts/download-libs.sh` and are not in git. -- **SPM deps**: declared in `project.yml`. Vendored forks under `LocalPackages/` (CodeEditSourceEditor, CodeEditTextView) and TablePro's own packages under `Packages/` (TableProCore, TableProOracle, TableProGrammars); remote packages are Sparkle, swift-certificates and Yams. Revisions are pinned by the tracked `Package.resolved` inside each generated `.xcodeproj`. +- **SPM deps**: declared in `project.yml`. Every local package lives under `Packages/` (TableProCore, TableProOracle, TableProEditor, TableProGrammars); remote packages are Sparkle, swift-certificates and Yams. Revisions are pinned by the tracked `Package.resolved` inside each generated `.xcodeproj`. - `Packages/TableProGrammars` is first-party code, not a fork. It holds TablePro's `CodeLanguage`, `GrammarID` and `HighlightQueries` plus the four tree-sitter grammars the app compiles (bash, javascript, json, sql), each with its own upstream MIT licence beside its sources and a record in `licenses.yml`. Every `GrammarID` case but `plainText` resolves to a parser, and a test asserts it: the enum is the list of grammars that ship, not a list of languages tree-sitter supports. - - `SWIFT_VERSION` in `Configs/Base.xcconfig` sets the language mode for the Xcode-native targets only. A SwiftPM package takes its mode from its own manifest, so `Packages/TableProCore` and `Packages/TableProOracle` carry `swift-tools-version: 6.0` of their own. The vendored `LocalPackages/` forks stay on 5.9 so they can still take upstream changes, and a remote dependency keeps whatever its own manifest says. Never pass `SWIFT_VERSION=` on an `xcodebuild` command line to test a language-mode change: the override reaches the package targets too and reports their errors as yours. + - `SWIFT_VERSION` in `Configs/Base.xcconfig` sets the language mode for the Xcode-native targets only. A SwiftPM package takes its mode from its own manifest, so every package under `Packages/` carries `swift-tools-version: 6.0` of its own, and a remote dependency keeps whatever its own manifest says. `TableProEditor` sets `.swiftLanguageMode(.v5)` on its targets: the manifest is current but the code has not been through the Swift 6 concurrency migration yet, and that is a change with its own tests rather than a side effect of a move. Never pass `SWIFT_VERSION=` on an `xcodebuild` command line to test a language-mode change: the override reaches the package targets too and reports their errors as yours. ## Build & Development Commands @@ -156,14 +156,14 @@ When adding a new method to the driver protocol: add to `PluginDatabaseDriver` ( - Unknown types (from future plugins) are valid, they round-trip through Codable - Use `DatabaseType.allKnownTypes` (not `allCases`) for the canonical list -### Editor Architecture (CodeEditSourceEditor) +### Editor Architecture (TableProEditor) - **`ThemeEngine`**: the `@Observable` singleton that owns the active theme, and the single source of truth for editor colors and fonts - **Two font domains, and a control never names a third**: `editorFonts` is the Editor Font setting and belongs to a view that also wears the editor's background, text color and syntax palette (the SQL editor, `JSONCodeEditor`, the fold and import previews). Every control that shows or edits a stored *value* takes `ThemeEngine.valueFont` / `valueFontSwiftUI`, which is the Data Grid Font setting, so one value reads the same in the grid cell, its inline editor, the row inspector, a cell popover and a pop-out window. Naming a system text style instead is the defect: it looks right only while the user leaves both settings equal, which is the default, so it ships invisibly (#2393). The inspector sets it once for the whole editor subtree in `InspectorFieldRow`, past the field label and the value menu, so a new field editor inherits it. The switch that decides it is exhaustive over `FieldEditorKind` on purpose: two `default`-armed switches are what let `.typePicker` escape the domain and render a structure row's Name and Type in two different fonts. AppKit will not honour it on a `Picker(.menu)`'s items, which `NSMenu` draws itself; that is the one place the rule stops. -- **`TableProEditorTheme`**: adapter to CodeEdit's `EditorTheme` protocol; `ThemeEngine.makeEditorTheme()` builds it -- **`CompletionEngine`**: framework-agnostic; **`QueryCompletionAdapter`** bridges to CodeEdit's `CodeSuggestionDelegate` +- **`TableProEditorTheme`**: adapter to `TableProEditorKit`'s `EditorTheme` protocol; `ThemeEngine.makeEditorTheme()` builds it +- **`CompletionEngine`**: framework-agnostic; **`QueryCompletionAdapter`** bridges to `TableProEditorKit`'s `CodeSuggestionDelegate` - Editor tabs are drawn by `EditorTabStrip`, not by native window tabs. A window belongs to exactly one `NSWindow` tab group and that group's bar shows every window in it, so a window hosting several connections could only ever show all of their tabs interleaved. Window tabbing itself stays on AppKit's terms: `TabWindowController` leaves `tabbingMode` at `.automatic`, which is the user's own System Settings preference, and never forces `.preferred`. -- Cursor model: `cursorPositions: [CursorPosition]` (multi-cursor via CodeEditSourceEditor) +- Cursor model: `cursorPositions: [CursorPosition]` (multi-cursor via `TableProEditorKit`) ### Change Tracking Flow @@ -339,7 +339,7 @@ These are **non-negotiable**, never skip them: 4. **Tests**: Every change with testable behavior must include or update unit/function tests. UI and user-flow changes should add or update `TableProUITests` UI automation where the flow runs deterministically; if it can't, note why in the PR description. When tests fail, fix the source code, never adjust tests to match incorrect output. Tests define expected behavior. -5. **Lint after changes**: Run `swiftlint lint --strict` to verify compliance. `.swiftlint.yml` sets `included: [TablePro]`, so a bare run never sees `Plugins/`, `Packages/`, `LocalPackages/` or the test targets. Pass those paths explicitly when your change is outside the app target, or the run passes while your code is broken. +5. **Lint after changes**: Run `swiftlint lint --strict` to verify compliance. `.swiftlint.yml` sets `included: [TablePro, Packages]`, so a bare run covers the app and every local package, including `TableProPluginKit` through the symlink in `TableProCore`. It still does not see the rest of `Plugins/` or the app's test bundles: pass those paths explicitly when your change is outside that scope, or the run passes while your code is broken. 6. **Commit messages**: Follow [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/). Single line only, no description body. Format: `(): `. Scope is optional but preferred when the change has a clear domain. Use `!` after type or scope for breaking changes (e.g. `refactor(ai-providers)!: drop OpenAI legacy completion endpoint`). diff --git a/LocalPackages/CodeEditSourceEditor/Package.swift b/LocalPackages/CodeEditSourceEditor/Package.swift deleted file mode 100644 index c0ca39260e..0000000000 --- a/LocalPackages/CodeEditSourceEditor/Package.swift +++ /dev/null @@ -1,49 +0,0 @@ -// swift-tools-version: 5.9 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "CodeEditSourceEditor", - platforms: [.macOS(.v13)], - products: [ - // A source editor with useful features for code editing. - .library( - name: "CodeEditSourceEditor", - targets: ["CodeEditSourceEditor"] - ) - ], - dependencies: [ - // A fast, efficient, text view for code (local override). - .package(path: "../CodeEditTextView"), - // The grammars TablePro ships. - .package(path: "../../Packages/TableProGrammars"), - // Rules for indentation, pair completion, whitespace - .package( - url: "https://github.com/ChimeHQ/TextFormation", - from: "0.8.2" - ), - .package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.0.0") - ], - targets: [ - // A source editor with useful features for code editing. - .target( - name: "CodeEditSourceEditor", - dependencies: [ - "CodeEditTextView", - "TableProGrammars", - "TextFormation" - ] - ), - - // Tests for the source editor - .testTarget( - name: "CodeEditSourceEditorTests", - dependencies: [ - "CodeEditSourceEditor", - "TableProGrammars", - .product(name: "CustomDump", package: "swift-custom-dump") - ] - ), - ] -) diff --git a/LocalPackages/CodeEditTextView/Package.resolved b/LocalPackages/CodeEditTextView/Package.resolved deleted file mode 100644 index 4663674eb2..0000000000 --- a/LocalPackages/CodeEditTextView/Package.resolved +++ /dev/null @@ -1,32 +0,0 @@ -{ - "pins" : [ - { - "identity" : "rearrange", - "kind" : "remoteSourceControl", - "location" : "https://github.com/ChimeHQ/Rearrange", - "state" : { - "revision" : "4de8be41dba304192e87dc0a11e0aa39e72aa2e8", - "version" : "2.1.1" - } - }, - { - "identity" : "swift-collections", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-collections.git", - "state" : { - "revision" : "a0cb0954ecb21e4e31b0070e6ed5674e8556685a", - "version" : "1.6.0" - } - }, - { - "identity" : "textstory", - "kind" : "remoteSourceControl", - "location" : "https://github.com/ChimeHQ/TextStory", - "state" : { - "revision" : "a52db1a2eca74d37c8c19bf3165416941632ed45", - "version" : "0.9.2" - } - } - ], - "version" : 2 -} diff --git a/LocalPackages/CodeEditTextView/Package.swift b/LocalPackages/CodeEditTextView/Package.swift deleted file mode 100644 index 7d4306fe16..0000000000 --- a/LocalPackages/CodeEditTextView/Package.swift +++ /dev/null @@ -1,53 +0,0 @@ -// swift-tools-version: 5.9 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "CodeEditTextView", - platforms: [.macOS(.v13)], - products: [ - // A Fast, Efficient text view for code. - .library( - name: "CodeEditTextView", - targets: ["CodeEditTextView"] - ), - ], - dependencies: [ - // Text mutation, storage helpers - .package( - url: "https://github.com/ChimeHQ/TextStory", - from: "0.9.0" - ), - // Useful data structures - .package( - url: "https://github.com/apple/swift-collections.git", - .upToNextMajor(from: "1.0.0") - ) - ], - targets: [ - // The main text view target. - .target( - name: "CodeEditTextView", - dependencies: [ - "TextStory", - .product(name: "Collections", package: "swift-collections"), - "CodeEditTextViewObjC" - ] - ), - - // ObjC addons - .target( - name: "CodeEditTextViewObjC", - publicHeadersPath: "include" - ), - - // Tests for the text view - .testTarget( - name: "CodeEditTextViewTests", - dependencies: [ - "CodeEditTextView" - ] - ), - ] -) diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/CodeEditTextView.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/CodeEditTextView.swift deleted file mode 100644 index b190f6c390..0000000000 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/CodeEditTextView.swift +++ /dev/null @@ -1,11 +0,0 @@ -/// This file is purely for helping in the transition from `CodeEditTextView` to `CodeEditSourceEditor` -/// The struct here is an empty view, and will be removed in a future release. - -import SwiftUI - -@available(*, unavailable, renamed: "CodeEditSourceEditor", message: "CodeEditTextView has moved to https://github.com/CodeEditApp/CodeEditSourceEditor, please update any dependencies to use this new repository URL.") -struct CodeEditTextView: View { - var body: some View { - EmptyView() - } -} diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/Logger.swift b/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/Logger.swift deleted file mode 100644 index 543b8e5d7b..0000000000 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/Logger.swift +++ /dev/null @@ -1,3 +0,0 @@ -import os - -let logger = Logger(subsystem: "com.CodeEdit.CodeEditTextView", category: "TextView") diff --git a/LocalPackages/CodeEditSourceEditor/LICENSE.md b/Packages/TableProEditor/LICENSE-CodeEditSourceEditor.md similarity index 100% rename from LocalPackages/CodeEditSourceEditor/LICENSE.md rename to Packages/TableProEditor/LICENSE-CodeEditSourceEditor.md diff --git a/LocalPackages/CodeEditTextView/LICENSE.md b/Packages/TableProEditor/LICENSE-CodeEditTextView.md similarity index 100% rename from LocalPackages/CodeEditTextView/LICENSE.md rename to Packages/TableProEditor/LICENSE-CodeEditTextView.md diff --git a/Packages/TableProEditor/ORIGIN.md b/Packages/TableProEditor/ORIGIN.md new file mode 100644 index 0000000000..cbf2c14b0f --- /dev/null +++ b/Packages/TableProEditor/ORIGIN.md @@ -0,0 +1,52 @@ +# TableProEditor + +The SQL editor: the text engine, its layout and selection, syntax highlighting, folding, the gutter +and the completion window. It began as two packages from the +[CodeEdit](https://github.com/CodeEditApp) project and TablePro has diverged from both far enough +that they are no longer upstreamable as a whole. + +| Target | Vendored from | Licence | +| --- | --- | --- | +| `TableProTextEngine`, `TableProTextEngineObjC` | https://github.com/CodeEditApp/CodeEditTextView at `d7ac3f11f` (2025-07-30) | MIT, `LICENSE-CodeEditTextView.md` | +| `TableProEditorKit` | https://github.com/CodeEditApp/CodeEditSourceEditor at `1fa4d3c3f` (2025-12-31) | MIT, `LICENSE-CodeEditSourceEditor.md` | + +Both were vendored in 2026-03 at what was then upstream's tip, and upstream has landed nothing since. + +## Why it is one package and not two + +Upstream split the engine from the editor because they are two products. Here they are one: 32% of +the commits that touched either touched both, and the strongest co-change pair in the repository is +`TableProEditorKit`'s controller against `TableProTextEngine`'s text view, which the old boundary put +on opposite sides. The targets keep the layering the split was for, and SwiftPM rejects a cycle +between them just as it rejected one between the packages. + +## What TablePro changed + +Roughly 7,000 lines of source and 7,400 lines of tests, in three groups. + +**Correctness and performance in the engine.** Clip-bounded CoreText drawing, per-line widths in the +red-black tree so `maxLineWidth` falls when the widest line is deleted, a typesetting fix where a +line break was used as a length rather than an offset, IME and `NSTextInputClient` range handling, +pasteboard coercion, invisible-character rendering, and range-safety helpers. Most of this is +general and upstream would plausibly want it. + +**Product features.** Per-statement run controls in the gutter, and the fold placeholder preview. +These carry no SQL knowledge: `StatementRun` holds an `NSRange` and nothing else, and every SQL +scanner lives in `TablePro/Core/Utilities/SQL/`. + +**Replacements.** The completion window was rewritten from `NSTableView` to SwiftUI, and the fold +ribbon from upstream's hover-marker strip to macOS disclosure chevrons. Six upstream files were +deleted outright. + +Four subsystems upstream ships were removed because TablePro never used them and two of them were +running anyway: the minimap, jump to definition, the reformatting guide and HTML tag completion +(#2877). + +## Taking a change from upstream + +Do not expect a rebase to work. 42 of 65 files TablePro touched in the engine, and 41 of 70 in the +editor, collide with what upstream changed in its own last 60 commits. Port a specific fix by reading +it and writing it here, the way any other bug report is handled. + +The reverse direction is open: the correctness and performance work is written against upstream's own +shapes and roughly 1,060 lines of it lift out cleanly if anyone wants to send it back. diff --git a/LocalPackages/CodeEditSourceEditor/Package.resolved b/Packages/TableProEditor/Package.resolved similarity index 95% rename from LocalPackages/CodeEditSourceEditor/Package.resolved rename to Packages/TableProEditor/Package.resolved index 10ff839305..e4c1b06caa 100644 --- a/LocalPackages/CodeEditSourceEditor/Package.resolved +++ b/Packages/TableProEditor/Package.resolved @@ -1,4 +1,5 @@ { + "originHash" : "bee6f7cd17346c97c10c6a097ad528bdb169d8e780ccdfd270cd3768c19f80bb", "pins" : [ { "identity" : "rearrange", @@ -73,5 +74,5 @@ } } ], - "version" : 2 + "version" : 3 } diff --git a/Packages/TableProEditor/Package.swift b/Packages/TableProEditor/Package.swift new file mode 100644 index 0000000000..5108415c6d --- /dev/null +++ b/Packages/TableProEditor/Package.swift @@ -0,0 +1,58 @@ +// swift-tools-version: 6.0 + +import PackageDescription + +let package = Package( + name: "TableProEditor", + platforms: [.macOS(.v13)], + products: [ + .library(name: "TableProEditorKit", targets: ["TableProEditorKit"]), + .library(name: "TableProTextEngine", targets: ["TableProTextEngine"]) + ], + dependencies: [ + .package(path: "../TableProGrammars"), + .package(url: "https://github.com/ChimeHQ/TextStory", from: "0.9.0"), + .package(url: "https://github.com/ChimeHQ/TextFormation", from: "0.8.2"), + .package(url: "https://github.com/apple/swift-collections.git", .upToNextMajor(from: "1.0.0")), + .package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.0.0") + ], + targets: [ + .target( + name: "TableProTextEngineObjC", + publicHeadersPath: "include", + swiftSettings: [.swiftLanguageMode(.v5)] + ), + .target( + name: "TableProTextEngine", + dependencies: [ + "TableProTextEngineObjC", + "TextStory", + .product(name: "Collections", package: "swift-collections") + ], + swiftSettings: [.swiftLanguageMode(.v5)] + ), + .target( + name: "TableProEditorKit", + dependencies: [ + "TableProTextEngine", + "TableProGrammars", + "TextFormation" + ], + swiftSettings: [.swiftLanguageMode(.v5)] + ), + .testTarget( + name: "TableProTextEngineTests", + dependencies: ["TableProTextEngine"], + swiftSettings: [.swiftLanguageMode(.v5)] + ), + .testTarget( + name: "TableProEditorKitTests", + dependencies: [ + "TableProEditorKit", + "TableProGrammars", + .product(name: "CustomDump", package: "swift-custom-dump") + ], + swiftSettings: [.swiftLanguageMode(.v5)] + ) + ] +) diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Model/CodeSuggestionDelegate.swift b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Model/CodeSuggestionDelegate.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Model/CodeSuggestionDelegate.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Model/CodeSuggestionDelegate.swift index cfb4daea37..83ecad9489 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Model/CodeSuggestionDelegate.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Model/CodeSuggestionDelegate.swift @@ -1,6 +1,6 @@ // // CodeSuggestionDelegate.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Abe Malla on 12/26/24. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Model/CodeSuggestionEntry.swift b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Model/CodeSuggestionEntry.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Model/CodeSuggestionEntry.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Model/CodeSuggestionEntry.swift index 670edea2d3..fe381f4014 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Model/CodeSuggestionEntry.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Model/CodeSuggestionEntry.swift @@ -1,6 +1,6 @@ // // CodeSuggestionEntry.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 7/22/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Model/SuggestionTriggerCharacterModel.swift b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Model/SuggestionTriggerCharacterModel.swift similarity index 93% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Model/SuggestionTriggerCharacterModel.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Model/SuggestionTriggerCharacterModel.swift index 93a9c143a3..0082ad8d7f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Model/SuggestionTriggerCharacterModel.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Model/SuggestionTriggerCharacterModel.swift @@ -1,13 +1,13 @@ // // SuggestionTriggerCharacterModel.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 8/25/25. // import AppKit -import CodeEditTextView import os +import TableProTextEngine import TextStory /// Triggers the suggestion window when trigger characters are typed. @@ -18,7 +18,7 @@ import TextStory /// essentially a textview delegate ensures both of those promises are upheld. @MainActor final class SuggestionTriggerCharacterModel { - private static let logger = Logger(subsystem: "com.CodeEditSourceEditor", category: "CompletionTrigger") + private static let logger = Logger(subsystem: "com.TableProEditorKit", category: "CompletionTrigger") weak var controller: TextViewController? private var lastPosition: NSRange? diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Model/SuggestionViewModel.swift b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Model/SuggestionViewModel.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Model/SuggestionViewModel.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Model/SuggestionViewModel.swift index 8a56f7b9c3..b952f95e6b 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Model/SuggestionViewModel.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Model/SuggestionViewModel.swift @@ -1,6 +1,6 @@ // // SuggestionViewModel.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 7/22/25. // @@ -10,7 +10,7 @@ import os @MainActor final class SuggestionViewModel: ObservableObject { - private static let logger = Logger(subsystem: "com.CodeEditSourceEditor", category: "SuggestionVM") + private static let logger = Logger(subsystem: "com.TableProEditorKit", category: "SuggestionVM") /// The items to be displayed in the window @Published var items: [CodeSuggestionEntry] = [] @Published var selectedIndex: Int = 0 diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/CodeSuggestionLabelView.swift b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/View/CodeSuggestionLabelView.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/CodeSuggestionLabelView.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/View/CodeSuggestionLabelView.swift index bd3f1b5ff8..7cde5c1a4d 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/CodeSuggestionLabelView.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/View/CodeSuggestionLabelView.swift @@ -1,6 +1,6 @@ // // CodeSuggestionLabelView.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 7/24/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/SuggestionContentView.swift b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/View/SuggestionContentView.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/SuggestionContentView.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/View/SuggestionContentView.swift index a326cd1e80..ccad81e058 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/SuggestionContentView.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/View/SuggestionContentView.swift @@ -1,6 +1,6 @@ // // SuggestionContentView.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Claude on 2026-03-19. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/SuggestionPreviewView.swift b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/View/SuggestionPreviewView.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/SuggestionPreviewView.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/View/SuggestionPreviewView.swift index af6cfec4dd..9b1c8cd0ac 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/View/SuggestionPreviewView.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/View/SuggestionPreviewView.swift @@ -1,6 +1,6 @@ // // SuggestionPreviewView.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Claude on 2026-03-19. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionController+Window.swift b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Window/SuggestionController+Window.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionController+Window.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Window/SuggestionController+Window.swift index cd68b60e08..c9f6a69193 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionController+Window.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Window/SuggestionController+Window.swift @@ -1,6 +1,6 @@ // // SuggestionController+Window.swift -// CodeEditTextView +// TableProTextEngine // // Created by Abe Malla on 12/22/24. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionController.swift b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Window/SuggestionController.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionController.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Window/SuggestionController.swift index 283b75fc5d..9f941753e3 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionController.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Window/SuggestionController.swift @@ -1,15 +1,15 @@ // // SuggestionController.swift -// CodeEditTextView +// TableProTextEngine // // Created by Abe Malla on 6/18/24. // import AppKit import Carbon.HIToolbox -import CodeEditTextView import Combine import SwiftUI +import TableProTextEngine public final class SuggestionController: NSWindowController { static var shared = SuggestionController() diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionWindowPlacement.swift b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Window/SuggestionWindowPlacement.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionWindowPlacement.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Window/SuggestionWindowPlacement.swift index d96627066e..4afa32fb8e 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/SuggestionWindowPlacement.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Window/SuggestionWindowPlacement.swift @@ -1,6 +1,6 @@ // // SuggestionWindowPlacement.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/TextViewController+Suggestions.swift b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Window/TextViewController+Suggestions.swift similarity index 96% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/TextViewController+Suggestions.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Window/TextViewController+Suggestions.swift index 98fd4ed0b3..7ecccd9ffb 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/CodeSuggestion/Window/TextViewController+Suggestions.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/CodeSuggestion/Window/TextViewController+Suggestions.swift @@ -1,6 +1,6 @@ // // TextViewController+Suggestions.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/EditorKeyCommand.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/EditorKeyCommand.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/EditorKeyCommand.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/EditorKeyCommand.swift index b5c5fed5e1..61a516ae5f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/EditorKeyCommand.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/EditorKeyCommand.swift @@ -1,6 +1,6 @@ // // EditorKeyCommand.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Cursor.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+Cursor.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Cursor.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+Cursor.swift index 3e9173fc09..e50482332a 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Cursor.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+Cursor.swift @@ -1,6 +1,6 @@ // // TextViewController+Cursor.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Elias Wahl on 15.03.23. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+EmphasizeBracket.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+EmphasizeBracket.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+EmphasizeBracket.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+EmphasizeBracket.swift index cd68508f1f..0d390a3be1 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+EmphasizeBracket.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+EmphasizeBracket.swift @@ -1,12 +1,12 @@ // // TextViewController+EmphasizeBracket.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 4/26/23. // import AppKit -import CodeEditTextView +import TableProTextEngine extension TextViewController { /// Emphasizes bracket pairs using the current selection. diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+FindPanelTarget.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+FindPanelTarget.swift similarity index 94% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+FindPanelTarget.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+FindPanelTarget.swift index df6bcdb543..44421ad95d 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+FindPanelTarget.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+FindPanelTarget.swift @@ -1,12 +1,12 @@ // // TextViewController+FindPanelTarget.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 3/16/25. // import AppKit -import CodeEditTextView +import TableProTextEngine extension TextViewController: FindPanelTarget { var findPanelTargetView: NSView { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Folding.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+Folding.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Folding.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+Folding.swift index dbdd4e18e7..315ab5ec96 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Folding.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+Folding.swift @@ -1,6 +1,6 @@ // // TextViewController+Folding.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit @@ -26,7 +26,7 @@ public struct CollapsedFoldHit: Equatable { public extension TextViewController { /// Posted on the controller whenever a fold collapses or expands. static let foldStateDidChangeNotification = Notification.Name( - "CodeEditSourceEditor.foldStateDidChangeNotification" + "TableProEditorKit.foldStateDidChangeNotification" ) /// The collapsed fold under a point in the text view, if there is one. diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+GutterViewDelegate.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+GutterViewDelegate.swift similarity index 91% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+GutterViewDelegate.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+GutterViewDelegate.swift index e2e0ef7a51..ac8f8b66c2 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+GutterViewDelegate.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+GutterViewDelegate.swift @@ -1,6 +1,6 @@ // // TextViewController+GutterViewDelegate.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 4/17/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Highlighter.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+Highlighter.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Highlighter.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+Highlighter.swift index b1e6bb0266..3869f85025 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Highlighter.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+Highlighter.swift @@ -1,6 +1,6 @@ // // TextViewController+Highlighter.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 10/14/23. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+IndentLines.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+IndentLines.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+IndentLines.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+IndentLines.swift index 3eb5a3edde..8a16f927f1 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+IndentLines.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+IndentLines.swift @@ -1,12 +1,12 @@ // // TextViewController+IndentLines.swift -// CodeEditTextView +// TableProTextEngine // // Created by Ludwig, Tom on 11.09.24. // import AppKit -import CodeEditTextView +import TableProTextEngine extension TextViewController { /// Handles indentation and unindentation for selected lines in the text view. @@ -137,7 +137,7 @@ extension TextViewController { /// when indenting a selected line. /// /// Does not determine the *visible* lines, which is a very slight change from most - /// ``CodeEditTextView/TextLayoutManager`` APIs. + /// ``TableProTextEngine/TextLayoutManager`` APIs. /// Given the text: /// ``` /// A diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Lifecycle.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+Lifecycle.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Lifecycle.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+Lifecycle.swift index d38a028494..69ddeb2a97 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+Lifecycle.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+Lifecycle.swift @@ -1,12 +1,12 @@ // // TextViewController+LoadView.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 10/14/23. // import AppKit -import CodeEditTextView +import TableProTextEngine extension TextViewController { override public func viewWillAppear() { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+LineOperations.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+LineOperations.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+LineOperations.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+LineOperations.swift index 3fa4898d4c..7abdecc802 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+LineOperations.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+LineOperations.swift @@ -1,12 +1,12 @@ // // TextViewController+LineOperations.swift -// CodeEditSourceEditor +// TableProEditorKit // // Line-level editing operations: duplicate, delete. // import AppKit -import CodeEditTextView +import TableProTextEngine extension TextViewController { /// Duplicates the current line(s) below the selection (Cmd+D). diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+MoveLines.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+MoveLines.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+MoveLines.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+MoveLines.swift index f3a8012303..430baf68c2 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+MoveLines.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+MoveLines.swift @@ -1,6 +1,6 @@ // // TextViewController+MoveLines.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Bogdan Belogurov on 01/06/2025. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ReloadUI.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+ReloadUI.swift similarity index 92% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ReloadUI.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+ReloadUI.swift index fd99112e09..799c600f4a 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ReloadUI.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+ReloadUI.swift @@ -1,6 +1,6 @@ // // TextViewController+ReloadUI.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 4/17/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+StatementRunning.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+StatementRunning.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+StatementRunning.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+StatementRunning.swift index 2dfd4e9658..589bdf8a8d 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+StatementRunning.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+StatementRunning.swift @@ -1,6 +1,6 @@ // // TextViewController+StatementRunning.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+StyleViews.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+StyleViews.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+StyleViews.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+StyleViews.swift index 986a0d079c..b34888f342 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+StyleViews.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+StyleViews.swift @@ -1,12 +1,12 @@ // // TextViewController+StyleViews.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 7/3/24. // import AppKit -import CodeEditTextView +import TableProTextEngine extension TextViewController { package func generateParagraphStyle() -> NSMutableParagraphStyle { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+TextFormation.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+TextFormation.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+TextFormation.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+TextFormation.swift index be7198ef64..ea82475a5b 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+TextFormation.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+TextFormation.swift @@ -1,12 +1,12 @@ // // TextViewController+TextFormation.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 1/26/23. // import AppKit -import CodeEditTextView +import TableProTextEngine import TextFormation import TextStory diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+TextViewDelegate.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+TextViewDelegate.swift similarity index 96% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+TextViewDelegate.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+TextViewDelegate.swift index c676c39f4a..29eb0cffd3 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+TextViewDelegate.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+TextViewDelegate.swift @@ -1,12 +1,12 @@ // // TextViewController+TextViewDelegate.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 10/14/23. // -import CodeEditTextView import Foundation +import TableProTextEngine import TextStory extension TextViewController: TextViewDelegate { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ToggleComment.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+ToggleComment.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ToggleComment.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+ToggleComment.swift index b64150f208..cfb9a2c4ec 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ToggleComment.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+ToggleComment.swift @@ -1,12 +1,12 @@ // // TextViewController+Shortcuts.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Sophia Hooley on 4/21/24. // import AppKit -import CodeEditTextView +import TableProTextEngine extension TextViewController { /// Method called when CMD + / key sequence is recognized. diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ToggleCommentCache.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+ToggleCommentCache.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ToggleCommentCache.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+ToggleCommentCache.swift index 5a005127d8..ec0d3e4fe3 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+ToggleCommentCache.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+ToggleCommentCache.swift @@ -5,7 +5,7 @@ // Created by Tommy Ludwig on 23.08.24. // -import CodeEditTextView +import TableProTextEngine extension TextViewController { /// A cache used to store and manage comment-related information for lines in a text view. diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+UnfilteredEdits.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+UnfilteredEdits.swift similarity index 95% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+UnfilteredEdits.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+UnfilteredEdits.swift index bc6ffc653a..933c02074b 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController+UnfilteredEdits.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+UnfilteredEdits.swift @@ -1,10 +1,10 @@ // // TextViewController+UnfilteredEdits.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -import CodeEditTextView +import TableProTextEngine public extension TextViewController { func applyUnfilteredReplacements(_ replacements: [TextReplacement]) { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController.swift index fb509e46ba..74a90ace6f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Controller/TextViewController.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController.swift @@ -1,20 +1,20 @@ // // TextViewController.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 6/25/23. // import AppKit -import CodeEditTextView import Combine import SwiftUI import TableProGrammars +import TableProTextEngine import TextFormation /// # TextViewController /// -/// A view controller class for managing a source editor. Uses ``CodeEditTextView/TextView`` for input and rendering, +/// A view controller class for managing a source editor. Uses ``TableProTextEngine/TextView`` for input and rendering, /// tree-sitter for syntax highlighting, and TextFormation for live editing completions. public class TextViewController: NSViewController { public static let cursorPositionUpdatedNotification: Notification.Name = .init("TextViewController.cursorPositionNotification") diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/BracketPairEmphasis.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Enums/BracketPairEmphasis.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/BracketPairEmphasis.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Enums/BracketPairEmphasis.swift index 7da0e9945d..2698c1a3ce 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/BracketPairEmphasis.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Enums/BracketPairEmphasis.swift @@ -1,6 +1,6 @@ // // BracketPairEmphasis.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/3/23. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/BracketPairs.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Enums/BracketPairs.swift similarity index 96% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/BracketPairs.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Enums/BracketPairs.swift index bce82896c1..6d8b5c9dc6 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/BracketPairs.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Enums/BracketPairs.swift @@ -1,6 +1,6 @@ // // BracketPairs.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 6/5/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/CaptureModifier.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Enums/CaptureModifier.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/CaptureModifier.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Enums/CaptureModifier.swift index 2a3045215b..e213f83745 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/CaptureModifier.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Enums/CaptureModifier.swift @@ -1,6 +1,6 @@ // // CaptureModifiers.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 10/24/24. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/CaptureModifierSet.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Enums/CaptureModifierSet.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/CaptureModifierSet.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Enums/CaptureModifierSet.swift index 5fb1dbab71..7952372abb 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/CaptureModifierSet.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Enums/CaptureModifierSet.swift @@ -1,6 +1,6 @@ // // CaptureModifierSet.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 12/16/24. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/CaptureName.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Enums/CaptureName.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/CaptureName.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Enums/CaptureName.swift index 39f5116a87..58a7e2086f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/CaptureName.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Enums/CaptureName.swift @@ -1,6 +1,6 @@ // // CaptureNames.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Lukas Pistrol on 16.08.22. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/IndentOption.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Enums/IndentOption.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/IndentOption.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Enums/IndentOption.swift index eaffde6d21..8116ae3298 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Enums/IndentOption.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Enums/IndentOption.swift @@ -1,6 +1,6 @@ // // IndentOption.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 3/26/23. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Color+Hex.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/Color+Hex.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Color+Hex.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/Color+Hex.swift index 72ab7048b7..4042cf2f12 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Color+Hex.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/Color+Hex.swift @@ -1,6 +1,6 @@ // // Color+HEX.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Lukas Pistrol on 27.05.22. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/DispatchQueue+dispatchMainIfNot.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/DispatchQueue+dispatchMainIfNot.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/DispatchQueue+dispatchMainIfNot.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/DispatchQueue+dispatchMainIfNot.swift index 7012e27578..f0606d54bd 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/DispatchQueue+dispatchMainIfNot.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/DispatchQueue+dispatchMainIfNot.swift @@ -1,6 +1,6 @@ // // DispatchQueue+dispatchMainIfNot.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 9/2/24. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/IndexSet+NSRange.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/IndexSet+NSRange.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/IndexSet+NSRange.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/IndexSet+NSRange.swift index 8cca107945..fd97ef99f5 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/IndexSet+NSRange.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/IndexSet+NSRange.swift @@ -1,6 +1,6 @@ // // IndexSet+NSRange.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 1/12/23. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSBezierPath+RoundedCorners.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSBezierPath+RoundedCorners.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSBezierPath+RoundedCorners.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSBezierPath+RoundedCorners.swift index 141bbead3c..2f59c7438f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSBezierPath+RoundedCorners.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSBezierPath+RoundedCorners.swift @@ -1,6 +1,6 @@ // // NSBezierPath+RoundedCorners.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 6/3/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSColor+LightDark.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSColor+LightDark.swift similarity index 94% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSColor+LightDark.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSColor+LightDark.swift index b5871b7be3..aebb3cd924 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSColor+LightDark.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSColor+LightDark.swift @@ -1,6 +1,6 @@ // // NSColor+LightDark.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 6/4/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSEdgeInsets/NSEdgeInsets+Equatable.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSEdgeInsets/NSEdgeInsets+Equatable.swift similarity index 93% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSEdgeInsets/NSEdgeInsets+Equatable.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSEdgeInsets/NSEdgeInsets+Equatable.swift index 38911245fc..266dd2cb29 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSEdgeInsets/NSEdgeInsets+Equatable.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSEdgeInsets/NSEdgeInsets+Equatable.swift @@ -1,6 +1,6 @@ // // NSEdgeInsets+Equatable.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Wouter Hennen on 29/04/2023. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSEdgeInsets/NSEdgeInsets+Helpers.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSEdgeInsets/NSEdgeInsets+Helpers.swift similarity index 90% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSEdgeInsets/NSEdgeInsets+Helpers.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSEdgeInsets/NSEdgeInsets+Helpers.swift index 83b2cb81ca..6cf8ea41d9 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSEdgeInsets/NSEdgeInsets+Helpers.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSEdgeInsets/NSEdgeInsets+Helpers.swift @@ -1,6 +1,6 @@ // // NSEdgeInsets+Helpers.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 4/15/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSFont/NSFont+CharWidth.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSFont/NSFont+CharWidth.swift similarity index 89% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSFont/NSFont+CharWidth.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSFont/NSFont+CharWidth.swift index 606e1b6814..0a1b91bfbb 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSFont/NSFont+CharWidth.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSFont/NSFont+CharWidth.swift @@ -1,6 +1,6 @@ // // NSFont+CharWidth.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 6/25/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSFont/NSFont+LineHeight.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSFont/NSFont+LineHeight.swift similarity index 84% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSFont/NSFont+LineHeight.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSFont/NSFont+LineHeight.swift index a22957736d..07b724b639 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSFont/NSFont+LineHeight.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSFont/NSFont+LineHeight.swift @@ -1,12 +1,12 @@ // // NSFont+LineHeight.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Lukas Pistrol on 28.05.22. // import AppKit -import CodeEditTextView +import TableProTextEngine public extension NSFont { /// The default line height of the font. diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSFont/NSFont+RulerFont.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSFont/NSFont+RulerFont.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSFont/NSFont+RulerFont.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSFont/NSFont+RulerFont.swift index f7730020bc..244b40ed8b 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSFont/NSFont+RulerFont.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSFont/NSFont+RulerFont.swift @@ -1,6 +1,6 @@ // // NSFont+RulerFont.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Elias Wahl on 17.03.23. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+InputEdit.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRange+/NSRange+InputEdit.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+InputEdit.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRange+/NSRange+InputEdit.swift index e1a8a219b9..47d94786f0 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+InputEdit.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRange+/NSRange+InputEdit.swift @@ -1,13 +1,13 @@ // // NSRange+InputEdit.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 9/12/22. // -import CodeEditTextView import Foundation import SwiftTreeSitter +import TableProTextEngine extension InputEdit { init?(range: NSRange, delta: Int, oldEndPoint: Point, textView: TextView) { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+NSTextRange.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRange+/NSRange+NSTextRange.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+NSTextRange.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRange+/NSRange+NSTextRange.swift index d87d1567da..60304eb87f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+NSTextRange.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRange+/NSRange+NSTextRange.swift @@ -1,6 +1,6 @@ // // NSRange+NSTextRange.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 9/13/22. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+String.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRange+/NSRange+String.swift similarity index 95% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+String.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRange+/NSRange+String.swift index c5f30f167d..d7407f3837 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+String.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRange+/NSRange+String.swift @@ -1,6 +1,6 @@ // // String+NSRange.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Lukas Pistrol on 25.05.22. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+TSRange.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRange+/NSRange+TSRange.swift similarity index 92% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+TSRange.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRange+/NSRange+TSRange.swift index 1934eec8cc..34b816950d 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+TSRange.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRange+/NSRange+TSRange.swift @@ -1,6 +1,6 @@ // // NSRange+TSRange.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 2/26/23. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+isEmpty.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRange+/NSRange+isEmpty.swift similarity index 86% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+isEmpty.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRange+/NSRange+isEmpty.swift index dc882a176b..0cd59ebbde 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRange+/NSRange+isEmpty.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRange+/NSRange+isEmpty.swift @@ -1,6 +1,6 @@ // // NSRange+isEmpty.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 10/14/23. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRect+Transform.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRect+Transform.swift similarity index 94% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRect+Transform.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRect+Transform.swift index 34be2a8e7e..1a75464a86 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSRect+Transform.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRect+Transform.swift @@ -1,6 +1,6 @@ // // NSRect+Transform.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 6/4/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSString+TextStory.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSString+TextStory.swift similarity index 94% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSString+TextStory.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSString+TextStory.swift index 870e115452..ec17e9eb76 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/NSString+TextStory.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSString+TextStory.swift @@ -1,6 +1,6 @@ // // NSString+TextStory.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 6/3/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Node+filterChildren.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/Node+filterChildren.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Node+filterChildren.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/Node+filterChildren.swift index 9788997437..ca3b0a50a4 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Node+filterChildren.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/Node+filterChildren.swift @@ -1,6 +1,6 @@ // // Node+filterChildren.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/29/24. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Range+Length.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/Range+Length.swift similarity index 95% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Range+Length.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/Range+Length.swift index 86f6405407..8a7d1dea76 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Range+Length.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/Range+Length.swift @@ -1,6 +1,6 @@ // // Range+Length.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 10/25/24. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Result+ThrowOrReturn.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/Result+ThrowOrReturn.swift similarity index 94% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Result+ThrowOrReturn.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/Result+ThrowOrReturn.swift index 8327000216..5f6b7d3439 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Result+ThrowOrReturn.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/Result+ThrowOrReturn.swift @@ -1,6 +1,6 @@ // // Result+ThrowOrReturn.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 9/2/24. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/String+/String+Groups.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/String+/String+Groups.swift similarity index 96% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/String+/String+Groups.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/String+/String+Groups.swift index b01fbd35b3..0fc407bbbb 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/String+/String+Groups.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/String+/String+Groups.swift @@ -1,6 +1,6 @@ // // NewlineProcessingFilter+TagHandling.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Roscoe Rubin-Rottenberg on 5/19/24. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/String+/String+encoding.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/String+/String+encoding.swift similarity index 93% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/String+/String+encoding.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/String+/String+encoding.swift index 9901433ec0..9ec0019bc4 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/String+/String+encoding.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/String+/String+encoding.swift @@ -1,6 +1,6 @@ // // String+encoding.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 1/19/23. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextMutation+isEmpty.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextMutation+isEmpty.swift similarity index 93% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextMutation+isEmpty.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextMutation+isEmpty.swift index 6b07fe40dc..98cd3518b5 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextMutation+isEmpty.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextMutation+isEmpty.swift @@ -1,6 +1,6 @@ // // TextMutation+isEmpty.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 3/1/24. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+Menu.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextView+/TextView+Menu.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+Menu.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextView+/TextView+Menu.swift index 4a29590570..1711268a6b 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+Menu.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextView+/TextView+Menu.swift @@ -1,12 +1,12 @@ // // TextView+Menu.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Lukas Pistrol on 25.05.22. // import AppKit -import CodeEditTextView +import TableProTextEngine extension TextView { /// Setup context menus diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+Point.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextView+/TextView+Point.swift similarity index 89% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+Point.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextView+/TextView+Point.swift index 746f02177f..5d3685bc3f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+Point.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextView+/TextView+Point.swift @@ -1,13 +1,13 @@ // // TextView+Point.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 1/18/24. // -import CodeEditTextView import Foundation import SwiftTreeSitter +import TableProTextEngine extension TextView { func pointForLocation(_ location: Int) -> Point? { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+TextFormation.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextView+/TextView+TextFormation.swift similarity index 96% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+TextFormation.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextView+/TextView+TextFormation.swift index 772c65eac3..eca9404d67 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+TextFormation.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextView+/TextView+TextFormation.swift @@ -1,12 +1,12 @@ // // TextView+TextFormation.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 10/14/23. // -import CodeEditTextView import Foundation +import TableProTextEngine import TextFormation import TextStory diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+createReadBlock.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextView+/TextView+createReadBlock.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+createReadBlock.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextView+/TextView+createReadBlock.swift index e754336446..c711ee81e3 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/TextView+/TextView+createReadBlock.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextView+/TextView+createReadBlock.swift @@ -1,13 +1,13 @@ // // TextView+createReadBlock.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/20/23. // -import CodeEditTextView import Foundation import SwiftTreeSitter +import TableProTextEngine extension TextView { /// Creates a block for safely reading data into a parser's read block. diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Tree+prettyPrint.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/Tree+prettyPrint.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Tree+prettyPrint.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Extensions/Tree+prettyPrint.swift index 034c8aa0bc..33f43bf8db 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Extensions/Tree+prettyPrint.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Extensions/Tree+prettyPrint.swift @@ -1,6 +1,6 @@ // // Tree+prettyPrint.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 3/16/23. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Filters/DeleteWhitespaceFilter.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Filters/DeleteWhitespaceFilter.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Filters/DeleteWhitespaceFilter.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Filters/DeleteWhitespaceFilter.swift index 7cf82e5cf7..2eccdb01ee 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Filters/DeleteWhitespaceFilter.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Filters/DeleteWhitespaceFilter.swift @@ -1,12 +1,12 @@ // // DeleteWhitespaceFilter.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 1/28/23. // -import CodeEditTextView import Foundation +import TableProTextEngine import TextFormation import TextStory diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Filters/TabReplacementFilter.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Filters/TabReplacementFilter.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Filters/TabReplacementFilter.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Filters/TabReplacementFilter.swift index 104f4ea34a..38b3f67340 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Filters/TabReplacementFilter.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Filters/TabReplacementFilter.swift @@ -1,6 +1,6 @@ // // TabReplacementFilter.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 1/28/23. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindMethod.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/FindMethod.swift similarity index 95% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindMethod.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/FindMethod.swift index 1abe7e14e3..882df202aa 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindMethod.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/FindMethod.swift @@ -1,6 +1,6 @@ // // FindMethod.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Austin Condiff on 5/2/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindPanelMode.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/FindPanelMode.swift similarity index 92% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindPanelMode.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/FindPanelMode.swift index f7bbf26bd5..e2097a3476 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindPanelMode.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/FindPanelMode.swift @@ -1,6 +1,6 @@ // // FindPanelMode.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 4/18/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindPanelTarget.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/FindPanelTarget.swift similarity index 91% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindPanelTarget.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/FindPanelTarget.swift index 640b00166c..966f79810d 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindPanelTarget.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/FindPanelTarget.swift @@ -1,12 +1,12 @@ // // FindPanelTarget.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 3/10/25. // import AppKit -import CodeEditTextView +import TableProTextEngine protocol FindPanelTarget: AnyObject { var textView: TextView! { get } diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindViewController+Toggle.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/FindViewController+Toggle.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindViewController+Toggle.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/FindViewController+Toggle.swift index d607af3eb4..4cf0d2b880 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindViewController+Toggle.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/FindViewController+Toggle.swift @@ -1,6 +1,6 @@ // // FindViewController+Toggle.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Austin Condiff on 4/3/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindViewController.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/FindViewController.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindViewController.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/FindViewController.swift index 3286023d82..f5b9d2201e 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/FindViewController.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/FindViewController.swift @@ -1,12 +1,12 @@ // // FindViewController.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 3/10/25. // import AppKit -import CodeEditTextView +import TableProTextEngine /// Creates a container controller for displaying and hiding a find panel with a content view. final class FindViewController: NSViewController { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindControls.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindControls.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindControls.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindControls.swift index ede8476dae..96c892236f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindControls.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindControls.swift @@ -1,6 +1,6 @@ // // FindControls.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Austin Condiff on 4/30/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindMethodPicker.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindMethodPicker.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindMethodPicker.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindMethodPicker.swift index 191d94ddc6..a7e4c48bad 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindMethodPicker.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindMethodPicker.swift @@ -1,6 +1,6 @@ // // FindMethodPicker.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Austin Condiff on 5/2/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindModePicker.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindModePicker.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindModePicker.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindModePicker.swift index e7a076a13f..c68d33ad52 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindModePicker.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindModePicker.swift @@ -1,6 +1,6 @@ // // FindModePicker.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Austin Condiff on 4/10/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindPanelContent.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindPanelContent.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindPanelContent.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindPanelContent.swift index 383d2305de..222168f10a 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindPanelContent.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindPanelContent.swift @@ -1,6 +1,6 @@ // // FindPanelContent.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Austin Condiff on 5/2/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindPanelHostingView.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindPanelHostingView.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindPanelHostingView.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindPanelHostingView.swift index bf16e490fa..b7f1e0f407 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindPanelHostingView.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindPanelHostingView.swift @@ -1,6 +1,6 @@ // // FindPanelHostingView.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 3/10/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindPanelView.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindPanelView.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindPanelView.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindPanelView.swift index 68b0335bf0..72070975ff 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindPanelView.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindPanelView.swift @@ -1,13 +1,13 @@ // // FindPanelView.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Austin Condiff on 3/12/25. // import AppKit -import CodeEditTextView import SwiftUI +import TableProTextEngine /// A SwiftUI view that provides a find and replace interface for the text editor. /// diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindSearchField.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindSearchField.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindSearchField.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindSearchField.swift index 12d19fcdf4..78ea750892 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/FindSearchField.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindSearchField.swift @@ -1,6 +1,6 @@ // // FindSearchField.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 4/18/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/ReplaceControls.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/ReplaceControls.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/ReplaceControls.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/ReplaceControls.swift index 6b62348f0a..f5df5b7c55 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/ReplaceControls.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/ReplaceControls.swift @@ -1,6 +1,6 @@ // // ReplaceControls.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Austin Condiff on 4/30/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/ReplaceSearchField.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/ReplaceSearchField.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/ReplaceSearchField.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/ReplaceSearchField.swift index 87e470b265..0d23759dc3 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/PanelView/ReplaceSearchField.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/ReplaceSearchField.swift @@ -1,6 +1,6 @@ // // ReplaceSearchField.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 4/18/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Emphasis.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel+Emphasis.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Emphasis.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel+Emphasis.swift index adcebcd8e0..56006a71ee 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Emphasis.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel+Emphasis.swift @@ -1,11 +1,11 @@ // // FindPanelViewModel+Emphasis.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 4/18/25. // -import CodeEditTextView +import TableProTextEngine extension FindPanelViewModel { func addMatchEmphases(flashCurrent: Bool) { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Find.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel+Find.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Find.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel+Find.swift index a65ff20f08..316a7ec755 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Find.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel+Find.swift @@ -1,6 +1,6 @@ // // FindPanelViewModel+Find.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 4/18/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Move.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel+Move.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Move.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel+Move.swift index 726598b7ca..f1ce5bffa1 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Move.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel+Move.swift @@ -1,6 +1,6 @@ // // FindPanelViewModel+Move.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 4/18/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Replace.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel+Replace.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Replace.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel+Replace.swift index 0f1da9485f..2dd597ea9f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel+Replace.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel+Replace.swift @@ -1,12 +1,12 @@ // // FindPanelViewModel+Replace.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 4/18/25. // -import CodeEditTextView import Foundation +import TableProTextEngine extension FindPanelViewModel { /// Replace one or all ``findMatches`` with the contents of ``replaceText``. diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel.swift index 905aa0c4d8..64523c734d 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Find/ViewModel/FindPanelViewModel.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel.swift @@ -1,13 +1,13 @@ // // FindPanelViewModel.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Austin Condiff on 3/12/25. // -import CodeEditTextView import Combine import SwiftUI +import TableProTextEngine class FindPanelViewModel: ObservableObject { enum Notifications { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Gutter/GutterView.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Gutter/GutterView.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Gutter/GutterView.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Gutter/GutterView.swift index 2fa8af1654..2a3e087f1f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Gutter/GutterView.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Gutter/GutterView.swift @@ -1,13 +1,13 @@ // // GutterView.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 8/22/23. // import AppKit -import CodeEditTextView -import CodeEditTextViewObjC +import TableProTextEngine +import TableProTextEngineObjC public protocol GutterViewDelegate: AnyObject { func gutterViewWidthDidUpdate() diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightProviding/HighlightProviderState.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/HighlightProviding/HighlightProviderState.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightProviding/HighlightProviderState.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/HighlightProviding/HighlightProviderState.swift index 923aece006..cdf8e1f54a 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightProviding/HighlightProviderState.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/HighlightProviding/HighlightProviderState.swift @@ -1,14 +1,14 @@ // // HighlightProviderState.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 10/13/24. // -import CodeEditTextView import Foundation import OSLog import TableProGrammars +import TableProTextEngine @MainActor protocol HighlightProviderStateDelegate: AnyObject { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightProviding/HighlightProviding.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/HighlightProviding/HighlightProviding.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightProviding/HighlightProviding.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/HighlightProviding/HighlightProviding.swift index 86e7c2c4f3..962afd46e2 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightProviding/HighlightProviding.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/HighlightProviding/HighlightProviding.swift @@ -1,14 +1,14 @@ // // HighlightProviding.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 1/18/23. // import AppKit -import CodeEditTextView import Foundation import TableProGrammars +import TableProTextEngine /// A single-case error that should be thrown when an operation should be retried. public enum HighlightProvidingError: Error { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightRange.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/HighlightRange.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightRange.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/HighlightRange.swift index 85b416b824..3c3bdf0ff9 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/HighlightRange.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/HighlightRange.swift @@ -1,6 +1,6 @@ // // HighlightRange.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 9/14/22. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/Highlighter.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/Highlighter.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/Highlighter.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/Highlighter.swift index cf96f3b5b9..2239c4af80 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/Highlighter.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/Highlighter.swift @@ -1,16 +1,16 @@ // // Highlighter.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 9/12/22. // import AppKit -import CodeEditTextView import Foundation import OSLog import SwiftTreeSitter import TableProGrammars +import TableProTextEngine /// Thresholds for degrading language services on large documents. public enum EditorHighlighting { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/StyledRangeContainer/StyledRangeContainer+runsIn.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/StyledRangeContainer/StyledRangeContainer+runsIn.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/StyledRangeContainer/StyledRangeContainer+runsIn.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/StyledRangeContainer/StyledRangeContainer+runsIn.swift index aa1a3590cf..61c80b7857 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/StyledRangeContainer/StyledRangeContainer+runsIn.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/StyledRangeContainer/StyledRangeContainer+runsIn.swift @@ -1,6 +1,6 @@ // // StyledRangeContainer+runsIn.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 7/18/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/StyledRangeContainer/StyledRangeContainer.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/StyledRangeContainer/StyledRangeContainer.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/StyledRangeContainer/StyledRangeContainer.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/StyledRangeContainer/StyledRangeContainer.swift index f02e61a9da..74164b203f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/StyledRangeContainer/StyledRangeContainer.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/StyledRangeContainer/StyledRangeContainer.swift @@ -1,6 +1,6 @@ // // StyledRangeContainer.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 10/13/24. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/VisibleRangeProvider.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/VisibleRangeProvider.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/VisibleRangeProvider.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/VisibleRangeProvider.swift index 91428e250b..cbb57ae28b 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Highlighting/VisibleRangeProvider.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Highlighting/VisibleRangeProvider.swift @@ -1,12 +1,12 @@ // // VisibleRangeProvider.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 10/13/24. // import AppKit -import CodeEditTextView +import TableProTextEngine @MainActor protocol VisibleRangeProviderDelegate: AnyObject { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/InvisibleCharacters/InvisibleCharactersConfiguration.swift b/Packages/TableProEditor/Sources/TableProEditorKit/InvisibleCharacters/InvisibleCharactersConfiguration.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/InvisibleCharacters/InvisibleCharactersConfiguration.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/InvisibleCharacters/InvisibleCharactersConfiguration.swift index ac7239f71c..1f9640fb45 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/InvisibleCharacters/InvisibleCharactersConfiguration.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/InvisibleCharacters/InvisibleCharactersConfiguration.swift @@ -1,6 +1,6 @@ // // InvisibleCharactersConfiguration.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 6/11/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/InvisibleCharacters/InvisibleCharactersCoordinator.swift b/Packages/TableProEditor/Sources/TableProEditorKit/InvisibleCharacters/InvisibleCharactersCoordinator.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/InvisibleCharacters/InvisibleCharactersCoordinator.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/InvisibleCharacters/InvisibleCharactersCoordinator.swift index a09c7de742..0d08870179 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/InvisibleCharacters/InvisibleCharactersCoordinator.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/InvisibleCharacters/InvisibleCharactersCoordinator.swift @@ -1,12 +1,12 @@ // // InvisibleCharactersCoordinator.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 6/9/25. // import AppKit -import CodeEditTextView +import TableProTextEngine /// Object that tells the text view how to draw invisible characters. /// @@ -15,7 +15,7 @@ import CodeEditTextView /// To keep lookups fast, does not use a computed property for ``InvisibleCharactersConfiguration/triggerCharacters``. /// Instead, this type keeps that internal property up-to-date whenever config is updated. /// -/// Another performance optimization is a cache mechanism in CodeEditTextView. Whenever the config, indent option, +/// Another performance optimization is a cache mechanism in TableProTextEngine. Whenever the config, indent option, /// theme, or font are updated, this object will tell the text view to clear it's cache. Keep updates to a minimum to /// retain as much cached data as possible. final class InvisibleCharactersCoordinator: InvisibleCharactersDelegate { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/LineFoldProviders/LineFoldProvider.swift b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/LineFoldProviders/LineFoldProvider.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/LineFoldProviders/LineFoldProvider.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/LineFoldProviders/LineFoldProvider.swift index 07f3ee9752..4662583a2e 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/LineFoldProviders/LineFoldProvider.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/LineFoldProviders/LineFoldProvider.swift @@ -1,12 +1,12 @@ // // LineFoldProvider.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/7/25. // import AppKit -import CodeEditTextView +import TableProTextEngine /// Represents a fold's start or end. public enum LineFoldProviderLineInfo { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/LineFoldProviders/LineIndentationFoldProvider.swift b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/LineFoldProviders/LineIndentationFoldProvider.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/LineFoldProviders/LineIndentationFoldProvider.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/LineFoldProviders/LineIndentationFoldProvider.swift index 5c04b0d7dd..c33e1cbd44 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/LineFoldProviders/LineIndentationFoldProvider.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/LineFoldProviders/LineIndentationFoldProvider.swift @@ -1,12 +1,12 @@ // // LineIndentationFoldProvider.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/8/25. // import AppKit -import CodeEditTextView +import TableProTextEngine /// A basic fold provider that uses line indentation to determine fold regions. final class LineIndentationFoldProvider: LineFoldProvider { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Model/FoldRange.swift b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Model/FoldRange.swift similarity index 92% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Model/FoldRange.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Model/FoldRange.swift index 98ee04533e..a1e0e04cad 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Model/FoldRange.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Model/FoldRange.swift @@ -1,6 +1,6 @@ // // FoldRange.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 6/26/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Model/LineFoldCalculator.swift b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Model/LineFoldCalculator.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Model/LineFoldCalculator.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Model/LineFoldCalculator.swift index a6e71ab76e..8714dd2723 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Model/LineFoldCalculator.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Model/LineFoldCalculator.swift @@ -1,12 +1,12 @@ // // LineFoldCalculator.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/9/25. // import AppKit -import CodeEditTextView +import TableProTextEngine /// `LineFoldCalculator` receives text edits and rebuilds fold regions asynchronously. /// diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Model/LineFoldModel.swift b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Model/LineFoldModel.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Model/LineFoldModel.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Model/LineFoldModel.swift index 9ed63b83b3..5d8acb9917 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Model/LineFoldModel.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Model/LineFoldModel.swift @@ -1,13 +1,13 @@ // // LineFoldModel.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/7/25. // import AppKit -import CodeEditTextView import Combine +import TableProTextEngine /// This object acts as the conductor between the line folding components. /// diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Model/LineFoldStorage.swift b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Model/LineFoldStorage.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Model/LineFoldStorage.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Model/LineFoldStorage.swift index 33999bea46..b7fbfe6602 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Model/LineFoldStorage.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Model/LineFoldStorage.swift @@ -1,6 +1,6 @@ // // LineFoldStorage.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/7/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Placeholder/FoldPlaceholderSummary.swift b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Placeholder/FoldPlaceholderSummary.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Placeholder/FoldPlaceholderSummary.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Placeholder/FoldPlaceholderSummary.swift index da4a8e951c..db150831a8 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Placeholder/FoldPlaceholderSummary.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Placeholder/FoldPlaceholderSummary.swift @@ -1,6 +1,6 @@ // // FoldPlaceholderSummary.swift -// CodeEditSourceEditor +// TableProEditorKit // import Foundation diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Placeholder/LineFoldPlaceholder.swift b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Placeholder/LineFoldPlaceholder.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Placeholder/LineFoldPlaceholder.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Placeholder/LineFoldPlaceholder.swift index ebc41f39e8..ac356df971 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/Placeholder/LineFoldPlaceholder.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/Placeholder/LineFoldPlaceholder.swift @@ -1,12 +1,12 @@ // // LineFoldPlaceholder.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/9/25. // import AppKit -import CodeEditTextView +import TableProTextEngine protocol LineFoldPlaceholderDelegate: AnyObject { func placeholderBackgroundColor() -> NSColor diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/View/LineFoldPlaceholderTracker.swift b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/View/LineFoldPlaceholderTracker.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/View/LineFoldPlaceholderTracker.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/View/LineFoldPlaceholderTracker.swift index 26dc910763..bb2ac79dab 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/View/LineFoldPlaceholderTracker.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/View/LineFoldPlaceholderTracker.swift @@ -1,10 +1,10 @@ // // LineFoldPlaceholderTracker.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -import CodeEditTextView +import TableProTextEngine /// Reports which collapsed fold's placeholder the pointer is resting on. /// diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/View/LineFoldRibbonView+Accessibility.swift b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/View/LineFoldRibbonView+Accessibility.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/View/LineFoldRibbonView+Accessibility.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/View/LineFoldRibbonView+Accessibility.swift index d21a942eb5..209e12887f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/View/LineFoldRibbonView+Accessibility.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/View/LineFoldRibbonView+Accessibility.swift @@ -1,10 +1,10 @@ // // LineFoldRibbonView+Accessibility.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -import CodeEditTextView +import TableProTextEngine /// One fold's disclosure chevron, as assistive technology sees it. /// diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/View/LineFoldRibbonView+Draw.swift b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/View/LineFoldRibbonView+Draw.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/View/LineFoldRibbonView+Draw.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/View/LineFoldRibbonView+Draw.swift index a4a10203e7..9e3c82015b 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/View/LineFoldRibbonView+Draw.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/View/LineFoldRibbonView+Draw.swift @@ -1,12 +1,12 @@ // // LineFoldRibbonView+Draw.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/8/25. // import AppKit -import CodeEditTextView +import TableProTextEngine extension LineFoldRibbonView { override func draw(_ dirtyRect: NSRect) { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/View/LineFoldRibbonView.swift b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/View/LineFoldRibbonView.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/View/LineFoldRibbonView.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/View/LineFoldRibbonView.swift index 4eed36bfc6..426c346a77 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/LineFolding/View/LineFoldRibbonView.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/LineFolding/View/LineFoldRibbonView.swift @@ -1,12 +1,12 @@ // // LineFoldRibbonView.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/6/25. // import AppKit -import CodeEditTextView +import TableProTextEngine /// Draws the fold controls in the ``GutterView``. /// diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+Coalesce.swift b/Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStore+Coalesce.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+Coalesce.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStore+Coalesce.swift index 9d753126d2..0c86de7211 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+Coalesce.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStore+Coalesce.swift @@ -1,6 +1,6 @@ // // RangeStore+Internals.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 10/25/24 // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+FindIndex.swift b/Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStore+FindIndex.swift similarity index 96% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+FindIndex.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStore+FindIndex.swift index 7700fced01..192a4de6e3 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+FindIndex.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStore+FindIndex.swift @@ -1,6 +1,6 @@ // // RangeStore+FindIndex.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 1/6/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+OffsetMetric.swift b/Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStore+OffsetMetric.swift similarity index 94% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+OffsetMetric.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStore+OffsetMetric.swift index 4b63e0a453..de39924b6d 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+OffsetMetric.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStore+OffsetMetric.swift @@ -1,6 +1,6 @@ // // RangeStore+OffsetMetric.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 10/25/24 // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+StoredRun.swift b/Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStore+StoredRun.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+StoredRun.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStore+StoredRun.swift index 18cd53268b..2637cc83c8 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore+StoredRun.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStore+StoredRun.swift @@ -1,6 +1,6 @@ // // RangeStore+StoredRun.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 10/25/24 diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore.swift b/Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStore.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStore.swift index 482e6dbc09..aa0c6ec845 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStore.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStore.swift @@ -1,6 +1,6 @@ // // RangeStore.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 10/24/24 // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStoreElement.swift b/Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStoreElement.swift similarity index 86% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStoreElement.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStoreElement.swift index 9db2d325e3..49d497303a 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStoreElement.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStoreElement.swift @@ -1,6 +1,6 @@ // // RangeStoreElement.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/28/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStoreRun.swift b/Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStoreRun.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStoreRun.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStoreRun.swift index 116764eece..79e0d4e689 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/RangeStore/RangeStoreRun.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/RangeStore/RangeStoreRun.swift @@ -1,6 +1,6 @@ // // RangeStoreRun.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 11/4/24. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditor/RepresentableSyncPhase.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditor/RepresentableSyncPhase.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditor/RepresentableSyncPhase.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SourceEditor/RepresentableSyncPhase.swift index 553be948f7..397daf87aa 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditor/RepresentableSyncPhase.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditor/RepresentableSyncPhase.swift @@ -1,6 +1,6 @@ // // RepresentableSyncPhase.swift -// CodeEditSourceEditor +// TableProEditorKit // // Tracks which side of the SwiftUI representable boundary originated the // change currently being synchronized, replacing the pair of booleans the diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditor/SourceEditor+Coordinator.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditor/SourceEditor+Coordinator.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditor/SourceEditor+Coordinator.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SourceEditor/SourceEditor+Coordinator.swift index ee989708ec..5cb8b82e0d 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditor/SourceEditor+Coordinator.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditor/SourceEditor+Coordinator.swift @@ -1,14 +1,14 @@ // // SourceEditor+Coordinator.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/20/24. // import AppKit -import CodeEditTextView import Combine import SwiftUI +import TableProTextEngine public extension SourceEditor { @MainActor diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditor/SourceEditor.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditor/SourceEditor.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditor/SourceEditor.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SourceEditor/SourceEditor.swift index 9051b42e1f..b543b6eda0 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditor/SourceEditor.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditor/SourceEditor.swift @@ -1,14 +1,14 @@ // // SourceEditor.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Lukas Pistrol on 24.05.22. // import AppKit -import CodeEditTextView import SwiftUI import TableProGrammars +import TableProTextEngine /// A SwiftUI View that provides source editing functionality. public struct SourceEditor: NSViewControllerRepresentable { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditor/TextBindingSync.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditor/TextBindingSync.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditor/TextBindingSync.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SourceEditor/TextBindingSync.swift index 50f5d75bfc..eaae2dbd52 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditor/TextBindingSync.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditor/TextBindingSync.swift @@ -1,6 +1,6 @@ // // TextBindingSync.swift -// CodeEditSourceEditor +// TableProEditorKit // // Owns the two-way synchronization between a SwiftUI text binding and the // text view: editor edits are written back to the binding (debounced for @@ -10,8 +10,8 @@ // import AppKit -import CodeEditTextView import SwiftUI +import TableProTextEngine @MainActor final class TextBindingSync { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Appearance.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorConfiguration/SourceEditorConfiguration+Appearance.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Appearance.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorConfiguration/SourceEditorConfiguration+Appearance.swift index 7c3351780c..e3b89a3a96 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Appearance.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorConfiguration/SourceEditorConfiguration+Appearance.swift @@ -1,6 +1,6 @@ // // SourceEditorConfiguration+Appearance.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 6/16/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Behavior.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorConfiguration/SourceEditorConfiguration+Behavior.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Behavior.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorConfiguration/SourceEditorConfiguration+Behavior.swift index e03697b2d1..15c85ba131 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Behavior.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorConfiguration/SourceEditorConfiguration+Behavior.swift @@ -1,6 +1,6 @@ // // SourceEditorConfiguration+Behavior.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 6/16/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Layout.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorConfiguration/SourceEditorConfiguration+Layout.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Layout.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorConfiguration/SourceEditorConfiguration+Layout.swift index 93d2d0f423..71ed41aa80 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Layout.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorConfiguration/SourceEditorConfiguration+Layout.swift @@ -1,6 +1,6 @@ // // SourceEditorConfiguration+Layout.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 6/16/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Peripherals.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorConfiguration/SourceEditorConfiguration+Peripherals.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Peripherals.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorConfiguration/SourceEditorConfiguration+Peripherals.swift index 55d6c873a5..3b01170b37 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration+Peripherals.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorConfiguration/SourceEditorConfiguration+Peripherals.swift @@ -1,11 +1,11 @@ // // EditorConfig+Peripherals.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 6/16/25. // -import CodeEditTextView +import TableProTextEngine public extension SourceEditorConfiguration { struct Peripherals: Equatable { diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorConfiguration/SourceEditorConfiguration.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorConfiguration/SourceEditorConfiguration.swift index ad8c9eff97..be1b30cd06 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorConfiguration/SourceEditorConfiguration.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorConfiguration/SourceEditorConfiguration.swift @@ -1,6 +1,6 @@ // // SourceEditorConfiguration.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 6/16/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorState/SourceEditorState.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorState/SourceEditorState.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorState/SourceEditorState.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorState/SourceEditorState.swift index 598ab9f16d..4d57868ff4 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SourceEditorState/SourceEditorState.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/SourceEditorState/SourceEditorState.swift @@ -1,6 +1,6 @@ // // SourceEditorState.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 6/19/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/StatementRunning/StatementRun.swift b/Packages/TableProEditor/Sources/TableProEditorKit/StatementRunning/StatementRun.swift similarity index 95% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/StatementRunning/StatementRun.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/StatementRunning/StatementRun.swift index 37cd0e8a1b..2721f59e1d 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/StatementRunning/StatementRun.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/StatementRunning/StatementRun.swift @@ -1,6 +1,6 @@ // // StatementRun.swift -// CodeEditSourceEditor +// TableProEditorKit // import Foundation diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/StatementRunning/StatementRunRibbonView+Accessibility.swift b/Packages/TableProEditor/Sources/TableProEditorKit/StatementRunning/StatementRunRibbonView+Accessibility.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/StatementRunning/StatementRunRibbonView+Accessibility.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/StatementRunning/StatementRunRibbonView+Accessibility.swift index 89314e1621..2549c6fccd 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/StatementRunning/StatementRunRibbonView+Accessibility.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/StatementRunning/StatementRunRibbonView+Accessibility.swift @@ -1,10 +1,10 @@ // // StatementRunRibbonView+Accessibility.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -import CodeEditTextView +import TableProTextEngine /// One statement's run control, as assistive technology sees it. /// diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/StatementRunning/StatementRunRibbonView+Draw.swift b/Packages/TableProEditor/Sources/TableProEditorKit/StatementRunning/StatementRunRibbonView+Draw.swift similarity index 96% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/StatementRunning/StatementRunRibbonView+Draw.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/StatementRunning/StatementRunRibbonView+Draw.swift index 420bf35ce6..1c81695d0e 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/StatementRunning/StatementRunRibbonView+Draw.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/StatementRunning/StatementRunRibbonView+Draw.swift @@ -1,10 +1,10 @@ // // StatementRunRibbonView+Draw.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -import CodeEditTextView +import TableProTextEngine extension StatementRunRibbonView { /// How dim a control is when running is not possible right now. diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/StatementRunning/StatementRunRibbonView.swift b/Packages/TableProEditor/Sources/TableProEditorKit/StatementRunning/StatementRunRibbonView.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/StatementRunning/StatementRunRibbonView.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/StatementRunning/StatementRunRibbonView.swift index bc278e7dff..8ae50ff928 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/StatementRunning/StatementRunRibbonView.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/StatementRunning/StatementRunRibbonView.swift @@ -1,10 +1,10 @@ // // StatementRunRibbonView.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -import CodeEditTextView +import TableProTextEngine /// Draws a run control beside each statement in the ``GutterView``. /// diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/BezelNotification.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/BezelNotification.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/BezelNotification.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/BezelNotification.swift index cf71c2fbd2..1ac2a3455c 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/BezelNotification.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/BezelNotification.swift @@ -1,6 +1,6 @@ // // BezelNotification.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Austin Condiff on 3/17/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/EffectView.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/EffectView.swift similarity index 100% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/EffectView.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/EffectView.swift diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/IconButtonStyle.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/IconButtonStyle.swift similarity index 100% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/IconButtonStyle.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/IconButtonStyle.swift diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/IconToggleStyle.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/IconToggleStyle.swift similarity index 100% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/IconToggleStyle.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/IconToggleStyle.swift diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/PanelStyles.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/PanelStyles.swift similarity index 100% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/PanelStyles.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/PanelStyles.swift diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/PanelTextField.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/PanelTextField.swift similarity index 100% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/PanelTextField.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/PanelTextField.swift diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/SourceEditorClipView.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/SourceEditorClipView.swift similarity index 96% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/SourceEditorClipView.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/SourceEditorClipView.swift index bca26ca63c..863433649f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/SourceEditorClipView.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/SourceEditorClipView.swift @@ -1,10 +1,10 @@ // // SourceEditorClipView.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -import CodeEditTextView +import TableProTextEngine /// The editor's clip view, which adds the room the floating views take to the insets AppKit works out for it. /// diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/SourceEditorScrollView.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/SourceEditorScrollView.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/SourceEditorScrollView.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/SourceEditorScrollView.swift index 4ab0173504..a12012aaf1 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/SourceEditorScrollView.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/SourceEditorScrollView.swift @@ -1,10 +1,10 @@ // // SourceEditorScrollView.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -import CodeEditTextView +import TableProTextEngine /// The editor's scroll view, which keeps the text clear of the views floating along its leading and trailing edges. /// diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/SourceEditorTextView.swift b/Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/SourceEditorTextView.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/SourceEditorTextView.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/SourceEditorTextView.swift index dab11921f1..b32b95346e 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/SupportingViews/SourceEditorTextView.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/SupportingViews/SourceEditorTextView.swift @@ -1,12 +1,12 @@ // // SourceEditorTextView.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 7/23/25. // import AppKit -import CodeEditTextView +import TableProTextEngine final class SourceEditorTextView: TextView { /// The span of the statement the caret sits in, painted as a band behind the text. diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TextViewCoordinator/CombineCoordinator.swift b/Packages/TableProEditor/Sources/TableProEditorKit/TextViewCoordinator/CombineCoordinator.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TextViewCoordinator/CombineCoordinator.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/TextViewCoordinator/CombineCoordinator.swift index d0101ca50b..727b6496b5 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TextViewCoordinator/CombineCoordinator.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/TextViewCoordinator/CombineCoordinator.swift @@ -1,13 +1,13 @@ // // CombineCoordinator.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/19/24. // -import CodeEditTextView import Combine import Foundation +import TableProTextEngine /// A ``TextViewCoordinator`` class that publishes text changes and selection changes using Combine publishers. /// diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TextViewCoordinator/TextViewCoordinator.swift b/Packages/TableProEditor/Sources/TableProEditorKit/TextViewCoordinator/TextViewCoordinator.swift similarity index 96% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TextViewCoordinator/TextViewCoordinator.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/TextViewCoordinator/TextViewCoordinator.swift index 9d91aa7d3d..d09b1b654a 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TextViewCoordinator/TextViewCoordinator.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/TextViewCoordinator/TextViewCoordinator.swift @@ -1,6 +1,6 @@ // // TextViewCoordinator.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 11/14/23. // @@ -18,7 +18,7 @@ import AppKit /// messages this protocol provides. /// /// Conforming objects can also be used to get more detailed text editing notifications by conforming to the -/// `TextViewDelegate` (from CodeEditTextView) protocol. In that case they'll receive most text change notifications. +/// `TextViewDelegate` (from TableProTextEngine) protocol. In that case they'll receive most text change notifications. public protocol TextViewCoordinator: AnyObject { /// Called when an instance of ``TextViewController`` is available. Use this method to install any delegates, /// perform any modifications on the text view or controller, or capture the text view for later use in your app. diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Theme/EditorTheme.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Theme/EditorTheme.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Theme/EditorTheme.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Theme/EditorTheme.swift index c408e822de..657d4a6914 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Theme/EditorTheme.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Theme/EditorTheme.swift @@ -1,6 +1,6 @@ // // EditorTheme.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Lukas Pistrol on 29.05.22. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Theme/ThemeAttributesProviding.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Theme/ThemeAttributesProviding.swift similarity index 93% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Theme/ThemeAttributesProviding.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Theme/ThemeAttributesProviding.swift index 7935943d5a..c88bb3113d 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Theme/ThemeAttributesProviding.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Theme/ThemeAttributesProviding.swift @@ -1,6 +1,6 @@ // // ThemeAttributesProviding.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 1/18/23. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/Atomic.swift b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/Atomic.swift similarity index 96% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/Atomic.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/Atomic.swift index b2815fbf65..e3ac7bff3f 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/Atomic.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/Atomic.swift @@ -1,6 +1,6 @@ // // Atomic.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 9/2/24. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/LanguageLayer.swift b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/LanguageLayer.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/LanguageLayer.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/LanguageLayer.swift index 936c7ef6a9..dd7efd0301 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/LanguageLayer.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/LanguageLayer.swift @@ -1,6 +1,6 @@ // // TreeSitterClient+LanguageLayer.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 3/8/23. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Edit.swift b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterClient+Edit.swift similarity index 100% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Edit.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterClient+Edit.swift diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Highlight.swift b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterClient+Highlight.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Highlight.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterClient+Highlight.swift index 73db285bf3..791fa0b498 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Highlight.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterClient+Highlight.swift @@ -1,6 +1,6 @@ // // TreeSitterClient+Highlight.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 3/10/23. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Query.swift b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterClient+Query.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Query.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterClient+Query.swift index fff178df37..8e8c949f5e 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Query.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterClient+Query.swift @@ -1,6 +1,6 @@ // // TreeSitterClient+Query.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/27/24. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Temporary.swift b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterClient+Temporary.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Temporary.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterClient+Temporary.swift index 2874aa68dd..e7d906441a 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient+Temporary.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterClient+Temporary.swift @@ -1,6 +1,6 @@ // // TreeSitterClient+Temporary.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 7/24/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient.swift b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterClient.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterClient.swift index ec93d031b5..3b0a26a9b3 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterClient.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterClient.swift @@ -1,15 +1,15 @@ // // TreeSitterClient.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 9/12/22. // -import CodeEditTextView import Foundation import OSLog import SwiftTreeSitter import TableProGrammars +import TableProTextEngine /// # TreeSitterClient /// @@ -90,11 +90,11 @@ public final class TreeSitterClient: HighlightProviding { public static var longParseTimeout: Duration = .seconds(0.5) /// The notification name sent when a long parse is detected. - public static let longParse: Notification.Name = .init("CodeEditSourceEditor.longParseNotification") + public static let longParse: Notification.Name = .init("TableProEditorKit.longParseNotification") /// The notification name sent when a long parse is finished. public static let longParseFinished: Notification.Name = .init( - "CodeEditSourceEditor.longParseFinishedNotification" + "TableProEditorKit.longParseFinishedNotification" ) /// The duration tasks sleep before checking if they're runnable. diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterExecutor.swift b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterExecutor.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterExecutor.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterExecutor.swift index 668b87b5a9..769b5915fa 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterExecutor.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterExecutor.swift @@ -1,6 +1,6 @@ // // TreeSitterExecutor.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 9/2/24. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterState.swift b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterState.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterState.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterState.swift index 944e9987dd..777f1909f2 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/TreeSitter/TreeSitterState.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/TreeSitter/TreeSitterState.swift @@ -1,6 +1,6 @@ // // TreeSitterState.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/21/23. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Utils/CursorPosition.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Utils/CursorPosition.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Utils/CursorPosition.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Utils/CursorPosition.swift index 805b874f2e..81c586c52b 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Utils/CursorPosition.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Utils/CursorPosition.swift @@ -1,6 +1,6 @@ // // CursorPosition.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 11/13/23. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Utils/EmphasisGroup.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Utils/EmphasisGroup.swift similarity index 87% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Utils/EmphasisGroup.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Utils/EmphasisGroup.swift index 37a52b93c4..16614a4783 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Utils/EmphasisGroup.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Utils/EmphasisGroup.swift @@ -1,6 +1,6 @@ // // EmphasisGroup.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 4/7/25. // diff --git a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Utils/WeakCoordinator.swift b/Packages/TableProEditor/Sources/TableProEditorKit/Utils/WeakCoordinator.swift similarity index 94% rename from LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Utils/WeakCoordinator.swift rename to Packages/TableProEditor/Sources/TableProEditorKit/Utils/WeakCoordinator.swift index cc5090a12a..45e15f2ab1 100644 --- a/LocalPackages/CodeEditSourceEditor/Sources/CodeEditSourceEditor/Utils/WeakCoordinator.swift +++ b/Packages/TableProEditor/Sources/TableProEditorKit/Utils/WeakCoordinator.swift @@ -1,6 +1,6 @@ // // WeakCoordinator.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 9/13/24. // diff --git a/Packages/TableProEditor/Sources/TableProTextEngine/CodeEditTextView.swift b/Packages/TableProEditor/Sources/TableProTextEngine/CodeEditTextView.swift new file mode 100644 index 0000000000..0857914c49 --- /dev/null +++ b/Packages/TableProEditor/Sources/TableProTextEngine/CodeEditTextView.swift @@ -0,0 +1,11 @@ +/// This file is purely for helping in the transition from `TableProTextEngine` to `TableProEditorKit` +/// The struct here is an empty view, and will be removed in a future release. + +import SwiftUI + +@available(*, unavailable, renamed: "TableProEditorKit", message: "TableProTextEngine has moved to https://github.com/CodeEditApp/TableProEditorKit, please update any dependencies to use this new repository URL.") +struct TableProTextEngine: View { + var body: some View { + EmptyView() + } +} diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Cursors/CursorSelectionMode.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Cursors/CursorSelectionMode.swift similarity index 86% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Cursors/CursorSelectionMode.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Cursors/CursorSelectionMode.swift index 7a7da3ed0f..16b341c0f2 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Cursors/CursorSelectionMode.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Cursors/CursorSelectionMode.swift @@ -1,6 +1,6 @@ // // CursorSelectionMode.swift -// CodeEditTextView +// TableProTextEngine // // Created by Abe Malla on 3/31/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Cursors/CursorTimer.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Cursors/CursorTimer.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Cursors/CursorTimer.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Cursors/CursorTimer.swift index 71526d0bf4..e9ce4a621f 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Cursors/CursorTimer.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Cursors/CursorTimer.swift @@ -1,6 +1,6 @@ // // CursorTimer.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 1/16/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Cursors/CursorView.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Cursors/CursorView.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Cursors/CursorView.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Cursors/CursorView.swift index 836d5646fa..c6b514aa6f 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Cursors/CursorView.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Cursors/CursorView.swift @@ -1,6 +1,6 @@ // // CursorView.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/15/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/EmphasisManager/Emphasis.swift b/Packages/TableProEditor/Sources/TableProTextEngine/EmphasisManager/Emphasis.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/EmphasisManager/Emphasis.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/EmphasisManager/Emphasis.swift index e7e13989cb..8c960742ea 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/EmphasisManager/Emphasis.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/EmphasisManager/Emphasis.swift @@ -1,6 +1,6 @@ // // Emphasis.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 3/31/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/EmphasisManager/EmphasisManager.swift b/Packages/TableProEditor/Sources/TableProTextEngine/EmphasisManager/EmphasisManager.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/EmphasisManager/EmphasisManager.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/EmphasisManager/EmphasisManager.swift index baa5a59f31..88229f7396 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/EmphasisManager/EmphasisManager.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/EmphasisManager/EmphasisManager.swift @@ -1,6 +1,6 @@ // // EmphasisManager.swift -// CodeEditTextView +// TableProTextEngine // // Created by Tom Ludwig on 05.11.24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/EmphasisManager/EmphasisStyle.swift b/Packages/TableProEditor/Sources/TableProTextEngine/EmphasisManager/EmphasisStyle.swift similarity index 97% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/EmphasisManager/EmphasisStyle.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/EmphasisManager/EmphasisStyle.swift index 66b32a8621..91f033b1e7 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/EmphasisManager/EmphasisStyle.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/EmphasisManager/EmphasisStyle.swift @@ -1,6 +1,6 @@ // // EmphasisStyle.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 3/31/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/EmphasisManager/EmphasisToolTips.swift b/Packages/TableProEditor/Sources/TableProTextEngine/EmphasisManager/EmphasisToolTips.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/EmphasisManager/EmphasisToolTips.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/EmphasisManager/EmphasisToolTips.swift index aae4071cc7..c2014e067f 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/EmphasisManager/EmphasisToolTips.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/EmphasisManager/EmphasisToolTips.swift @@ -1,6 +1,6 @@ // // EmphasisToolTips.swift -// CodeEditTextView +// TableProTextEngine // import AppKit diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/CGRectArray+BoundingRect.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/CGRectArray+BoundingRect.swift similarity index 95% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/CGRectArray+BoundingRect.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/CGRectArray+BoundingRect.swift index c813be1f73..34625193c4 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/CGRectArray+BoundingRect.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/CGRectArray+BoundingRect.swift @@ -1,6 +1,6 @@ // // File.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 7/17/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/CTTypesetter+SuggestLineBreak.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/CTTypesetter+SuggestLineBreak.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/CTTypesetter+SuggestLineBreak.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/CTTypesetter+SuggestLineBreak.swift index fefe985306..01921a4f5c 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/CTTypesetter+SuggestLineBreak.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/CTTypesetter+SuggestLineBreak.swift @@ -1,6 +1,6 @@ // // CTTypesetter+SuggestLineBreak.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 4/24/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/CharacterSet.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/CharacterSet.swift similarity index 93% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/CharacterSet.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/CharacterSet.swift index 0d59bc9705..2d19d27b35 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/CharacterSet.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/CharacterSet.swift @@ -1,6 +1,6 @@ // // CharacterSet.swift -// CodeEditTextView +// TableProTextEngine // // Created by Abe Malla on 3/29/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/GC+ApproximateEqual.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/GC+ApproximateEqual.swift similarity index 97% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/GC+ApproximateEqual.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/GC+ApproximateEqual.swift index 0777d73448..b74d5e7a87 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/GC+ApproximateEqual.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/GC+ApproximateEqual.swift @@ -1,6 +1,6 @@ // // GC+ApproximateEqual.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 2/16/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+CGPathFallback.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSBezierPath+CGPathFallback.swift similarity index 97% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+CGPathFallback.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSBezierPath+CGPathFallback.swift index 7ae6f619ea..782c260126 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+CGPathFallback.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSBezierPath+CGPathFallback.swift @@ -1,6 +1,6 @@ // // NSBezierPath+CGPathFallback.swift -// CodeEditTextView +// TableProTextEngine // // Created by Tom Ludwig on 27.11.24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+DrawableBounds.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSBezierPath+DrawableBounds.swift similarity index 95% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+DrawableBounds.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSBezierPath+DrawableBounds.swift index c7ce62a67b..48c2561c3d 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+DrawableBounds.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSBezierPath+DrawableBounds.swift @@ -1,6 +1,6 @@ // // NSBezierPath+DrawableBounds.swift -// CodeEditTextView +// TableProTextEngine // import AppKit diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+SmoothPath.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSBezierPath+SmoothPath.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+SmoothPath.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSBezierPath+SmoothPath.swift index 4ed737640f..8b383e71f3 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSBezierPath+SmoothPath.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSBezierPath+SmoothPath.swift @@ -1,6 +1,6 @@ // // NSBezierPath+SmoothPath.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Tom Ludwig on 12.11.24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSColor+Greyscale.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSColor+Greyscale.swift similarity index 95% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSColor+Greyscale.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSColor+Greyscale.swift index 4afd858ab9..00ab097228 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSColor+Greyscale.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSColor+Greyscale.swift @@ -1,6 +1,6 @@ // // NSColor+Greyscale.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 2/2/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSColor+Hex.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSColor+Hex.swift similarity index 94% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSColor+Hex.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSColor+Hex.swift index d52f6a0d4e..c5afa91523 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSColor+Hex.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSColor+Hex.swift @@ -1,6 +1,6 @@ // // NSColor+Hex.swift -// CodeEditTextView +// TableProTextEngine // // Created by Tom Ludwig on 27.11.24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSColor+SafeCGColor.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSColor+SafeCGColor.swift similarity index 100% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSColor+SafeCGColor.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSColor+SafeCGColor.swift diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+clamped.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+clamped.swift similarity index 96% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+clamped.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+clamped.swift index 241614a97e..7355beef8f 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+clamped.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+clamped.swift @@ -1,6 +1,6 @@ // // NSRange+clamped.swift -// CodeEditTextView +// TableProTextEngine // import Foundation diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+init.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+init.swift similarity index 90% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+init.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+init.swift index 0c8c8e6a00..7e4b16c090 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+init.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+init.swift @@ -1,6 +1,6 @@ // // NSRange.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/20/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+isEmpty.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+isEmpty.swift similarity index 88% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+isEmpty.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+isEmpty.swift index 61ae0bc040..aa08ac83f4 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+isEmpty.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+isEmpty.swift @@ -1,6 +1,6 @@ // // NSRange+isEmpty.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/23/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+overlaps.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+overlaps.swift similarity index 95% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+overlaps.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+overlaps.swift index d320fd3a97..a372415330 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+overlaps.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+overlaps.swift @@ -1,6 +1,6 @@ // // NSRange+overlaps.swift -// CodeEditTextView +// TableProTextEngine // import Foundation diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+resolved.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+resolved.swift similarity index 97% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+resolved.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+resolved.swift index f905812c7c..8a3692b13d 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+resolved.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+resolved.swift @@ -1,6 +1,6 @@ // // NSRange+resolved.swift -// CodeEditTextView +// TableProTextEngine // import Foundation diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+translate.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+translate.swift similarity index 91% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+translate.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+translate.swift index 40f6251ccd..f43624024f 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSRange+/NSRange+translate.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSRange+/NSRange+translate.swift @@ -1,6 +1,6 @@ // // NSRange+translate.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 7/21/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSTextStorage+getLine.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSTextStorage+getLine.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSTextStorage+getLine.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSTextStorage+getLine.swift index f45a0b790c..eb6a66ba3e 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/NSTextStorage+getLine.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/NSTextStorage+getLine.swift @@ -1,6 +1,6 @@ // // NSTextStorage+getLine.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 9/3/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/PixelAligned.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/PixelAligned.swift similarity index 95% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/PixelAligned.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Extensions/PixelAligned.swift index 7a1c22d9c3..79c7e3ccd8 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Extensions/PixelAligned.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Extensions/PixelAligned.swift @@ -1,6 +1,6 @@ // // PixelAligned.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 9/10/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/InvisibleCharacters/InvisibleCharactersDelegate.swift b/Packages/TableProEditor/Sources/TableProTextEngine/InvisibleCharacters/InvisibleCharactersDelegate.swift similarity index 95% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/InvisibleCharacters/InvisibleCharactersDelegate.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/InvisibleCharacters/InvisibleCharactersDelegate.swift index c011de3ce5..34eaa5767a 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/InvisibleCharacters/InvisibleCharactersDelegate.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/InvisibleCharacters/InvisibleCharactersDelegate.swift @@ -1,6 +1,6 @@ // // InvisibleCharactersConfig.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/9/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/MarkedTextManager/MarkedRanges.swift b/Packages/TableProEditor/Sources/TableProTextEngine/MarkedTextManager/MarkedRanges.swift similarity index 93% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/MarkedTextManager/MarkedRanges.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/MarkedTextManager/MarkedRanges.swift index 3cfcdbafd2..7bd6593dd9 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/MarkedTextManager/MarkedRanges.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/MarkedTextManager/MarkedRanges.swift @@ -1,6 +1,6 @@ // // MarkedRanges.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 4/17/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/MarkedTextManager/MarkedTextManager.swift b/Packages/TableProEditor/Sources/TableProTextEngine/MarkedTextManager/MarkedTextManager.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/MarkedTextManager/MarkedTextManager.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/MarkedTextManager/MarkedTextManager.swift index 31122749cf..b36e5835e1 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/MarkedTextManager/MarkedTextManager.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/MarkedTextManager/MarkedTextManager.swift @@ -1,6 +1,6 @@ // // MarkedTextManager.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 11/7/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacter.swift b/Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacter.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacter.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacter.swift index f90b1245e3..09ab4be410 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacter.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacter.swift @@ -1,6 +1,6 @@ // // SpecialCharacter.swift -// CodeEditTextView +// TableProTextEngine // import Foundation diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacterDisplay.swift b/Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacterDisplay.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacterDisplay.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacterDisplay.swift index 27a80d6133..4629c2408c 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacterDisplay.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacterDisplay.swift @@ -1,6 +1,6 @@ // // SpecialCharacterDisplay.swift -// CodeEditTextView +// TableProTextEngine // import AppKit diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacterGeometry.swift b/Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacterGeometry.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacterGeometry.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacterGeometry.swift index 79fbacbe32..844816533a 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacterGeometry.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacterGeometry.swift @@ -1,6 +1,6 @@ // // SpecialCharacterGeometry.swift -// CodeEditTextView +// TableProTextEngine // import AppKit diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacterMarkRenderer.swift b/Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacterMarkRenderer.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacterMarkRenderer.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacterMarkRenderer.swift index 54f4c464e7..e0f83b970c 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacterMarkRenderer.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacterMarkRenderer.swift @@ -1,6 +1,6 @@ // // SpecialCharacterMarkRenderer.swift -// CodeEditTextView +// TableProTextEngine // import AppKit diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacterMarksLayer.swift b/Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacterMarksLayer.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacterMarksLayer.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacterMarksLayer.swift index 8d2f4ef3e7..bb901f5eba 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacterMarksLayer.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacterMarksLayer.swift @@ -1,6 +1,6 @@ // // SpecialCharacterMarksLayer.swift -// CodeEditTextView +// TableProTextEngine // import AppKit diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacterStyle.swift b/Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacterStyle.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacterStyle.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacterStyle.swift index ed0133c162..3118f0f669 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/SpecialCharacters/SpecialCharacterStyle.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/SpecialCharacters/SpecialCharacterStyle.swift @@ -1,6 +1,6 @@ // // SpecialCharacterStyle.swift -// CodeEditTextView +// TableProTextEngine // import AppKit diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextAttachments/TextAttachment.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextAttachments/TextAttachment.swift similarity index 93% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextAttachments/TextAttachment.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextAttachments/TextAttachment.swift index a737e4e640..eade35bf8b 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextAttachments/TextAttachment.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextAttachments/TextAttachment.swift @@ -1,6 +1,6 @@ // // TextAttachment.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 4/24/25. // @@ -43,7 +43,7 @@ public extension TextAttachment { /// Type-erasing type for ``TextAttachment`` that also contains range information about the attachment. /// -/// This type cannot be initialized outside of `CodeEditTextView`, but will be received when interrogating +/// This type cannot be initialized outside of `TableProTextEngine`, but will be received when interrogating /// the ``TextAttachmentManager``. public struct AnyTextAttachment: Equatable { package(set) public var range: NSRange diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextAttachments/TextAttachmentManager.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextAttachments/TextAttachmentManager.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextAttachments/TextAttachmentManager.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextAttachments/TextAttachmentManager.swift index efe723525c..2dd6e519f3 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextAttachments/TextAttachmentManager.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextAttachments/TextAttachmentManager.swift @@ -1,6 +1,6 @@ // // TextAttachmentManager.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 4/24/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextAttachments/TextAttachmentManagerDelegate.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextAttachments/TextAttachmentManagerDelegate.swift similarity index 93% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextAttachments/TextAttachmentManagerDelegate.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextAttachments/TextAttachmentManagerDelegate.swift index c5b363b00f..92253c6f8f 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextAttachments/TextAttachmentManagerDelegate.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextAttachments/TextAttachmentManagerDelegate.swift @@ -1,6 +1,6 @@ // // TextAttachmentManagerDelegate.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/25/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Edits.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager+Edits.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Edits.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager+Edits.swift index 4b02b0f9b1..9e9009d9d4 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Edits.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager+Edits.swift @@ -1,6 +1,6 @@ // // TextLayoutManager+Edits.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 9/3/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Invalidation.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager+Invalidation.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Invalidation.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager+Invalidation.swift index db1c279d1b..6268a4bbf4 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Invalidation.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager+Invalidation.swift @@ -1,6 +1,6 @@ // // TextLayoutManager+Invalidation.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 2/24/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Iterator.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager+Iterator.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Iterator.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager+Iterator.swift index f6a5e1ab8d..3999acbcf8 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Iterator.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager+Iterator.swift @@ -1,6 +1,6 @@ // // TextLayoutManager+Iterator.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/21/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Layout.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager+Layout.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Layout.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager+Layout.swift index 006af05a7c..d0984f6269 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Layout.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager+Layout.swift @@ -1,6 +1,6 @@ // // TextLayoutManager+ensureLayout.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 4/7/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Public.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager+Public.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Public.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager+Public.swift index 6fb89124eb..a3861e2166 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager+Public.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager+Public.swift @@ -1,6 +1,6 @@ // // TextLayoutManager+Public.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 9/13/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager.swift index 07a506b96d..b277ccabf8 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManager.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManager.swift @@ -1,6 +1,6 @@ // // TextLayoutManager.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/21/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManagerDelegate.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManagerDelegate.swift similarity index 97% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManagerDelegate.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManagerDelegate.swift index b9e36ef945..cf682921ae 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManagerDelegate.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManagerDelegate.swift @@ -1,6 +1,6 @@ // // TextLayoutManagerDelegate.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 4/10/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManagerRenderDelegate.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManagerRenderDelegate.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManagerRenderDelegate.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManagerRenderDelegate.swift index 7b2cb80b25..8faeef9fd4 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutManagerRenderDelegate.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutManagerRenderDelegate.swift @@ -1,6 +1,6 @@ // // TextLayoutManagerRenderDelegate.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 4/10/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutUpdate.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutUpdate.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutUpdate.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutUpdate.swift index 23cde0711a..926820d695 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLayoutManager/TextLayoutUpdate.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLayoutManager/TextLayoutUpdate.swift @@ -1,6 +1,6 @@ // // TextLayoutUpdate.swift -// CodeEditTextView +// TableProTextEngine // import Foundation diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/ClippedLineDrawing+CoreText.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/ClippedLineDrawing+CoreText.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/ClippedLineDrawing+CoreText.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLine/ClippedLineDrawing+CoreText.swift index 27fafb5339..d17dab96b5 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/ClippedLineDrawing+CoreText.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/ClippedLineDrawing+CoreText.swift @@ -1,6 +1,6 @@ // // ClippedLineDrawing+CoreText.swift -// CodeEditTextView +// TableProTextEngine // import AppKit diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/ClippedLineDrawing+Plan.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/ClippedLineDrawing+Plan.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/ClippedLineDrawing+Plan.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLine/ClippedLineDrawing+Plan.swift index 2fd662d37d..79e5e43251 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/ClippedLineDrawing+Plan.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/ClippedLineDrawing+Plan.swift @@ -1,6 +1,6 @@ // // ClippedLineDrawing+Plan.swift -// CodeEditTextView +// TableProTextEngine // import AppKit diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/ClippedLineDrawing.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/ClippedLineDrawing.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/ClippedLineDrawing.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLine/ClippedLineDrawing.swift index e07d3d2172..99e17d1cbf 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/ClippedLineDrawing.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/ClippedLineDrawing.swift @@ -1,6 +1,6 @@ // // ClippedLineDrawing.swift -// CodeEditTextView +// TableProTextEngine // import AppKit diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineBreakStrategy.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/LineBreakStrategy.swift similarity index 93% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineBreakStrategy.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLine/LineBreakStrategy.swift index 6ca4a80aed..4804431b22 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineBreakStrategy.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/LineBreakStrategy.swift @@ -1,6 +1,6 @@ // // LineBreakStrategy.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 9/19/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragment.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/LineFragment.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragment.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLine/LineFragment.swift index 2f924a2b0c..a3b2b902bd 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragment.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/LineFragment.swift @@ -1,12 +1,12 @@ // // LineFragment.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/29/23. // import AppKit -import CodeEditTextViewObjC +import TableProTextEngineObjC /// A ``LineFragment`` represents a subrange of characters in a line. Every text line contains at least one line /// fragments, and any lines that need to be broken due to width constraints will contain more than one fragment. diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragmentRenderer+Invisibles.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/LineFragmentRenderer+Invisibles.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragmentRenderer+Invisibles.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLine/LineFragmentRenderer+Invisibles.swift index 2af3c04956..e2e71bf991 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragmentRenderer+Invisibles.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/LineFragmentRenderer+Invisibles.swift @@ -1,6 +1,6 @@ // // LineFragmentRenderer+Invisibles.swift -// CodeEditTextView +// TableProTextEngine // import AppKit diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragmentRenderer.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/LineFragmentRenderer.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragmentRenderer.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLine/LineFragmentRenderer.swift index 29bf235e46..85bc157cd5 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragmentRenderer.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/LineFragmentRenderer.swift @@ -1,12 +1,12 @@ // // LineFragmentRenderer.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/10/25. // import AppKit -import CodeEditTextViewObjC +import TableProTextEngineObjC /// Manages drawing line fragments into a drawing context. public final class LineFragmentRenderer { diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragmentView.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/LineFragmentView.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragmentView.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLine/LineFragmentView.swift index 15026d1c8a..0645213001 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/LineFragmentView.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/LineFragmentView.swift @@ -1,6 +1,6 @@ // // LineFragmentView.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/14/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/TextLine.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/TextLine.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/TextLine.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLine/TextLine.swift index 9bffbdbfff..21fc92644d 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/TextLine.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/TextLine.swift @@ -1,6 +1,6 @@ // // TextLine.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/21/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/Typesetter/CTLineTypesetData.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/Typesetter/CTLineTypesetData.swift similarity index 92% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/Typesetter/CTLineTypesetData.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLine/Typesetter/CTLineTypesetData.swift index 7466a9e5d9..bb2754bf0c 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/Typesetter/CTLineTypesetData.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/Typesetter/CTLineTypesetData.swift @@ -1,6 +1,6 @@ // // CTLineTypesetData.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 4/24/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/Typesetter/LineFragmentTypesetContext.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/Typesetter/LineFragmentTypesetContext.swift similarity index 95% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/Typesetter/LineFragmentTypesetContext.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLine/Typesetter/LineFragmentTypesetContext.swift index f6bb487b28..0b08d10840 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/Typesetter/LineFragmentTypesetContext.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/Typesetter/LineFragmentTypesetContext.swift @@ -1,6 +1,6 @@ // // LineFragmentTypesetContext.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 4/24/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/Typesetter/TypesetContext.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/Typesetter/TypesetContext.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/Typesetter/TypesetContext.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLine/Typesetter/TypesetContext.swift index f5b6ab6df5..39c3d7d004 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/Typesetter/TypesetContext.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/Typesetter/TypesetContext.swift @@ -1,6 +1,6 @@ // // TypesetContext.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 4/24/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/Typesetter/Typesetter.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/Typesetter/Typesetter.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/Typesetter/Typesetter.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLine/Typesetter/Typesetter.swift index bed4d93452..e6fa0cf20e 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLine/Typesetter/Typesetter.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLine/Typesetter/Typesetter.swift @@ -1,6 +1,6 @@ // // Typesetter.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/21/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage+Iterator.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLineStorage/TextLineStorage+Iterator.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage+Iterator.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLineStorage/TextLineStorage+Iterator.swift index c79d4adcb3..f1316e1f1b 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage+Iterator.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLineStorage/TextLineStorage+Iterator.swift @@ -1,6 +1,6 @@ // // TextLineStorage+Iterator.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 7/16/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage+NSTextStorage.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLineStorage/TextLineStorage+NSTextStorage.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage+NSTextStorage.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLineStorage/TextLineStorage+NSTextStorage.swift index ab866ccc91..4004ff5183 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage+NSTextStorage.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLineStorage/TextLineStorage+NSTextStorage.swift @@ -1,6 +1,6 @@ // // TextLineStorage+NSTextStorage.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/21/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage+Node.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLineStorage/TextLineStorage+Node.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage+Node.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLineStorage/TextLineStorage+Node.swift index e143279231..b6499df2b8 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage+Node.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLineStorage/TextLineStorage+Node.swift @@ -1,6 +1,6 @@ // // TextLineStorage+Node.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/25/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage+Structs.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLineStorage/TextLineStorage+Structs.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage+Structs.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLineStorage/TextLineStorage+Structs.swift index b022a9b1cb..e490bed44e 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage+Structs.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLineStorage/TextLineStorage+Structs.swift @@ -1,6 +1,6 @@ // // TextLineStorage+Structs.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/24/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextLineStorage/TextLineStorage.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextLineStorage/TextLineStorage.swift index 3ba5e1a904..004d08cc71 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextLineStorage/TextLineStorage.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextLineStorage/TextLineStorage.swift @@ -1,6 +1,6 @@ // // TextLayoutLineStorage.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/25/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/Destination.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/Destination.swift similarity index 92% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/Destination.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/Destination.swift index c897448c52..2366b9ff94 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/Destination.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/Destination.swift @@ -1,6 +1,6 @@ // // Destination.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/20/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/Direction.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/Direction.swift similarity index 90% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/Direction.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/Direction.swift index 39cd2f86b7..2e07a7b63b 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/Direction.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/Direction.swift @@ -1,6 +1,6 @@ // // Direction.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/20/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/SelectionManipulation/SelectionManipulation+Horizontal.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/SelectionManipulation/SelectionManipulation+Horizontal.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/SelectionManipulation/SelectionManipulation+Horizontal.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/SelectionManipulation/SelectionManipulation+Horizontal.swift index 3480e5b25d..683e5c0ad0 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/SelectionManipulation/SelectionManipulation+Horizontal.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/SelectionManipulation/SelectionManipulation+Horizontal.swift @@ -1,6 +1,6 @@ // // SelectionManipulation+Horizontal.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 5/11/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/SelectionManipulation/SelectionManipulation+Vertical.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/SelectionManipulation/SelectionManipulation+Vertical.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/SelectionManipulation/SelectionManipulation+Vertical.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/SelectionManipulation/SelectionManipulation+Vertical.swift index 9ae4b10e8a..cbe4f8b99e 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/SelectionManipulation/SelectionManipulation+Vertical.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/SelectionManipulation/SelectionManipulation+Vertical.swift @@ -1,6 +1,6 @@ // // SelectionManipulation+Vertical.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 5/11/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/SelectionManipulation/TextSelectionManager+SelectionManipulation.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/SelectionManipulation/TextSelectionManager+SelectionManipulation.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/SelectionManipulation/TextSelectionManager+SelectionManipulation.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/SelectionManipulation/TextSelectionManager+SelectionManipulation.swift index eb7e8a349f..ebb83660fe 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/SelectionManipulation/TextSelectionManager+SelectionManipulation.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/SelectionManipulation/TextSelectionManager+SelectionManipulation.swift @@ -1,6 +1,6 @@ // // TextSelectionManager+SelectionManipulation.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/26/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelection.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelection.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelection.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelection.swift index 6609df0eca..b54a37a897 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelection.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelection.swift @@ -1,6 +1,6 @@ // // TextSelection.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/20/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Draw.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelectionManager+Draw.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Draw.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelectionManager+Draw.swift index 1b3e55855b..317c4b8c9f 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Draw.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelectionManager+Draw.swift @@ -1,6 +1,6 @@ // // TextSelectionManager+Draw.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 1/12/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+FillRects.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelectionManager+FillRects.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+FillRects.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelectionManager+FillRects.swift index 53fcd921a9..6eb8cfd9f2 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+FillRects.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelectionManager+FillRects.swift @@ -1,6 +1,6 @@ // // TextSelectionManager+FillRects.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 10/22/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Move.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelectionManager+Move.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Move.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelectionManager+Move.swift index 44569e46b1..49b516b4a6 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Move.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelectionManager+Move.swift @@ -1,6 +1,6 @@ // // TextSelectionManager+Move.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 9/20/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Update.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelectionManager+Update.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Update.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelectionManager+Update.swift index 91ebb706fd..e884ddcca6 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager+Update.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelectionManager+Update.swift @@ -1,6 +1,6 @@ // // TextSelectionManager+Update.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 10/22/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelectionManager.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelectionManager.swift index b59588361e..21fe683ff3 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextSelectionManager/TextSelectionManager.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextSelectionManager/TextSelectionManager.swift @@ -1,6 +1,6 @@ // // TextSelectionManager.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 7/17/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/DraggingTextRenderer.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/DraggingTextRenderer.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/DraggingTextRenderer.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/DraggingTextRenderer.swift index 09df7f22d2..732adaf094 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/DraggingTextRenderer.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/DraggingTextRenderer.swift @@ -1,6 +1,6 @@ // // DraggingTextRenderer.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 11/24/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Accessibility.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Accessibility.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Accessibility.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Accessibility.swift index 877a3b1518..9158f00fbe 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Accessibility.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Accessibility.swift @@ -1,6 +1,6 @@ // // TextView+Accessibility.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 10/14/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ColumnSelection.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+ColumnSelection.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ColumnSelection.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+ColumnSelection.swift index baccf379a1..9cdd073005 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ColumnSelection.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+ColumnSelection.swift @@ -1,6 +1,6 @@ // // TextView+ColumnSelection.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/19/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+CopyPaste.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+CopyPaste.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+CopyPaste.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+CopyPaste.swift index 166b073d9a..3e6a9e44b0 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+CopyPaste.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+CopyPaste.swift @@ -1,6 +1,6 @@ // // TextView+CopyPaste.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/21/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Delete.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Delete.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Delete.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Delete.swift index 4093df0a68..477c8b2518 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Delete.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Delete.swift @@ -1,6 +1,6 @@ // // TextView+Delete.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/24/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Drag.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Drag.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Drag.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Drag.swift index 149d43e1df..a8d6fe9aa1 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Drag.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Drag.swift @@ -1,6 +1,6 @@ // // TextView+Drag.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 10/20/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+FirstResponder.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+FirstResponder.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+FirstResponder.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+FirstResponder.swift index fbb33fc61d..e5c21bc5a4 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+FirstResponder.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+FirstResponder.swift @@ -1,6 +1,6 @@ // // TextView+FirstResponder.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/15/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Insert.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Insert.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Insert.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Insert.swift index 6415b66e3a..c07fed3405 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Insert.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Insert.swift @@ -1,6 +1,6 @@ // // TextView+Insert.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 9/3/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+KeyDown.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+KeyDown.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+KeyDown.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+KeyDown.swift index b26569f2f5..b1a237fd42 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+KeyDown.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+KeyDown.swift @@ -1,6 +1,6 @@ // // TextView+KeyDown.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/15/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Layout.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Layout.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Layout.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Layout.swift index d1ed9583e6..92843a680d 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Layout.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Layout.swift @@ -1,6 +1,6 @@ // // TextView+Layout.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/15/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Lifecycle.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Lifecycle.swift similarity index 97% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Lifecycle.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Lifecycle.swift index f5b6ac90e5..3eaf340fe2 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Lifecycle.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Lifecycle.swift @@ -1,6 +1,6 @@ // // TextView+Lifecycle.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 4/7/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Menu.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Menu.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Menu.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Menu.swift index d0f39adae4..871d8f03a4 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Menu.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Menu.swift @@ -1,6 +1,6 @@ // // TextView+Menu.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/21/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Mouse.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Mouse.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Mouse.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Mouse.swift index 3ba7b6d3a6..9436670ba3 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Mouse.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Mouse.swift @@ -1,6 +1,6 @@ // // TextView+Mouse.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 9/19/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Move.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Move.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Move.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Move.swift index 4b0b187e79..e1a0017368 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Move.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Move.swift @@ -1,6 +1,6 @@ // // TextView+Move.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 9/10/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+NSTextInput.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+NSTextInput.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+NSTextInput.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+NSTextInput.swift index 6e54231e60..b0cb219c6d 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+NSTextInput.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+NSTextInput.swift @@ -1,6 +1,6 @@ // // TextView+NSTextInput.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 7/16/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ReplaceCharacters.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+ReplaceCharacters.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ReplaceCharacters.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+ReplaceCharacters.swift index 8bd8e6ef9f..38512c9ac9 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ReplaceCharacters.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+ReplaceCharacters.swift @@ -1,6 +1,6 @@ // // TextView+ReplaceCharacters.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 9/3/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ScrollToVisible.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+ScrollToVisible.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ScrollToVisible.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+ScrollToVisible.swift index 0de00b9fb4..ff1495c24b 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+ScrollToVisible.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+ScrollToVisible.swift @@ -1,6 +1,6 @@ // // TextView+ScrollToVisible.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/15/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Select.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Select.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Select.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Select.swift index 22b369b8d9..894aeaf2ae 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Select.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Select.swift @@ -1,6 +1,6 @@ // // TextView+Select.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 10/20/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+SetText.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+SetText.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+SetText.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+SetText.swift index a0d918b839..455b231e07 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+SetText.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+SetText.swift @@ -1,6 +1,6 @@ // // TextView+SetText.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 1/12/25. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Setup.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Setup.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Setup.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Setup.swift index a17d390261..6eb32d8c76 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+Setup.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+Setup.swift @@ -1,6 +1,6 @@ // // TextView+Setup.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 9/15/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+StorageDelegate.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+StorageDelegate.swift similarity index 94% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+StorageDelegate.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+StorageDelegate.swift index 36f3734e39..a4bf7f16e3 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+StorageDelegate.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+StorageDelegate.swift @@ -1,6 +1,6 @@ // // TextView+StorageDelegate.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 11/8/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+TextLayoutManagerDelegate.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+TextLayoutManagerDelegate.swift similarity index 97% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+TextLayoutManagerDelegate.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+TextLayoutManagerDelegate.swift index b734f54ad1..03dd6b344d 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+TextLayoutManagerDelegate.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+TextLayoutManagerDelegate.swift @@ -1,6 +1,6 @@ // // TextView+TextLayoutManagerDelegate.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 9/15/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+TextSelectionManagerDelegate.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+TextSelectionManagerDelegate.swift similarity index 93% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+TextSelectionManagerDelegate.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+TextSelectionManagerDelegate.swift index 999b34eccf..1f34496547 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+TextSelectionManagerDelegate.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+TextSelectionManagerDelegate.swift @@ -1,6 +1,6 @@ // // TextView+TextSelectionManagerDelegate.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/15/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+UndoRedo.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+UndoRedo.swift similarity index 96% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+UndoRedo.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+UndoRedo.swift index cd2ee0cc49..fe37d109b8 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView+UndoRedo.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView+UndoRedo.swift @@ -1,6 +1,6 @@ // // TextView+UndoRedo.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/21/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView.swift index 4d357bbbe9..f441ccb3c7 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextView.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextView.swift @@ -1,6 +1,6 @@ // // TextView.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/21/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextViewDelegate.swift b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextViewDelegate.swift similarity index 97% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextViewDelegate.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextViewDelegate.swift index 244cd182de..7010aea998 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/TextView/TextViewDelegate.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/TextView/TextViewDelegate.swift @@ -1,6 +1,6 @@ // // TextViewDelegate.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 9/3/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/CEUndoManager.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Utils/CEUndoManager.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/CEUndoManager.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Utils/CEUndoManager.swift index 845df676a2..b2f3bf1d73 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/CEUndoManager.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Utils/CEUndoManager.swift @@ -1,6 +1,6 @@ // // CEUndoManager.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 7/8/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/HorizontalEdgeInsets.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Utils/HorizontalEdgeInsets.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/HorizontalEdgeInsets.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Utils/HorizontalEdgeInsets.swift index 6520100853..defa7997bf 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/HorizontalEdgeInsets.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Utils/HorizontalEdgeInsets.swift @@ -1,6 +1,6 @@ // // HorizontalEdgeInsets.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 9/11/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/KillRing.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Utils/KillRing.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/KillRing.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Utils/KillRing.swift index 889e982da0..0645451a6a 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/KillRing.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Utils/KillRing.swift @@ -1,6 +1,6 @@ // // KillRing.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/13/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/LineEnding.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Utils/LineEnding.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/LineEnding.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Utils/LineEnding.swift index f0957d491b..894a80cfa0 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/LineEnding.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Utils/LineEnding.swift @@ -1,6 +1,6 @@ // // LineEnding.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/16/23. // diff --git a/Packages/TableProEditor/Sources/TableProTextEngine/Utils/Logger.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Utils/Logger.swift new file mode 100644 index 0000000000..93817ed927 --- /dev/null +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Utils/Logger.swift @@ -0,0 +1,3 @@ +import os + +let logger = Logger(subsystem: "com.CodeEdit.TableProTextEngine", category: "TextView") diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/MultiStorageDelegate.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Utils/MultiStorageDelegate.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/MultiStorageDelegate.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Utils/MultiStorageDelegate.swift index 97350383d2..b3ba903df2 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/MultiStorageDelegate.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Utils/MultiStorageDelegate.swift @@ -1,6 +1,6 @@ // // MultiStorageDelegate.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 6/25/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/PasteboardTextReader.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Utils/PasteboardTextReader.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/PasteboardTextReader.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Utils/PasteboardTextReader.swift index dd1677561d..9c59c1117e 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/PasteboardTextReader.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Utils/PasteboardTextReader.swift @@ -1,6 +1,6 @@ // // PasteboardTextReader.swift -// CodeEditTextView +// TableProTextEngine // import AppKit diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/ViewReuseQueue.swift b/Packages/TableProEditor/Sources/TableProTextEngine/Utils/ViewReuseQueue.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/ViewReuseQueue.swift rename to Packages/TableProEditor/Sources/TableProTextEngine/Utils/ViewReuseQueue.swift index 3b85c6aebe..8e47af9b3d 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextView/Utils/ViewReuseQueue.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/Utils/ViewReuseQueue.swift @@ -1,6 +1,6 @@ // // ViewReuseQueue.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 8/14/23. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextViewObjC/CGContextHidden.m b/Packages/TableProEditor/Sources/TableProTextEngineObjC/CGContextHidden.m similarity index 92% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextViewObjC/CGContextHidden.m rename to Packages/TableProEditor/Sources/TableProTextEngineObjC/CGContextHidden.m index a5318ea643..34f2f3e213 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextViewObjC/CGContextHidden.m +++ b/Packages/TableProEditor/Sources/TableProTextEngineObjC/CGContextHidden.m @@ -1,6 +1,6 @@ // // CGContextHidden.m -// CodeEditTextViewObjC +// TableProTextEngineObjC // // Created by Khan Winter on 2/12/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextViewObjC/include/CGContextHidden.h b/Packages/TableProEditor/Sources/TableProTextEngineObjC/include/CGContextHidden.h similarity index 90% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextViewObjC/include/CGContextHidden.h rename to Packages/TableProEditor/Sources/TableProTextEngineObjC/include/CGContextHidden.h index 87a5aad125..48fa89c488 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextViewObjC/include/CGContextHidden.h +++ b/Packages/TableProEditor/Sources/TableProTextEngineObjC/include/CGContextHidden.h @@ -1,6 +1,6 @@ // // CGContextHidden.h -// CodeEditTextViewObjC +// TableProTextEngineObjC // // Created by Khan Winter on 2/12/24. // diff --git a/LocalPackages/CodeEditTextView/Sources/CodeEditTextViewObjC/include/module.modulemap b/Packages/TableProEditor/Sources/TableProTextEngineObjC/include/module.modulemap similarity index 50% rename from LocalPackages/CodeEditTextView/Sources/CodeEditTextViewObjC/include/module.modulemap rename to Packages/TableProEditor/Sources/TableProTextEngineObjC/include/module.modulemap index 8b431cb1f5..176e598db2 100644 --- a/LocalPackages/CodeEditTextView/Sources/CodeEditTextViewObjC/include/module.modulemap +++ b/Packages/TableProEditor/Sources/TableProTextEngineObjC/include/module.modulemap @@ -1,3 +1,3 @@ -module CodeEditTextViewObjC { +module TableProTextEngineObjC { header "CGContextHidden.h" } diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CaptureModifierSetTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/CaptureModifierSetTests.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CaptureModifierSetTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/CaptureModifierSetTests.swift index e83b44f0b8..06c814bd5b 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CaptureModifierSetTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/CaptureModifierSetTests.swift @@ -1,4 +1,4 @@ -@testable import CodeEditSourceEditor +@testable import TableProEditorKit import XCTest final class CaptureModifierSetTests: XCTestCase { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeEditSourceEditorTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/CodeEditSourceEditorTests.swift similarity index 92% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeEditSourceEditorTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/CodeEditSourceEditorTests.swift index f1e014c63c..5e3aed95b9 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeEditSourceEditorTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/CodeEditSourceEditorTests.swift @@ -1,8 +1,8 @@ -@testable import CodeEditSourceEditor +@testable import TableProEditorKit import XCTest // swiftlint:disable all -final class CodeEditSourceEditorTests: XCTestCase { +final class TableProEditorKitTests: XCTestCase { // MARK: NSFont Line Height diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionApplyTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionApplyTests.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionApplyTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionApplyTests.swift index 1079fc0b93..9d30f37829 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionApplyTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionApplyTests.swift @@ -1,6 +1,6 @@ import AppKit -@testable import CodeEditSourceEditor import SwiftUI +@testable import TableProEditorKit import XCTest final class SuggestionApplyTests: XCTestCase { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionControllerPlacementTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionControllerPlacementTests.swift similarity index 96% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionControllerPlacementTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionControllerPlacementTests.swift index 092792da77..d97f1ff73b 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionControllerPlacementTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionControllerPlacementTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditSourceEditor +@testable import TableProEditorKit import XCTest final class SuggestionControllerPlacementTests: XCTestCase { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionCursorsUpdatedTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionCursorsUpdatedTests.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionCursorsUpdatedTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionCursorsUpdatedTests.swift index 824a0cacd0..256bbf1f9c 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionCursorsUpdatedTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionCursorsUpdatedTests.swift @@ -1,6 +1,6 @@ import AppKit -@testable import CodeEditSourceEditor import SwiftUI +@testable import TableProEditorKit import XCTest final class SuggestionCursorsUpdatedTests: XCTestCase { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionPanelFocusTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionPanelFocusTests.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionPanelFocusTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionPanelFocusTests.swift index ec39a91593..770b45a339 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionPanelFocusTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionPanelFocusTests.swift @@ -1,6 +1,6 @@ import AppKit -@testable import CodeEditSourceEditor import SwiftUI +@testable import TableProEditorKit import XCTest final class SuggestionPanelFocusTests: XCTestCase { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionShowCompletionsGuardTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionShowCompletionsGuardTests.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionShowCompletionsGuardTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionShowCompletionsGuardTests.swift index 0972a9bfce..41b41be09e 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionShowCompletionsGuardTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionShowCompletionsGuardTests.swift @@ -1,6 +1,6 @@ import AppKit -@testable import CodeEditSourceEditor import SwiftUI +@testable import TableProEditorKit import XCTest final class SuggestionShowCompletionsGuardTests: XCTestCase { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionWindowPlacementTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionWindowPlacementTests.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionWindowPlacementTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionWindowPlacementTests.swift index 36158adcce..020db8a90d 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/SuggestionWindowPlacementTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/SuggestionWindowPlacementTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditSourceEditor +@testable import TableProEditorKit import XCTest final class SuggestionWindowPlacementTests: XCTestCase { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/TextViewControllerSuggestionsTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/TextViewControllerSuggestionsTests.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/TextViewControllerSuggestionsTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/TextViewControllerSuggestionsTests.swift index 1a81a3899c..374d4e0b1b 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/CodeSuggestion/TextViewControllerSuggestionsTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/CodeSuggestion/TextViewControllerSuggestionsTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditSourceEditor +@testable import TableProEditorKit import XCTest final class TextViewControllerSuggestionsTests: XCTestCase { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewController+IndentTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+IndentTests.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewController+IndentTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+IndentTests.swift index b61ad05052..7fc0c85d88 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewController+IndentTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+IndentTests.swift @@ -1,13 +1,13 @@ // // TextViewController+IndentTests.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Ludwig, Tom on 08.10.24. // -@testable import CodeEditSourceEditor -@testable import CodeEditTextView import CustomDump +@testable import TableProEditorKit +@testable import TableProTextEngine import XCTest final class TextViewControllerIndentTests: XCTestCase { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewController+MoveLinesTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+MoveLinesTests.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewController+MoveLinesTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+MoveLinesTests.swift index 48327fda79..43bb39029a 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewController+MoveLinesTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+MoveLinesTests.swift @@ -1,13 +1,13 @@ // // TextViewController+MoveLinesTests.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Bogdan Belogurov on 01/06/2025. // -@testable import CodeEditSourceEditor -@testable import CodeEditTextView import CustomDump +@testable import TableProEditorKit +@testable import TableProTextEngine import XCTest final class TextViewControllerMoveLinesTests: XCTestCase { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewControllerFloatingInsetsTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewControllerFloatingInsetsTests.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewControllerFloatingInsetsTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewControllerFloatingInsetsTests.swift index a66fb69918..fac114922e 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewControllerFloatingInsetsTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewControllerFloatingInsetsTests.swift @@ -1,11 +1,11 @@ // // TextViewControllerFloatingInsetsTests.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import Testing /// The editor keeps the start of every line clear of the gutter, whatever the document's width does (#2709). diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewControllerTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewControllerTests.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewControllerTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewControllerTests.swift index 8f36d1ffbf..263d807b95 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Controller/TextViewControllerTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewControllerTests.swift @@ -1,7 +1,7 @@ import AppKit -@testable import CodeEditSourceEditor import SwiftTreeSitter import SwiftUI +@testable import TableProEditorKit import TextStory import XCTest diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/FindPanelTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/FindPanelTests.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/FindPanelTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/FindPanelTests.swift index 64b0d97a33..c48af0e507 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/FindPanelTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/FindPanelTests.swift @@ -1,6 +1,6 @@ import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import Testing @MainActor diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/GutterNumberOffsetTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/GutterNumberOffsetTests.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/GutterNumberOffsetTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/GutterNumberOffsetTests.swift index 874435866f..b6461f1f11 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/GutterNumberOffsetTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/GutterNumberOffsetTests.swift @@ -1,11 +1,11 @@ // // GutterNumberOffsetTests.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import Testing /// Where the line number is actually painted, read back off the gutter. diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/HighlightProviderStateTest.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/HighlightProviderStateTest.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/HighlightProviderStateTest.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/HighlightProviderStateTest.swift index 6c1b53bd6e..a868b2d943 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/HighlightProviderStateTest.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/HighlightProviderStateTest.swift @@ -1,6 +1,6 @@ -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit import TableProGrammars +import TableProTextEngine import XCTest /// Because the provider state is mostly just passing messages between providers and the highlight state, what we need diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/HighlighterTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/HighlighterTests.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/HighlighterTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/HighlighterTests.swift index 0e0db2ac8b..8ff1fe45f2 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/HighlighterTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/HighlighterTests.swift @@ -1,6 +1,6 @@ -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit import TableProGrammars +import TableProTextEngine import XCTest final class HighlighterTests: XCTestCase { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/StyledRangeContainerTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/StyledRangeContainerTests.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/StyledRangeContainerTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/StyledRangeContainerTests.swift index c674e1b507..2407ca981c 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/StyledRangeContainerTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/StyledRangeContainerTests.swift @@ -1,4 +1,4 @@ -@testable import CodeEditSourceEditor +@testable import TableProEditorKit import XCTest final class StyledRangeContainerTests: XCTestCase { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/VisibleRangeProviderTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/VisibleRangeProviderTests.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/VisibleRangeProviderTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/VisibleRangeProviderTests.swift index da6740e3bd..f1cbe3a8d6 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Highlighting/VisibleRangeProviderTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/VisibleRangeProviderTests.swift @@ -1,4 +1,4 @@ -@testable import CodeEditSourceEditor +@testable import TableProEditorKit import XCTest final class VisibleRangeProviderTests: XCTestCase { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldAccessibilityTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldAccessibilityTests.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldAccessibilityTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldAccessibilityTests.swift index 83dca4592e..a58b9fc516 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldAccessibilityTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldAccessibilityTests.swift @@ -1,11 +1,11 @@ // // LineFoldAccessibilityTests.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import Testing /// The fold chevrons are drawn rather than hosted as views, which is what keeps scrolling a long document cheap. A diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldChunkBoundaryTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldChunkBoundaryTests.swift similarity index 96% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldChunkBoundaryTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldChunkBoundaryTests.swift index c36714d325..658af8eca6 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldChunkBoundaryTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldChunkBoundaryTests.swift @@ -1,11 +1,11 @@ // // LineFoldChunkBoundaryTests.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import Testing /// The fold calculator pulls lines from the provider 50 at a time, threading the running depth between calls. A local diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldCollapsePathTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldCollapsePathTests.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldCollapsePathTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldCollapsePathTests.swift index 425edf7f0f..b67c05e0cd 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldCollapsePathTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldCollapsePathTests.swift @@ -1,11 +1,11 @@ // // LineFoldCollapsePathTests.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import Testing /// A fold can be toggled from the gutter's chevron or by clicking the placeholder that stands in for it, and the two diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldDocumentSwapTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldDocumentSwapTests.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldDocumentSwapTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldDocumentSwapTests.swift index be3daa8bef..4c87c0fbac 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldDocumentSwapTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldDocumentSwapTests.swift @@ -1,11 +1,11 @@ // // LineFoldDocumentSwapTests.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import Testing /// A recalculation deliberately carries collapse state across by depth and start offset, which is what keeps a region diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldHoverTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldHoverTests.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldHoverTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldHoverTests.swift index 404a065fb9..507ed6c301 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldHoverTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldHoverTests.swift @@ -1,11 +1,11 @@ // // LineFoldHoverTests.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import Testing /// The gutter's chevron and a collapsed fold's placeholder are two controls onto the same fold, so both report which diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldPlaceholderClickTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldPlaceholderClickTests.swift similarity index 93% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldPlaceholderClickTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldPlaceholderClickTests.swift index 316ee1dec3..15eb34cfeb 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldPlaceholderClickTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldPlaceholderClickTests.swift @@ -1,11 +1,11 @@ // // LineFoldPlaceholderClickTests.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import Testing /// A placeholder stands in for code the reader asked to hide and now wants back, so one click brings it back rather diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldRibbonLookupTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldRibbonLookupTests.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldRibbonLookupTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldRibbonLookupTests.swift index 5a3534cb85..118c972ee7 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldRibbonLookupTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldRibbonLookupTests.swift @@ -1,11 +1,11 @@ // // LineFoldRibbonLookupTests.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import Testing /// The ribbon draws one chevron per line that opens a fold, and that chevron has to fold the largest block starting diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldStorageTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldStorageTests.swift similarity index 96% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldStorageTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldStorageTests.swift index 08e94d1523..3e81e35f17 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldStorageTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldStorageTests.swift @@ -1,11 +1,11 @@ // // LineFoldStorageTests.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/29/25. // -@testable import CodeEditSourceEditor +@testable import TableProEditorKit import Testing struct LineFoldStorageTests { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldingModelTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldingModelTests.swift similarity index 96% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldingModelTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldingModelTests.swift index 750b1faa98..2ad1e47087 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/LineFoldingTests/LineFoldingModelTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldingModelTests.swift @@ -1,13 +1,13 @@ // // LineFoldingModelTests.swift -// CodeEditSourceEditor +// TableProEditorKit // // Created by Khan Winter on 5/8/25. // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import Testing @MainActor diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Mock.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/Mock.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Mock.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/Mock.swift index 3c98876d61..daa44928f8 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/Mock.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/Mock.swift @@ -1,8 +1,8 @@ import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView import Foundation +@testable import TableProEditorKit import TableProGrammars +import TableProTextEngine class MockHighlightProvider: HighlightProviding { var onSetUp: (CodeLanguage) -> Void diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/RangeStoreTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/RangeStoreTests.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/RangeStoreTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/RangeStoreTests.swift index 5a250a5576..2b39dcb514 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/RangeStoreTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/RangeStoreTests.swift @@ -1,4 +1,4 @@ -@testable import CodeEditSourceEditor +@testable import TableProEditorKit import Testing extension RangeStore { diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/RepresentableSyncPhaseTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/RepresentableSyncPhaseTests.swift similarity index 97% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/RepresentableSyncPhaseTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/RepresentableSyncPhaseTests.swift index 5df73d2f92..472959a5a3 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/RepresentableSyncPhaseTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/RepresentableSyncPhaseTests.swift @@ -1,6 +1,6 @@ import XCTest -@testable import CodeEditSourceEditor +@testable import TableProEditorKit final class RepresentableSyncPhaseTests: XCTestCase { @MainActor diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/SourceEditorBindingSyncTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/SourceEditorBindingSyncTests.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/SourceEditorBindingSyncTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/SourceEditorBindingSyncTests.swift index 77b9ff18b3..e1021ba2f0 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/SourceEditorBindingSyncTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/SourceEditorBindingSyncTests.swift @@ -2,8 +2,8 @@ import AppKit import SwiftUI import XCTest -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine final class SourceEditorBindingSyncTests: XCTestCase { var controller: TextViewController! diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/SourceEditorScrollViewTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/SourceEditorScrollViewTests.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/SourceEditorScrollViewTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/SourceEditorScrollViewTests.swift index fa140f79a0..d61815a959 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/SourceEditorScrollViewTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/SourceEditorScrollViewTests.swift @@ -1,11 +1,11 @@ // // SourceEditorScrollViewTests.swift -// CodeEditSourceEditor +// TableProEditorKit // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import Testing /// The editor's scroll view reserves the room its floating views take on the clip view (#2709). diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/TreeSitterClientTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/TreeSitterClientTests.swift similarity index 99% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/TreeSitterClientTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/TreeSitterClientTests.swift index 6a45f51388..00e57e60c8 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/TreeSitterClientTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/TreeSitterClientTests.swift @@ -1,5 +1,5 @@ -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import XCTest // swiftlint:disable all diff --git a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/TreeSitterExecutorTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/TreeSitterExecutorTests.swift similarity index 98% rename from LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/TreeSitterExecutorTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/TreeSitterExecutorTests.swift index b40d0c5cfd..141130d4cf 100644 --- a/LocalPackages/CodeEditSourceEditor/Tests/CodeEditSourceEditorTests/TreeSitterExecutorTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/TreeSitterExecutorTests.swift @@ -1,7 +1,7 @@ import Foundation import Testing -@testable import CodeEditSourceEditor +@testable import TableProEditorKit @Suite("Tree-sitter executor") struct TreeSitterExecutorTests { diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/AccessibilityTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/AccessibilityTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/AccessibilityTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/AccessibilityTests.swift index a5d449a362..568e1e4606 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/AccessibilityTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/AccessibilityTests.swift @@ -1,12 +1,12 @@ // // AccessibilityTests.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 7/17/25. // import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing @MainActor diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/ClippedLineDrawingFixtures.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/ClippedLineDrawingFixtures.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/ClippedLineDrawingFixtures.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/ClippedLineDrawingFixtures.swift index c4541a1dab..1878547b02 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/ClippedLineDrawingFixtures.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/ClippedLineDrawingFixtures.swift @@ -1,6 +1,6 @@ import AppKit -@testable import CodeEditTextView import CoreText +@testable import TableProTextEngine /// Names a line the plan has to judge, so a parameterised failure prints something readable. struct ClippedLineDrawingCase: CustomStringConvertible, Sendable { diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/ClippedLineDrawingRenderingTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/ClippedLineDrawingRenderingTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/ClippedLineDrawingRenderingTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/ClippedLineDrawingRenderingTests.swift index 7a13ca3100..fcd029ddde 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/ClippedLineDrawingRenderingTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/ClippedLineDrawingRenderingTests.swift @@ -1,6 +1,6 @@ import AppKit -@testable import CodeEditTextView import CoreText +@testable import TableProTextEngine import Testing @Suite("Clipped line drawing renders the same pixels") diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/ClippedLineDrawingTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/ClippedLineDrawingTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/ClippedLineDrawingTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/ClippedLineDrawingTests.swift index 4f1f3df60c..cf4d7c45a9 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/ClippedLineDrawingTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/ClippedLineDrawingTests.swift @@ -1,6 +1,6 @@ import AppKit -@testable import CodeEditTextView import CoreText +@testable import TableProTextEngine import Testing @Suite("Clipped line drawing") diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/CmdShiftLeftAtEndOfDocumentTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/CmdShiftLeftAtEndOfDocumentTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/CmdShiftLeftAtEndOfDocumentTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/CmdShiftLeftAtEndOfDocumentTests.swift index a1df2a60dd..472e8c222c 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/CmdShiftLeftAtEndOfDocumentTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/CmdShiftLeftAtEndOfDocumentTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing /// Regression tests for word-granularity selection extension when the cursor diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/CmdUpAtEndOfDocumentTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/CmdUpAtEndOfDocumentTests.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/CmdUpAtEndOfDocumentTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/CmdUpAtEndOfDocumentTests.swift index 68762a58f6..13e12435bf 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/CmdUpAtEndOfDocumentTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/CmdUpAtEndOfDocumentTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing /// Regression tests for vertical cursor moves when the cursor sits at the end of a line, diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/CopyPasteTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/CopyPasteTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/CopyPasteTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/CopyPasteTests.swift index 8788454c0b..3a02f85289 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/CopyPasteTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/CopyPasteTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing /// Regression tests for issue #2172, "sometimes pasting does not work". diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/CutLineTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/CutLineTests.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/CutLineTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/CutLineTests.swift index b347827f7c..849715290e 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/CutLineTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/CutLineTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing /// Covers the empty-selection line cut that backs Cmd+X cutting the current diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/EmphasisGeometryUpdateTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/EmphasisGeometryUpdateTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/EmphasisGeometryUpdateTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/EmphasisGeometryUpdateTests.swift index d3ef30e630..77c78c441b 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/EmphasisGeometryUpdateTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/EmphasisGeometryUpdateTests.swift @@ -1,6 +1,6 @@ import AppKit -@testable import CodeEditTextView import Foundation +@testable import TableProTextEngine import Testing /// Emphasis geometry follows the layout pass, not the drawing call. diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/EmphasisManagerTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/EmphasisManagerTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/EmphasisManagerTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/EmphasisManagerTests.swift index b88f377f7e..3d567d1734 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/EmphasisManagerTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/EmphasisManagerTests.swift @@ -1,6 +1,6 @@ import AppKit -@testable import CodeEditTextView import Foundation +@testable import TableProTextEngine import Testing @Suite() diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/IMEInputTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/IMEInputTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/IMEInputTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/IMEInputTests.swift index 3986b5ea36..d3b5e78067 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/IMEInputTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/IMEInputTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing /// Regression tests for IME commits (Pinyin / Rime / any system that uses marked text). diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/KillRingTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/KillRingTests.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/KillRingTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/KillRingTests.swift index 85726c10ea..d3ae1a3662 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/KillRingTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/KillRingTests.swift @@ -1,4 +1,4 @@ -@testable import CodeEditTextView +@testable import TableProTextEngine import XCTest class KillRingTests: XCTestCase { diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/OverridingLayoutManagerRenderingTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/OverridingLayoutManagerRenderingTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/OverridingLayoutManagerRenderingTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/OverridingLayoutManagerRenderingTests.swift index dceaf82d76..aab5f53969 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/OverridingLayoutManagerRenderingTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/OverridingLayoutManagerRenderingTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing class MockRenderDelegate: TextLayoutManagerRenderDelegate { diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerAttachmentsTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/TextLayoutManagerAttachmentsTests.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerAttachmentsTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/TextLayoutManagerAttachmentsTests.swift index 40e64a415e..7ed482fdc3 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerAttachmentsTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/TextLayoutManagerAttachmentsTests.swift @@ -1,12 +1,12 @@ // // TextLayoutManagerAttachmentsTests.swift -// CodeEditTextView +// TableProTextEngine // // Created by Khan Winter on 5/5/25. // import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing @Suite diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerFragmentViewTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/TextLayoutManagerFragmentViewTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerFragmentViewTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/TextLayoutManagerFragmentViewTests.swift index 7db4d533da..21079ffe1d 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerFragmentViewTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/TextLayoutManagerFragmentViewTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing @Suite diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerLineWidthTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/TextLayoutManagerLineWidthTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerLineWidthTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/TextLayoutManagerLineWidthTests.swift index 923de003da..d614ab3ddc 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerLineWidthTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/TextLayoutManagerLineWidthTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing /// The document is as wide as the widest line it still has, in both directions (#2709). diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/TextLayoutManagerTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/TextLayoutManagerTests.swift index 023f6a40cb..651d4e2ff2 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LayoutManager/TextLayoutManagerTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/TextLayoutManagerTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing extension TextLineStorage { diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LineEndingTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/LineEndingTests.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LineEndingTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/LineEndingTests.swift index e3068c7ea8..fd63f6a69d 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LineEndingTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/LineEndingTests.swift @@ -1,4 +1,4 @@ -@testable import CodeEditTextView +@testable import TableProTextEngine import XCTest class LineEndingTests: XCTestCase { diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LineFragmentRendererTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/LineFragmentRendererTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LineFragmentRendererTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/LineFragmentRendererTests.swift index fd8aac3afd..74f58b09a9 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LineFragmentRendererTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/LineFragmentRendererTests.swift @@ -1,6 +1,6 @@ import AppKit -@testable import CodeEditTextView import CoreText +@testable import TableProTextEngine import Testing /// Counts how often the renderer reaches for the document's text. diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LineSeparatorLineModelTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/LineSeparatorLineModelTests.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LineSeparatorLineModelTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/LineSeparatorLineModelTests.swift index 12bde1d737..c6064e1eca 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/LineSeparatorLineModelTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/LineSeparatorLineModelTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing @Suite("Lines break at LF, CR and CRLF only") diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/MarkedTextTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/MarkedTextTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/MarkedTextTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/MarkedTextTests.swift index e938295d9f..68f26a144b 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/MarkedTextTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/MarkedTextTests.swift @@ -1,4 +1,4 @@ -@testable import CodeEditTextView +@testable import TableProTextEngine import XCTest class MarkedTextTests: XCTestCase { diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/NSBezierPathSmoothPathTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/NSBezierPathSmoothPathTests.swift similarity index 96% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/NSBezierPathSmoothPathTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/NSBezierPathSmoothPathTests.swift index 5585e0fb8a..c88dc6722b 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/NSBezierPathSmoothPathTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/NSBezierPathSmoothPathTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing @Suite() diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/NSTextInputRangeGuardTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/NSTextInputRangeGuardTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/NSTextInputRangeGuardTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/NSTextInputRangeGuardTests.swift index 5876968172..e2830c813e 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/NSTextInputRangeGuardTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/NSTextInputRangeGuardTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing /// Input services, accessibility clients and the view's own marked-text bookkeeping all hand the diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/SelectAllWithTrailingNewlineTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/SelectAllWithTrailingNewlineTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/SelectAllWithTrailingNewlineTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/SelectAllWithTrailingNewlineTests.swift index 62491ad10b..182fd49f59 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/SelectAllWithTrailingNewlineTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/SelectAllWithTrailingNewlineTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing /// Regression tests for Cmd+A (`selectAll:`) when the buffer has a trailing diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/SelectionBehaviourTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/SelectionBehaviourTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/SelectionBehaviourTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/SelectionBehaviourTests.swift index a787ea4cdc..9346a0e56b 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/SelectionBehaviourTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/SelectionBehaviourTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing private final class InvalidationSpy: TextSelectionManagerDelegate { diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/SelectionGeometryTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/SelectionGeometryTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/SelectionGeometryTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/SelectionGeometryTests.swift index aec034f785..73ea42510b 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/SelectionGeometryTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/SelectionGeometryTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing /// A delegate that reports a viewport unrelated to the rect being drawn. diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/SpecialCharacterLayoutTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/SpecialCharacterLayoutTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/SpecialCharacterLayoutTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/SpecialCharacterLayoutTests.swift index 24715f3c76..2e38488bdf 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/SpecialCharacterLayoutTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/SpecialCharacterLayoutTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing @Suite("Special character layout") diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/SpecialCharacterTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/SpecialCharacterTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/SpecialCharacterTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/SpecialCharacterTests.swift index 57e981a700..2de042c827 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/SpecialCharacterTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/SpecialCharacterTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing @Suite("Special character classification") diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextInputControlCharacterTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/TextInputControlCharacterTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextInputControlCharacterTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/TextInputControlCharacterTests.swift index f29eaf7735..f531d83ecd 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextInputControlCharacterTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/TextInputControlCharacterTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing @Suite("Control characters from text input") diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextLayoutLineStorageTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/TextLayoutLineStorageTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextLayoutLineStorageTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/TextLayoutLineStorageTests.swift index d21511b84b..b6b7a07f58 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextLayoutLineStorageTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/TextLayoutLineStorageTests.swift @@ -1,4 +1,4 @@ -@testable import CodeEditTextView +@testable import TableProTextEngine import XCTest fileprivate extension CGFloat { diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextLineDisplayRangeTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/TextLineDisplayRangeTests.swift similarity index 97% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextLineDisplayRangeTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/TextLineDisplayRangeTests.swift index 54d9faf5d0..5ecb9c2436 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextLineDisplayRangeTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/TextLineDisplayRangeTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing /// The line storage is updated from the edited range and can be longer than the string it indexes diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextSelectionManagerTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/TextSelectionManagerTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextSelectionManagerTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/TextSelectionManagerTests.swift index 4e90b637cb..99c7d7f448 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextSelectionManagerTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/TextSelectionManagerTests.swift @@ -1,4 +1,4 @@ -@testable import CodeEditTextView +@testable import TableProTextEngine import XCTest final class TextSelectionManagerTests: XCTestCase { diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextViewDragImageTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/TextViewDragImageTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextViewDragImageTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/TextViewDragImageTests.swift index 255dc95b5d..2c0e1a5628 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextViewDragImageTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/TextViewDragImageTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing /// The image the user drags covers what they can see of the selection, never the whole document. diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextViewScrollInsetsTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/TextViewScrollInsetsTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextViewScrollInsetsTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/TextViewScrollInsetsTests.swift index 02057c5dfe..e0d79a6292 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextViewScrollInsetsTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/TextViewScrollInsetsTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing /// A text view keeps its text out from under whatever its scroll view reserves over the leading and trailing edges diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextViewTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/TextViewTests.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextViewTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/TextViewTests.swift index b1b85a5873..a6ed5afbb4 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TextViewTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/TextViewTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing @Suite diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TypesetterTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/TypesetterTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TypesetterTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/TypesetterTests.swift index 91fd8cc6f7..2c8560dc94 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/TypesetterTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/TypesetterTests.swift @@ -1,4 +1,4 @@ -@testable import CodeEditTextView +@testable import TableProTextEngine import XCTest final class DemoTextAttachment: TextAttachment { diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/VisualLineEndOfDocumentTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/VisualLineEndOfDocumentTests.swift similarity index 98% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/VisualLineEndOfDocumentTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/VisualLineEndOfDocumentTests.swift index c273d0e73c..fe043b78d8 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/VisualLineEndOfDocumentTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/VisualLineEndOfDocumentTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing /// Regression tests for cmd+arrow (visualLine destination) when the cursor sits at, or one diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/WordNavigationUnicodeTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/WordNavigationUnicodeTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/WordNavigationUnicodeTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/WordNavigationUnicodeTests.swift index a2894aea40..838cc58973 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/WordNavigationUnicodeTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/WordNavigationUnicodeTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing @Suite diff --git a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/WordSelectionTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/WordSelectionTests.swift similarity index 99% rename from LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/WordSelectionTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/WordSelectionTests.swift index 9781f202ee..68b71c18aa 100644 --- a/LocalPackages/CodeEditTextView/Tests/CodeEditTextViewTests/WordSelectionTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/WordSelectionTests.swift @@ -1,5 +1,5 @@ import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Testing @Suite diff --git a/TablePro/Core/AI/InlineSuggestion/GhostTextRenderer.swift b/TablePro/Core/AI/InlineSuggestion/GhostTextRenderer.swift index 11aeb1e88f..1370dd3509 100644 --- a/TablePro/Core/AI/InlineSuggestion/GhostTextRenderer.swift +++ b/TablePro/Core/AI/InlineSuggestion/GhostTextRenderer.swift @@ -4,9 +4,9 @@ // @preconcurrency import AppKit -import CodeEditSourceEditor -import CodeEditTextView import os +import TableProEditorKit +import TableProTextEngine @MainActor final class GhostTextRenderer { @@ -54,7 +54,7 @@ final class GhostTextRenderer { attributes: attrs ) - // isFlipped = true in CodeEditTextView, so y=0 is top — coords match layoutManager directly + // isFlipped = true in TableProTextEngine, so y=0 is top — coords match layoutManager directly layer.frame = CGRect( x: rect.origin.x, y: rect.origin.y, diff --git a/TablePro/Core/AI/InlineSuggestion/InlineSuggestionManager.swift b/TablePro/Core/AI/InlineSuggestion/InlineSuggestionManager.swift index 71d4b73559..455b207ca2 100644 --- a/TablePro/Core/AI/InlineSuggestion/InlineSuggestionManager.swift +++ b/TablePro/Core/AI/InlineSuggestion/InlineSuggestionManager.swift @@ -4,9 +4,9 @@ // @preconcurrency import AppKit -import CodeEditSourceEditor -import CodeEditTextView import os +import TableProEditorKit +import TableProTextEngine @MainActor final class InlineSuggestionManager { diff --git a/TablePro/Core/Services/Infrastructure/ClipboardService.swift b/TablePro/Core/Services/Infrastructure/ClipboardService.swift index 7d520e9cfb..6440713766 100644 --- a/TablePro/Core/Services/Infrastructure/ClipboardService.swift +++ b/TablePro/Core/Services/Infrastructure/ClipboardService.swift @@ -4,8 +4,8 @@ // import AppKit -import CodeEditTextView import TableProPluginKit +import TableProTextEngine import UniformTypeIdentifiers struct GridRowsClipboardPayload: Codable, Equatable { diff --git a/TablePro/Core/Utilities/SQL/InvisibleCharacterRemover.swift b/TablePro/Core/Utilities/SQL/InvisibleCharacterRemover.swift index d98ccb39f4..77c4f7e8ca 100644 --- a/TablePro/Core/Utilities/SQL/InvisibleCharacterRemover.swift +++ b/TablePro/Core/Utilities/SQL/InvisibleCharacterRemover.swift @@ -3,8 +3,8 @@ // TablePro // -import CodeEditTextView import Foundation +import TableProTextEngine internal enum InvisibleCharacterRemover { private static let lineBreaks: Set = [0x85, 0x2028, 0x2029] diff --git a/TablePro/Core/Utilities/Text/RevealedText.swift b/TablePro/Core/Utilities/Text/RevealedText.swift index 29033a2ca0..b33f0f8795 100644 --- a/TablePro/Core/Utilities/Text/RevealedText.swift +++ b/TablePro/Core/Utilities/Text/RevealedText.swift @@ -3,8 +3,8 @@ // TablePro // -import CodeEditTextView import Foundation +import TableProTextEngine internal struct RevealedText: Equatable, Sendable { internal enum Segment: Equatable, Sendable { diff --git a/TablePro/Core/Vim/VimCursorManager.swift b/TablePro/Core/Vim/VimCursorManager.swift index 37324754c5..e181d6a530 100644 --- a/TablePro/Core/Vim/VimCursorManager.swift +++ b/TablePro/Core/Vim/VimCursorManager.swift @@ -6,15 +6,15 @@ // Shows a block cursor (character-width rectangle) in Normal/Visual modes // and hides it to show the default I-beam cursor in Insert mode. // -// On macOS 14+, CodeEditTextView uses NSTextInsertionIndicator (system cursor) +// On macOS 14+, TableProTextEngine uses NSTextInsertionIndicator (system cursor) // instead of its internal CursorView. Setting insertionPointColor only affects // CursorView, so we must directly set displayMode on NSTextInsertionIndicator // subviews to hide/show the I-beam. // import AppKit -import CodeEditTextView import os +import TableProTextEngine /// Manages Vim-style block cursor rendering on the text view @MainActor @@ -114,7 +114,7 @@ final class VimCursorManager { // Ensure system cursor stays hidden (it can be recreated during selection changes). // Hide immediately, then defer another hide to catch cursor views that - // CodeEditTextView creates after the selection change notification fires + // TableProTextEngine creates after the selection change notification fires // (e.g., double-click word selection recreates NSTextInsertionIndicator views). hideSystemCursor() scheduleDeferredHide() diff --git a/TablePro/Core/Vim/VimEngine+InsertReplace.swift b/TablePro/Core/Vim/VimEngine+InsertReplace.swift index 4a98d00e58..ea721bd704 100644 --- a/TablePro/Core/Vim/VimEngine+InsertReplace.swift +++ b/TablePro/Core/Vim/VimEngine+InsertReplace.swift @@ -3,8 +3,8 @@ // TablePro // -import CodeEditTextView import Foundation +import TableProTextEngine enum VimInsertControl: Character { case outdentLine = "\u{04}" diff --git a/TablePro/Core/Vim/VimEngine+Operators.swift b/TablePro/Core/Vim/VimEngine+Operators.swift index 2b1a4e17cb..ef2c795ddc 100644 --- a/TablePro/Core/Vim/VimEngine+Operators.swift +++ b/TablePro/Core/Vim/VimEngine+Operators.swift @@ -3,8 +3,8 @@ // TablePro // -import CodeEditTextView import Foundation +import TableProTextEngine extension VimEngine { func executeOperatorWithMotion( diff --git a/TablePro/Core/Vim/VimKeyInterceptor.swift b/TablePro/Core/Vim/VimKeyInterceptor.swift index 7cbbeba48e..964b5de325 100644 --- a/TablePro/Core/Vim/VimKeyInterceptor.swift +++ b/TablePro/Core/Vim/VimKeyInterceptor.swift @@ -6,9 +6,9 @@ // @preconcurrency import AppKit -import CodeEditSourceEditor -import CodeEditTextView import os +import TableProEditorKit +import TableProTextEngine /// Which window a key event seen by the app-wide monitor belongs to enum VimKeyEventScope: Equatable { diff --git a/TablePro/Core/Vim/VimTextBufferAdapter.swift b/TablePro/Core/Vim/VimTextBufferAdapter.swift index 5747c5e914..cf6e958d33 100644 --- a/TablePro/Core/Vim/VimTextBufferAdapter.swift +++ b/TablePro/Core/Vim/VimTextBufferAdapter.swift @@ -2,14 +2,14 @@ // VimTextBufferAdapter.swift // TablePro // -// Adapts CodeEditTextView's TextView to the VimTextBuffer protocol +// Adapts TableProTextEngine's TextView to the VimTextBuffer protocol // import AppKit -import CodeEditTextView import Foundation +import TableProTextEngine -/// Bridges CodeEditTextView's TextView to VimTextBuffer for the Vim engine +/// Bridges TableProTextEngine's TextView to VimTextBuffer for the Vim engine @MainActor final class VimTextBufferAdapter: VimTextBuffer { private weak var textView: TextView? diff --git a/TablePro/Resources/ThirdPartyLicenses/licenses.yml b/TablePro/Resources/ThirdPartyLicenses/licenses.yml index 414fb68601..120d3cf1b9 100644 --- a/TablePro/Resources/ThirdPartyLicenses/licenses.yml +++ b/TablePro/Resources/ThirdPartyLicenses/licenses.yml @@ -23,7 +23,7 @@ Zero `$s6BigInt` symbols in the app dylib. - id: codeeditsourceeditor name: CodeEditSourceEditor - version: vendored (no upstream tag recorded in the tree) + version: vendored at 1fa4d3c3f, 2026-03; see Packages/TableProEditor/ORIGIN.md spdx: MIT copyrights: - Copyright (c) 2022 CodeEdit @@ -32,13 +32,14 @@ textFile: texts/codeeditsourceeditor.txt source: manual patched: false - notes: 'LICENSE.md present at the package root. First 3 lines: "MIT License" / "" / "Copyright (c) 2022 - CodeEdit". Vendored fork with local modifications (its Package.swift points CodeEditTextView and TableProGrammars - at local paths). MIT requires the copyright notice and permission notice be reproduced. Confirmed - linked: 83+ `$s21CodeEditSourceEditor` symbols in the app dylib.' + notes: 'Vendored as the TableProEditorKit target of Packages/TableProEditor. The notice travels with + the sources at Packages/TableProEditor/LICENSE-CodeEditSourceEditor.md, and ORIGIN.md beside it records + the upstream commit and what TablePro changed. First 3 lines of the notice: "MIT License" / "" / + "Copyright (c) 2022 CodeEdit". MIT requires the copyright notice and permission notice be reproduced. + Heavily modified: roughly 7,000 lines of TablePro source across this target and TableProTextEngine.' - id: codeedittextview name: CodeEditTextView - version: vendored (no upstream tag recorded in the tree) + version: vendored at d7ac3f11f, 2026-03; see Packages/TableProEditor/ORIGIN.md spdx: MIT copyrights: - Copyright (c) 2023 CodeEdit @@ -47,9 +48,9 @@ textFile: texts/codeedittextview.txt source: manual patched: false - notes: 'LICENSE.md present at the package root. First 3 lines: "MIT License" / "" / "Copyright (c) 2023 - CodeEdit". Note the year differs from CodeEditSourceEditor (2023 vs 2022), so the two notices are - NOT interchangeable.' + notes: 'Vendored as the TableProTextEngine and TableProTextEngineObjC targets of Packages/TableProEditor. + The notice travels with the sources at Packages/TableProEditor/LICENSE-CodeEditTextView.md. Note the + year differs from CodeEditSourceEditor (2023 vs 2022), so the two notices are NOT interchangeable.' - id: cassandra-cpp-driver name: DataStax C/C++ Driver for Apache Cassandra version: 2.17.1 diff --git a/TablePro/Theme/ThemeEngine.swift b/TablePro/Theme/ThemeEngine.swift index 165c5afdc1..506933d46f 100644 --- a/TablePro/Theme/ThemeEngine.swift +++ b/TablePro/Theme/ThemeEngine.swift @@ -7,12 +7,12 @@ // import AppKit -import CodeEditSourceEditor import Combine import Foundation import Observation import os import SwiftUI +import TableProEditorKit // MARK: - Font Caches @@ -280,7 +280,7 @@ internal final class ThemeEngine { self.wordWrap = wordWrap } - // MARK: - CodeEditSourceEditor Theme + // MARK: - TableProEditorKit Theme func makeEditorTheme() -> EditorTheme { let c = colors.editor diff --git a/TablePro/Views/AIChat/AIChatCodeBlockView.swift b/TablePro/Views/AIChat/AIChatCodeBlockView.swift index 4fdb2146c8..c9de2f144c 100644 --- a/TablePro/Views/AIChat/AIChatCodeBlockView.swift +++ b/TablePro/Views/AIChat/AIChatCodeBlockView.swift @@ -4,8 +4,8 @@ // import AppKit -import CodeEditSourceEditor import SwiftUI +import TableProEditorKit import TableProGrammars struct AIChatCodeBlockView: View, Equatable { diff --git a/TablePro/Views/Components/SQLReviewSheet.swift b/TablePro/Views/Components/SQLReviewSheet.swift index 44d9acd0c2..2baa5b2859 100644 --- a/TablePro/Views/Components/SQLReviewSheet.swift +++ b/TablePro/Views/Components/SQLReviewSheet.swift @@ -4,8 +4,8 @@ // import AppKit -import CodeEditSourceEditor import SwiftUI +import TableProEditorKit import TableProGrammars import TableProPluginKit diff --git a/TablePro/Views/Editor/EditorEventRouter.swift b/TablePro/Views/Editor/EditorEventRouter.swift index 1983d32780..9e5aacdea4 100644 --- a/TablePro/Views/Editor/EditorEventRouter.swift +++ b/TablePro/Views/Editor/EditorEventRouter.swift @@ -7,7 +7,7 @@ // @preconcurrency import AppKit -import CodeEditTextView +import TableProTextEngine @MainActor internal final class EditorEventRouter { diff --git a/TablePro/Views/Editor/EditorPeripherals.swift b/TablePro/Views/Editor/EditorPeripherals.swift index e31bbf158f..f8f7de7a5f 100644 --- a/TablePro/Views/Editor/EditorPeripherals.swift +++ b/TablePro/Views/Editor/EditorPeripherals.swift @@ -3,7 +3,7 @@ // TablePro // -import CodeEditSourceEditor +import TableProEditorKit /// Builds the gutter and rail settings every code editor in the app shares. /// diff --git a/TablePro/Views/Editor/Folding/FoldPreviewController.swift b/TablePro/Views/Editor/Folding/FoldPreviewController.swift index 9158bc5c56..ea0e551567 100644 --- a/TablePro/Views/Editor/Folding/FoldPreviewController.swift +++ b/TablePro/Views/Editor/Folding/FoldPreviewController.swift @@ -4,8 +4,8 @@ // import AppKit -import CodeEditSourceEditor import SwiftUI +import TableProEditorKit import TableProGrammars /// Shows the block behind a collapsed fold while the pointer rests on its placeholder. @@ -61,7 +61,7 @@ final class FoldPreviewController: NSObject { // MARK: - Hover - /// Reports where the pointer is, from ``CodeEditSourceEditor/TextViewCoordinator``. + /// Reports where the pointer is, from ``TableProEditorKit/TextViewCoordinator``. func hoverDidChange(to hit: CollapsedFoldHit?) { guard hit != activeHit else { return } diff --git a/TablePro/Views/Editor/Folding/FoldPreviewView.swift b/TablePro/Views/Editor/Folding/FoldPreviewView.swift index 269b7a8af3..28ab3c19db 100644 --- a/TablePro/Views/Editor/Folding/FoldPreviewView.swift +++ b/TablePro/Views/Editor/Folding/FoldPreviewView.swift @@ -4,8 +4,8 @@ // import AppKit -import CodeEditSourceEditor import SwiftUI +import TableProEditorKit import TableProGrammars /// The block behind a collapsed fold, shown while the pointer rests on its placeholder. diff --git a/TablePro/Views/Editor/Folding/FoldProviderResolver.swift b/TablePro/Views/Editor/Folding/FoldProviderResolver.swift index a5f5fd1732..5707e7e77e 100644 --- a/TablePro/Views/Editor/Folding/FoldProviderResolver.swift +++ b/TablePro/Views/Editor/Folding/FoldProviderResolver.swift @@ -3,7 +3,7 @@ // TablePro // -import CodeEditSourceEditor +import TableProEditorKit import TableProGrammars import TableProPluginKit diff --git a/TablePro/Views/Editor/Folding/SQLLineFoldProvider.swift b/TablePro/Views/Editor/Folding/SQLLineFoldProvider.swift index 268e3193bf..ab2b2437f1 100644 --- a/TablePro/Views/Editor/Folding/SQLLineFoldProvider.swift +++ b/TablePro/Views/Editor/Folding/SQLLineFoldProvider.swift @@ -3,10 +3,10 @@ // TablePro // -import CodeEditSourceEditor -import CodeEditTextView import Foundation +import TableProEditorKit import TableProPluginKit +import TableProTextEngine /// Answers the editor's per-line fold queries from a whole-document scan. /// diff --git a/TablePro/Views/Editor/QueryCompletionAdapter.swift b/TablePro/Views/Editor/QueryCompletionAdapter.swift index 915c16e2c0..836d1144d7 100644 --- a/TablePro/Views/Editor/QueryCompletionAdapter.swift +++ b/TablePro/Views/Editor/QueryCompletionAdapter.swift @@ -2,15 +2,15 @@ // QueryCompletionAdapter.swift // TablePro // -// Bridges a per-language QueryCompletionService to CodeEditSourceEditor's +// Bridges a per-language QueryCompletionService to TableProEditorKit's // CodeSuggestionDelegate. // import AppKit -import CodeEditSourceEditor -import CodeEditTextView import SwiftUI +import TableProEditorKit import TableProPluginKit +import TableProTextEngine @MainActor final class QueryCompletionAdapter: CodeSuggestionDelegate { diff --git a/TablePro/Views/Editor/QueryDiagnosticsController.swift b/TablePro/Views/Editor/QueryDiagnosticsController.swift index 5f4237932f..b229b096dc 100644 --- a/TablePro/Views/Editor/QueryDiagnosticsController.swift +++ b/TablePro/Views/Editor/QueryDiagnosticsController.swift @@ -3,13 +3,13 @@ // TablePro // // Runs the language's diagnostic producer on a debounce and renders the result as underlines -// through CodeEditTextView's EmphasisManager, which owns its own drawing layer. +// through TableProTextEngine's EmphasisManager, which owns its own drawing layer. // import AppKit -import CodeEditSourceEditor -import CodeEditTextView import os +import TableProEditorKit +import TableProTextEngine @MainActor final class QueryDiagnosticsController { diff --git a/TablePro/Views/Editor/QueryEditorView.swift b/TablePro/Views/Editor/QueryEditorView.swift index aa6bfd91b3..24a9c0b096 100644 --- a/TablePro/Views/Editor/QueryEditorView.swift +++ b/TablePro/Views/Editor/QueryEditorView.swift @@ -5,9 +5,9 @@ // SQL query editor wrapper with toolbar // -import CodeEditSourceEditor import os import SwiftUI +import TableProEditorKit import TableProPluginKit /// SQL query editor view with execute button diff --git a/TablePro/Views/Editor/SQLEditorCoordinator+InvisibleCharacters.swift b/TablePro/Views/Editor/SQLEditorCoordinator+InvisibleCharacters.swift index 421f867b79..a12b69428f 100644 --- a/TablePro/Views/Editor/SQLEditorCoordinator+InvisibleCharacters.swift +++ b/TablePro/Views/Editor/SQLEditorCoordinator+InvisibleCharacters.swift @@ -4,9 +4,9 @@ // import AppKit -import CodeEditSourceEditor -import CodeEditTextView +import TableProEditorKit import TableProPluginKit +import TableProTextEngine extension SQLEditorCoordinator { func performRemoveInvisibleCharacters() { diff --git a/TablePro/Views/Editor/SQLEditorCoordinator.swift b/TablePro/Views/Editor/SQLEditorCoordinator.swift index ebbab9e1ed..29a1e28d04 100644 --- a/TablePro/Views/Editor/SQLEditorCoordinator.swift +++ b/TablePro/Views/Editor/SQLEditorCoordinator.swift @@ -2,17 +2,17 @@ // SQLEditorCoordinator.swift // TablePro // -// TextViewCoordinator for the CodeEditSourceEditor-based SQL editor. +// TextViewCoordinator for the TableProEditorKit-based SQL editor. // Handles find panel workarounds and horizontal scrolling fix. // import AppKit -import CodeEditSourceEditor -import CodeEditTextView import Combine import Observation import os +import TableProEditorKit import TableProPluginKit +import TableProTextEngine /// Coordinator for the SQL editor — manages find panel, horizontal scrolling, and scroll-to-match @Observable diff --git a/TablePro/Views/Editor/SQLEditorView.swift b/TablePro/Views/Editor/SQLEditorView.swift index e8073e3c2c..16096d7aad 100644 --- a/TablePro/Views/Editor/SQLEditorView.swift +++ b/TablePro/Views/Editor/SQLEditorView.swift @@ -2,20 +2,20 @@ // SQLEditorView.swift // TablePro // -// SwiftUI wrapper for CodeEditSourceEditor-based SQL editor +// SwiftUI wrapper for TableProEditorKit-based SQL editor // import AppKit -import CodeEditSourceEditor -import CodeEditTextView import Combine import SwiftUI +import TableProEditorKit import TableProGrammars import TableProPluginKit +import TableProTextEngine // MARK: - SQLEditorView -/// SwiftUI SQL editor powered by CodeEditSourceEditor +/// SwiftUI SQL editor powered by TableProEditorKit struct SQLEditorView: View { @Binding var text: String @Binding var cursorPositions: [CursorPosition] diff --git a/TablePro/Views/Editor/StatementRunController.swift b/TablePro/Views/Editor/StatementRunController.swift index f8ac697be8..29722a12d3 100644 --- a/TablePro/Views/Editor/StatementRunController.swift +++ b/TablePro/Views/Editor/StatementRunController.swift @@ -4,9 +4,9 @@ // import AppKit -import CodeEditSourceEditor -import CodeEditTextView +import TableProEditorKit import TableProPluginKit +import TableProTextEngine /// Which way a statement navigation command moves the caret. enum StatementNavigationDirection { diff --git a/TablePro/Views/Editor/TableProEditorTheme.swift b/TablePro/Views/Editor/TableProEditorTheme.swift index 2818cc527f..d3013b9349 100644 --- a/TablePro/Views/Editor/TableProEditorTheme.swift +++ b/TablePro/Views/Editor/TableProEditorTheme.swift @@ -2,13 +2,13 @@ // TableProEditorTheme.swift // TablePro // -// Adapts ThemeEngine colors to CodeEditSourceEditor's EditorTheme. +// Adapts ThemeEngine colors to TableProEditorKit's EditorTheme. // import AppKit -import CodeEditSourceEditor +import TableProEditorKit -/// Maps ThemeEngine's active theme to CodeEditSourceEditor's EditorTheme +/// Maps ThemeEngine's active theme to TableProEditorKit's EditorTheme struct TableProEditorTheme { @MainActor static func make() -> EditorTheme { diff --git a/TablePro/Views/Editor/TextViewController+FindActions.swift b/TablePro/Views/Editor/TextViewController+FindActions.swift index c65201ed6f..ee1d67c769 100644 --- a/TablePro/Views/Editor/TextViewController+FindActions.swift +++ b/TablePro/Views/Editor/TextViewController+FindActions.swift @@ -4,7 +4,7 @@ // import AppKit -import CodeEditSourceEditor +import TableProEditorKit /// The Edit menu's Find items are nil-targeted, so AppKit resolves them through the responder chain. /// `SourceEditor` is an `NSViewControllerRepresentable`, which makes `TextViewController` a child view diff --git a/TablePro/Views/Import/SQLCodePreview.swift b/TablePro/Views/Import/SQLCodePreview.swift index c5e06ff840..a34e21ccef 100644 --- a/TablePro/Views/Import/SQLCodePreview.swift +++ b/TablePro/Views/Import/SQLCodePreview.swift @@ -5,11 +5,11 @@ // Read-only SQL code preview with tree-sitter syntax highlighting // -import CodeEditSourceEditor import SwiftUI +import TableProEditorKit import TableProGrammars -/// Read-only SQL code preview with syntax highlighting powered by CodeEditSourceEditor +/// Read-only SQL code preview with syntax highlighting powered by TableProEditorKit struct SQLCodePreview: View { @Binding var text: String diff --git a/TablePro/Views/Main/Child/MainEditorContentView.swift b/TablePro/Views/Main/Child/MainEditorContentView.swift index 1de69d4ad2..5fe0d48975 100644 --- a/TablePro/Views/Main/Child/MainEditorContentView.swift +++ b/TablePro/Views/Main/Child/MainEditorContentView.swift @@ -7,8 +7,8 @@ // import AppKit -import CodeEditSourceEditor import SwiftUI +import TableProEditorKit import TableProPluginKit /// Identity for the visibility-scoped lazy-load `.task(id:)` modifier on diff --git a/TablePro/Views/Main/Extensions/MainContentCoordinator+Explain.swift b/TablePro/Views/Main/Extensions/MainContentCoordinator+Explain.swift index 3e6cf72bc6..f6e2d8f9eb 100644 --- a/TablePro/Views/Main/Extensions/MainContentCoordinator+Explain.swift +++ b/TablePro/Views/Main/Extensions/MainContentCoordinator+Explain.swift @@ -7,8 +7,8 @@ // gate and is fenced against a superseded result, the same way a normal query is. // -import CodeEditSourceEditor import Foundation +import TableProEditorKit import TableProPluginKit extension MainContentCoordinator { diff --git a/TablePro/Views/Main/Extensions/MainContentCoordinator+TabSwitch.swift b/TablePro/Views/Main/Extensions/MainContentCoordinator+TabSwitch.swift index 3a34fb3946..46150c5fd7 100644 --- a/TablePro/Views/Main/Extensions/MainContentCoordinator+TabSwitch.swift +++ b/TablePro/Views/Main/Extensions/MainContentCoordinator+TabSwitch.swift @@ -6,9 +6,9 @@ // to keep the main class body within SwiftLint limits. // -import CodeEditSourceEditor import Foundation import os +import TableProEditorKit extension MainContentCoordinator { func handleTabChange( diff --git a/TablePro/Views/Main/MainContentCommandActions+TextInputFocus.swift b/TablePro/Views/Main/MainContentCommandActions+TextInputFocus.swift index ef614176c4..a596a25698 100644 --- a/TablePro/Views/Main/MainContentCommandActions+TextInputFocus.swift +++ b/TablePro/Views/Main/MainContentCommandActions+TextInputFocus.swift @@ -54,7 +54,7 @@ extension MainContentCommandActions { } /// `NSTextInputClient` covers every responder that edits text: the SQL editor - /// (`CodeEditTextView.TextView` is `NSView`-based but conforms), an `NSTextView` + /// (`TableProTextEngine.TextView` is `NSView`-based but conforms), an `NSTextView` /// field editor over a grid cell, and the sidebar filter field. It excludes /// `NSTableView` and `NSOutlineView`, so selecting rows or sidebar tables keeps /// the grid commands enabled. diff --git a/TablePro/Views/Main/MainContentCoordinator.swift b/TablePro/Views/Main/MainContentCoordinator.swift index db6c308fae..13817a687a 100644 --- a/TablePro/Views/Main/MainContentCoordinator.swift +++ b/TablePro/Views/Main/MainContentCoordinator.swift @@ -6,12 +6,12 @@ // Separates view logic from presentation for better maintainability. // -import CodeEditSourceEditor import Combine import Foundation import Observation import os import SwiftUI +import TableProEditorKit import TableProPluginKit /// Discard action types for unified alert handling diff --git a/TablePro/Views/Results/JSONCodeEditor.swift b/TablePro/Views/Results/JSONCodeEditor.swift index 79fd161994..458cf9fb6b 100644 --- a/TablePro/Views/Results/JSONCodeEditor.swift +++ b/TablePro/Views/Results/JSONCodeEditor.swift @@ -2,13 +2,13 @@ // JSONCodeEditor.swift // TablePro // -// JSON text view backed by CodeEditSourceEditor (tree-sitter), sharing the +// JSON text view backed by TableProEditorKit (tree-sitter), sharing the // app's editor theme and font with the SQL editor. // import AppKit -import CodeEditSourceEditor import SwiftUI +import TableProEditorKit import TableProGrammars internal struct JSONCodeEditor: View { diff --git a/TablePro/Views/Structure/DDLTextView.swift b/TablePro/Views/Structure/DDLTextView.swift index 05ca37fb35..21f48dae60 100644 --- a/TablePro/Views/Structure/DDLTextView.swift +++ b/TablePro/Views/Structure/DDLTextView.swift @@ -2,15 +2,15 @@ // DDLTextView.swift // TablePro // -// Read-only DDL view with tree-sitter syntax highlighting via CodeEditSourceEditor +// Read-only DDL view with tree-sitter syntax highlighting via TableProEditorKit // -import CodeEditSourceEditor import SwiftUI +import TableProEditorKit import TableProGrammars import TableProPluginKit -/// Read-only DDL display with syntax highlighting powered by CodeEditSourceEditor +/// Read-only DDL display with syntax highlighting powered by TableProEditorKit struct DDLTextView: View { let ddl: String @Binding var fontSize: Double diff --git a/TablePro/Views/Structure/TriggerEditorView.swift b/TablePro/Views/Structure/TriggerEditorView.swift index a55a8b6ec9..a10267fa59 100644 --- a/TablePro/Views/Structure/TriggerEditorView.swift +++ b/TablePro/Views/Structure/TriggerEditorView.swift @@ -5,8 +5,8 @@ // DDL-first editor sheet for creating and editing triggers. // -import CodeEditSourceEditor import SwiftUI +import TableProEditorKit import TableProGrammars import TableProPluginKit diff --git a/TableProTests/Core/AI/InlineSuggestionManagerCompositionTests.swift b/TableProTests/Core/AI/InlineSuggestionManagerCompositionTests.swift index 92cc25311b..076a9f10cd 100644 --- a/TableProTests/Core/AI/InlineSuggestionManagerCompositionTests.swift +++ b/TableProTests/Core/AI/InlineSuggestionManagerCompositionTests.swift @@ -5,8 +5,8 @@ import AppKit import Carbon.HIToolbox -import CodeEditSourceEditor -import CodeEditTextView +import TableProEditorKit +import TableProTextEngine @testable import TablePro import Testing diff --git a/TableProTests/Core/Utilities/SQL/InvisibleCharacterRemoverTests.swift b/TableProTests/Core/Utilities/SQL/InvisibleCharacterRemoverTests.swift index db4ec7cce0..ffa10bf167 100644 --- a/TableProTests/Core/Utilities/SQL/InvisibleCharacterRemoverTests.swift +++ b/TableProTests/Core/Utilities/SQL/InvisibleCharacterRemoverTests.swift @@ -3,7 +3,7 @@ // TableProTests // -import CodeEditTextView +import TableProTextEngine import Foundation @testable import TablePro import TableProPluginKit diff --git a/TableProTests/Core/Utilities/SQL/SQLFoldPlaceholderLabelTests.swift b/TableProTests/Core/Utilities/SQL/SQLFoldPlaceholderLabelTests.swift index 650052a4fb..25bb11ba8d 100644 --- a/TableProTests/Core/Utilities/SQL/SQLFoldPlaceholderLabelTests.swift +++ b/TableProTests/Core/Utilities/SQL/SQLFoldPlaceholderLabelTests.swift @@ -3,7 +3,7 @@ // TableProTests // -import CodeEditSourceEditor +import TableProEditorKit import Foundation import Testing @testable import TablePro diff --git a/TableProTests/Core/Utilities/SQL/StatementBlankTests.swift b/TableProTests/Core/Utilities/SQL/StatementBlankTests.swift index b710825b7d..198303ab74 100644 --- a/TableProTests/Core/Utilities/SQL/StatementBlankTests.swift +++ b/TableProTests/Core/Utilities/SQL/StatementBlankTests.swift @@ -3,7 +3,7 @@ // TableProTests // -import CodeEditTextView +import TableProTextEngine import Foundation @testable import TablePro import Testing diff --git a/TableProTests/Core/Vim/VimTextBufferAdapterPerfTests.swift b/TableProTests/Core/Vim/VimTextBufferAdapterPerfTests.swift index ab850c87b9..1242ffa2c1 100644 --- a/TableProTests/Core/Vim/VimTextBufferAdapterPerfTests.swift +++ b/TableProTests/Core/Vim/VimTextBufferAdapterPerfTests.swift @@ -7,7 +7,7 @@ // import AppKit -import CodeEditTextView +import TableProTextEngine import TableProPluginKit @testable import TablePro import Testing diff --git a/TableProTests/Editor/PasteHighlightCancelTests.swift b/TableProTests/Editor/PasteHighlightCancelTests.swift index 6954a1c244..f805f16874 100644 --- a/TableProTests/Editor/PasteHighlightCancelTests.swift +++ b/TableProTests/Editor/PasteHighlightCancelTests.swift @@ -13,8 +13,8 @@ // import AppKit -@preconcurrency @testable import CodeEditSourceEditor -import CodeEditTextView +@preconcurrency @testable import TableProEditorKit +import TableProTextEngine import Foundation import Rearrange import TableProGrammars diff --git a/TableProTests/Views/Editor/EditorContextMenuRoutingTests.swift b/TableProTests/Views/Editor/EditorContextMenuRoutingTests.swift index 905d2a6a6d..32dca25433 100644 --- a/TableProTests/Views/Editor/EditorContextMenuRoutingTests.swift +++ b/TableProTests/Views/Editor/EditorContextMenuRoutingTests.swift @@ -9,7 +9,7 @@ // import AppKit -import CodeEditTextView +import TableProTextEngine import Testing @MainActor diff --git a/TableProTests/Views/Editor/EditorControllerFixture.swift b/TableProTests/Views/Editor/EditorControllerFixture.swift index ae1c2aad1b..95c3edcfaf 100644 --- a/TableProTests/Views/Editor/EditorControllerFixture.swift +++ b/TableProTests/Views/Editor/EditorControllerFixture.swift @@ -7,8 +7,8 @@ // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import TableProGrammars @MainActor diff --git a/TableProTests/Views/Editor/EditorKeyMonitorCompositionTests.swift b/TableProTests/Views/Editor/EditorKeyMonitorCompositionTests.swift index bec24f0647..f0f35dbb7b 100644 --- a/TableProTests/Views/Editor/EditorKeyMonitorCompositionTests.swift +++ b/TableProTests/Views/Editor/EditorKeyMonitorCompositionTests.swift @@ -5,8 +5,8 @@ import AppKit import Carbon.HIToolbox -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import SwiftUI import Testing diff --git a/TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift b/TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift index 85f7b01d71..837408c04d 100644 --- a/TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift +++ b/TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift @@ -9,8 +9,8 @@ // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import SwiftUI @testable import TablePro import Testing diff --git a/TableProTests/Views/Editor/EditorPeripheralSurfaceTests.swift b/TableProTests/Views/Editor/EditorPeripheralSurfaceTests.swift index 42e82fe3a7..7867dec7b1 100644 --- a/TableProTests/Views/Editor/EditorPeripheralSurfaceTests.swift +++ b/TableProTests/Views/Editor/EditorPeripheralSurfaceTests.swift @@ -4,8 +4,8 @@ // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine @testable import TablePro import TableProGrammars import Testing diff --git a/TableProTests/Views/Editor/EditorPeripheralsTests.swift b/TableProTests/Views/Editor/EditorPeripheralsTests.swift index 6a41ad4d92..48984a5ddc 100644 --- a/TableProTests/Views/Editor/EditorPeripheralsTests.swift +++ b/TableProTests/Views/Editor/EditorPeripheralsTests.swift @@ -3,7 +3,7 @@ // TableProTests // -import CodeEditSourceEditor +import TableProEditorKit import Foundation import Testing @testable import TablePro diff --git a/TableProTests/Views/Editor/FoldCommandBehaviourTests.swift b/TableProTests/Views/Editor/FoldCommandBehaviourTests.swift index f0a5ec6c27..c76f4920ff 100644 --- a/TableProTests/Views/Editor/FoldCommandBehaviourTests.swift +++ b/TableProTests/Views/Editor/FoldCommandBehaviourTests.swift @@ -4,8 +4,8 @@ // import AppKit -import CodeEditSourceEditor -import CodeEditTextView +import TableProEditorKit +import TableProTextEngine import Foundation @testable import TablePro import TableProGrammars diff --git a/TableProTests/Views/Editor/FoldGutterLayoutTests.swift b/TableProTests/Views/Editor/FoldGutterLayoutTests.swift index 902167c496..619d0a3ad2 100644 --- a/TableProTests/Views/Editor/FoldGutterLayoutTests.swift +++ b/TableProTests/Views/Editor/FoldGutterLayoutTests.swift @@ -4,8 +4,8 @@ // import AppKit -import CodeEditSourceEditor -import CodeEditTextView +import TableProEditorKit +import TableProTextEngine import Foundation @testable import TablePro import TableProGrammars diff --git a/TableProTests/Views/Editor/FoldPreviewHitTestTests.swift b/TableProTests/Views/Editor/FoldPreviewHitTestTests.swift index 1f378f296d..8586ced59d 100644 --- a/TableProTests/Views/Editor/FoldPreviewHitTestTests.swift +++ b/TableProTests/Views/Editor/FoldPreviewHitTestTests.swift @@ -4,8 +4,8 @@ // import AppKit -import CodeEditSourceEditor -import CodeEditTextView +import TableProEditorKit +import TableProTextEngine import Foundation @testable import TablePro import TableProGrammars diff --git a/TableProTests/Views/Editor/GutterHighlightTests.swift b/TableProTests/Views/Editor/GutterHighlightTests.swift index 586ff146ae..34f605f81d 100644 --- a/TableProTests/Views/Editor/GutterHighlightTests.swift +++ b/TableProTests/Views/Editor/GutterHighlightTests.swift @@ -10,8 +10,8 @@ // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import Testing @MainActor diff --git a/TableProTests/Views/Editor/QueryCompletionAdapterLifecycleTests.swift b/TableProTests/Views/Editor/QueryCompletionAdapterLifecycleTests.swift index 8b0b3451c0..4dde15eba3 100644 --- a/TableProTests/Views/Editor/QueryCompletionAdapterLifecycleTests.swift +++ b/TableProTests/Views/Editor/QueryCompletionAdapterLifecycleTests.swift @@ -10,8 +10,8 @@ // deterministically unit-testable; these tests cover the logic the fix relies on. // -import CodeEditSourceEditor -import CodeEditTextView +import TableProEditorKit +import TableProTextEngine import Foundation @testable import TablePro import TableProPluginKit diff --git a/TableProTests/Views/Editor/QueryDiagnosticsRefreshTests.swift b/TableProTests/Views/Editor/QueryDiagnosticsRefreshTests.swift index dd2e4f15c5..f704b30d54 100644 --- a/TableProTests/Views/Editor/QueryDiagnosticsRefreshTests.swift +++ b/TableProTests/Views/Editor/QueryDiagnosticsRefreshTests.swift @@ -4,8 +4,8 @@ // import AppKit -@testable import CodeEditSourceEditor -@testable import CodeEditTextView +@testable import TableProEditorKit +@testable import TableProTextEngine import Foundation import SwiftUI @testable import TablePro diff --git a/TableProTests/Views/Editor/QueryEditorLargePasteTests.swift b/TableProTests/Views/Editor/QueryEditorLargePasteTests.swift index 88d431c0ad..fa845f1222 100644 --- a/TableProTests/Views/Editor/QueryEditorLargePasteTests.swift +++ b/TableProTests/Views/Editor/QueryEditorLargePasteTests.swift @@ -8,12 +8,12 @@ // `HighlightProviderState`, so highlight state and `NSTextStorage` were touched off the main thread // while the main thread was still processing the same edit. // -// These live here rather than in `CodeEditSourceEditorTests` because the TablePro scheme does not +// These live here rather than in `TableProEditorKitTests` because the TablePro scheme does not // run that target, so a test there would never gate a regression. // -@preconcurrency @testable import CodeEditSourceEditor -import CodeEditTextView +@preconcurrency @testable import TableProEditorKit +import TableProTextEngine import Foundation import TableProGrammars import Testing diff --git a/TableProTests/Views/Editor/RemoveInvisibleCharactersCommandTests.swift b/TableProTests/Views/Editor/RemoveInvisibleCharactersCommandTests.swift index e6bbfe92bc..ca5c7a356f 100644 --- a/TableProTests/Views/Editor/RemoveInvisibleCharactersCommandTests.swift +++ b/TableProTests/Views/Editor/RemoveInvisibleCharactersCommandTests.swift @@ -4,8 +4,8 @@ // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import Foundation @testable import TablePro import Testing diff --git a/TableProTests/Views/Editor/SQLEditorLongLineScrollTests.swift b/TableProTests/Views/Editor/SQLEditorLongLineScrollTests.swift index f77fc87d39..847dc3b7a9 100644 --- a/TableProTests/Views/Editor/SQLEditorLongLineScrollTests.swift +++ b/TableProTests/Views/Editor/SQLEditorLongLineScrollTests.swift @@ -4,8 +4,8 @@ // import AppKit -@testable import CodeEditSourceEditor -import CodeEditTextView +@testable import TableProEditorKit +import TableProTextEngine import Testing /// Pasting a long line into the query editor and taking it back out leaves the start of every line in view (#2709). diff --git a/TableProTests/Views/Editor/SQLFoldPerformanceGuardTests.swift b/TableProTests/Views/Editor/SQLFoldPerformanceGuardTests.swift index 6ca0fc20a3..ada804cacb 100644 --- a/TableProTests/Views/Editor/SQLFoldPerformanceGuardTests.swift +++ b/TableProTests/Views/Editor/SQLFoldPerformanceGuardTests.swift @@ -7,8 +7,8 @@ // import AppKit -import CodeEditSourceEditor -import CodeEditTextView +import TableProEditorKit +import TableProTextEngine import Foundation @testable import TablePro import TableProGrammars diff --git a/TableProTests/Views/Editor/StatementNavigationCommandTests.swift b/TableProTests/Views/Editor/StatementNavigationCommandTests.swift index e0101f2df1..9619d76fe7 100644 --- a/TableProTests/Views/Editor/StatementNavigationCommandTests.swift +++ b/TableProTests/Views/Editor/StatementNavigationCommandTests.swift @@ -7,8 +7,8 @@ // import AppKit -import CodeEditSourceEditor -import CodeEditTextView +import TableProEditorKit +import TableProTextEngine import Foundation @testable import TablePro import TableProGrammars diff --git a/TableProTests/Views/Editor/StatementRunControllerTests.swift b/TableProTests/Views/Editor/StatementRunControllerTests.swift index c5215e2090..d0c9b450fa 100644 --- a/TableProTests/Views/Editor/StatementRunControllerTests.swift +++ b/TableProTests/Views/Editor/StatementRunControllerTests.swift @@ -7,8 +7,8 @@ // import AppKit -import CodeEditSourceEditor -import CodeEditTextView +import TableProEditorKit +import TableProTextEngine import Foundation @testable import TablePro import TableProGrammars diff --git a/TableProTests/Views/Editor/StatementRunPerformanceGuardTests.swift b/TableProTests/Views/Editor/StatementRunPerformanceGuardTests.swift index 2e9a368aed..5e31de75b5 100644 --- a/TableProTests/Views/Editor/StatementRunPerformanceGuardTests.swift +++ b/TableProTests/Views/Editor/StatementRunPerformanceGuardTests.swift @@ -8,8 +8,8 @@ // import AppKit -import CodeEditSourceEditor -import CodeEditTextView +import TableProEditorKit +import TableProTextEngine import Foundation @testable import TablePro import TableProGrammars diff --git a/TableProTests/Views/Editor/SyntaxHighlightingTests.swift b/TableProTests/Views/Editor/SyntaxHighlightingTests.swift index 27699fcfb1..9fafc06f4c 100644 --- a/TableProTests/Views/Editor/SyntaxHighlightingTests.swift +++ b/TableProTests/Views/Editor/SyntaxHighlightingTests.swift @@ -8,7 +8,7 @@ // import AppKit -@testable import CodeEditSourceEditor +@testable import TableProEditorKit import Foundation import SwiftTreeSitter @testable import TablePro diff --git a/TableProTests/Views/Editor/TypesetterWrapLengthTests.swift b/TableProTests/Views/Editor/TypesetterWrapLengthTests.swift index 39250aa663..fee9e1ba3f 100644 --- a/TableProTests/Views/Editor/TypesetterWrapLengthTests.swift +++ b/TableProTests/Views/Editor/TypesetterWrapLengthTests.swift @@ -7,12 +7,12 @@ // after the first then re-typeset all the text before it, so glyph work and retained memory grew // with the square of the line length and a long single line could exhaust memory. // -// These live here rather than in CodeEditTextViewTests because the TablePro scheme does not run +// These live here rather than in TableProTextEngineTests because the TablePro scheme does not run // that package's test target, so a test there would never gate a regression. // import AppKit -@testable import CodeEditTextView +@testable import TableProTextEngine import Foundation import Testing diff --git a/TableProTests/Views/Main/MainContentCoordinatorDisplayStateTests.swift b/TableProTests/Views/Main/MainContentCoordinatorDisplayStateTests.swift index ec1a499a4c..d9b78fd83a 100644 --- a/TableProTests/Views/Main/MainContentCoordinatorDisplayStateTests.swift +++ b/TableProTests/Views/Main/MainContentCoordinatorDisplayStateTests.swift @@ -4,7 +4,7 @@ // import AppKit -import CodeEditSourceEditor +import TableProEditorKit import Foundation import SwiftUI import TableProPluginKit diff --git a/TableProTests/Views/Main/MainContentCoordinatorTabSwitchTests.swift b/TableProTests/Views/Main/MainContentCoordinatorTabSwitchTests.swift index c26483de7b..9305806ba2 100644 --- a/TableProTests/Views/Main/MainContentCoordinatorTabSwitchTests.swift +++ b/TableProTests/Views/Main/MainContentCoordinatorTabSwitchTests.swift @@ -4,7 +4,7 @@ // import AppKit -import CodeEditSourceEditor +import TableProEditorKit import Foundation import SwiftUI import TableProPluginKit diff --git a/TableProTests/Views/Main/MainContentCoordinatorTableMetadataTests.swift b/TableProTests/Views/Main/MainContentCoordinatorTableMetadataTests.swift index b985123396..f419ba779b 100644 --- a/TableProTests/Views/Main/MainContentCoordinatorTableMetadataTests.swift +++ b/TableProTests/Views/Main/MainContentCoordinatorTableMetadataTests.swift @@ -4,7 +4,7 @@ // import AppKit -import CodeEditSourceEditor +import TableProEditorKit import Foundation import SwiftUI import TableProPluginKit diff --git a/docs/development/architecture.mdx b/docs/development/architecture.mdx index d55df8e264..f16e31d70e 100644 --- a/docs/development/architecture.mdx +++ b/docs/development/architecture.mdx @@ -108,7 +108,8 @@ A cancelled connect is the hard case here, because `Task.cancel()` cannot interr | Package | Source | Purpose | |---------|--------|---------| -| CodeEditSourceEditor | Vendored in `LocalPackages/`, with CodeEditTextView and CodeEditLanguages | Tree-sitter code editor | +| TableProEditor | Local package in `Packages/`, a heavily modified fork of CodeEditSourceEditor and CodeEditTextView | The SQL editor: text engine, layout, highlighting, folding | +| TableProGrammars | Local package in `Packages/` | The four tree-sitter grammars the editor highlights | | TableProCore | Local package in `Packages/` | SwiftPM modules the macOS and iOS apps share | | TableProOracle | Local package in `Packages/`, wraps a pinned TablePro fork of OracleNIO | Oracle wire protocol for OracleDriverPlugin | | Sparkle | SPM, 2.10.0+ | Auto-update with EdDSA signing | diff --git a/docs/development/building.mdx b/docs/development/building.mdx index 12ee952635..47dba76d9f 100644 --- a/docs/development/building.mdx +++ b/docs/development/building.mdx @@ -70,7 +70,7 @@ workflow still reports a result on a docs-only change. | Job | What it does | |---|---| | Detect relevant changes | Decides whether the macOS suites run | -| Package Tests | `swift test` for TableProCore and CodeEditTextView | +| Package Tests | `swift test` for TableProCore and TableProEditor | | Build for testing | Builds `AllPlugins`, `dlopen`s each built bundle, then builds the app and both test bundles | | Unit tests | `TableProTests` against the prebuilt products | | UI tests | `TableProUITests`, split across three shards | diff --git a/docs/development/code-style.mdx b/docs/development/code-style.mdx index 3b505e30b1..3769eff2f4 100644 --- a/docs/development/code-style.mdx +++ b/docs/development/code-style.mdx @@ -3,9 +3,9 @@ title: Code Style description: Swift conventions, tooling, naming, and file organization rules --- -Lint covers `TablePro/` and nothing else. `Plugins/`, `Packages/`, `LocalPackages/` and the test -bundles get no automated style check at all, locally or in CI. On a change outside the app target, -the conventions here are all there is. +Lint covers `TablePro/` and `Packages/`, which includes `TableProPluginKit` through the symlink in +`TableProCore`. The rest of `Plugins/` and the app's own test bundles get no automated style check, +so on a change there the conventions on this page are all there is. `.swiftlint.yml` and `.swiftformat` settle the mechanical half. `CLAUDE.md` carries the rest, the rules no linter can check: no comments, early returns over nested conditionals, explicit access @@ -74,16 +74,16 @@ SwiftLint's `sorted_imports` catches an out-of-order import that never went thro ```swift import AppKit -import CodeEditSourceEditor import Foundation import os +import TableProEditorKit import TableProPluginKit final class QueryRunner { … } ``` Lowercase module names sort by their own spelling, which is why `os` lands between `Foundation` and -`TableProPluginKit`. +`TableProEditorKit`. ## Rules that bite diff --git a/docs/development/setup.mdx b/docs/development/setup.mdx index fa2bf7f4cc..f0e3f23575 100644 --- a/docs/development/setup.mdx +++ b/docs/development/setup.mdx @@ -141,10 +141,7 @@ and [Testing a Custom Plugin](/development/testing-plugins) covers running it in - - - - + diff --git a/project.yml b/project.yml index 50791966c2..f2b3332a81 100644 --- a/project.yml +++ b/project.yml @@ -37,14 +37,10 @@ fileGroups: - project.yml packages: - CodeEditSourceEditor: - path: LocalPackages/CodeEditSourceEditor + TableProEditor: + path: Packages/TableProEditor TableProGrammars: path: Packages/TableProGrammars - # Reached transitively by CodeEditSourceEditor, but the app links its product - # directly, so it has to be declared here too. - CodeEditTextView: - path: LocalPackages/CodeEditTextView TableProCore: path: Packages/TableProCore TableProOracle: @@ -227,9 +223,9 @@ targets: - target: CSVInspectorPlugin embed: true copy: { destination: plugins } - - package: CodeEditSourceEditor + - package: TableProEditor + products: [TableProEditorKit, TableProTextEngine] - package: TableProGrammars - - package: CodeEditTextView - package: Sparkle - package: Yams - package: TableProCore diff --git a/scripts/check-doc-symbols.sh b/scripts/check-doc-symbols.sh index a5713b067b..7855ea67d7 100755 --- a/scripts/check-doc-symbols.sh +++ b/scripts/check-doc-symbols.sh @@ -84,7 +84,7 @@ build_symbol_index() { # Per file, not over one concatenated stream: a non-greedy /* */ match across a joined # stream would swallow everything between one file's opening marker and a later file's # closing one. - find TablePro Plugins Packages LocalPackages TableProTests TableProUITests \ + find TablePro Plugins Packages TableProTests TableProUITests \ -name '*.swift' -type f 2> /dev/null | while IFS= read -r swift_file; do perl -0777 -pe 's{/\*.*?\*/}{}gs' "$swift_file" 2> /dev/null | From 93f2a5b91951459410f08b50fdbaf9d94c0b1f32 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Tue, 15 Sep 2026 14:03:37 +0700 Subject: [PATCH 3/6] style(editor): re-sort the test target's imports after the module rename --- .../Core/AI/InlineSuggestionManagerCompositionTests.swift | 2 +- .../Core/Utilities/SQL/InvisibleCharacterRemoverTests.swift | 2 +- .../Core/Utilities/SQL/SQLFoldPlaceholderLabelTests.swift | 4 ++-- TableProTests/Core/Utilities/SQL/StatementBlankTests.swift | 2 +- TableProTests/Core/Vim/VimTextBufferAdapterPerfTests.swift | 4 ++-- TableProTests/Editor/PasteHighlightCancelTests.swift | 4 ++-- TableProTests/Views/Editor/EditorControllerFixture.swift | 2 +- .../Views/Editor/EditorKeyMonitorCompositionTests.swift | 2 +- TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift | 4 ++-- TableProTests/Views/Editor/EditorPeripheralSurfaceTests.swift | 4 ++-- TableProTests/Views/Editor/EditorPeripheralsTests.swift | 4 ++-- TableProTests/Views/Editor/FoldCommandBehaviourTests.swift | 4 ++-- TableProTests/Views/Editor/FoldGutterLayoutTests.swift | 4 ++-- TableProTests/Views/Editor/FoldPreviewHitTestTests.swift | 4 ++-- .../Views/Editor/QueryCompletionAdapterLifecycleTests.swift | 4 ++-- TableProTests/Views/Editor/QueryDiagnosticsRefreshTests.swift | 4 ++-- TableProTests/Views/Editor/QueryEditorLargePasteTests.swift | 4 ++-- .../Views/Editor/RemoveInvisibleCharactersCommandTests.swift | 4 ++-- TableProTests/Views/Editor/SQLFoldPerformanceGuardTests.swift | 4 ++-- .../Views/Editor/StatementNavigationCommandTests.swift | 4 ++-- TableProTests/Views/Editor/StatementRunControllerTests.swift | 4 ++-- .../Views/Editor/StatementRunPerformanceGuardTests.swift | 4 ++-- TableProTests/Views/Editor/SyntaxHighlightingTests.swift | 2 +- TableProTests/Views/Editor/TypesetterWrapLengthTests.swift | 2 +- .../Views/Main/MainContentCoordinatorDisplayStateTests.swift | 2 +- .../Views/Main/MainContentCoordinatorTabSwitchTests.swift | 2 +- .../Views/Main/MainContentCoordinatorTableMetadataTests.swift | 2 +- 27 files changed, 44 insertions(+), 44 deletions(-) diff --git a/TableProTests/Core/AI/InlineSuggestionManagerCompositionTests.swift b/TableProTests/Core/AI/InlineSuggestionManagerCompositionTests.swift index 076a9f10cd..7c25753447 100644 --- a/TableProTests/Core/AI/InlineSuggestionManagerCompositionTests.swift +++ b/TableProTests/Core/AI/InlineSuggestionManagerCompositionTests.swift @@ -5,9 +5,9 @@ import AppKit import Carbon.HIToolbox +@testable import TablePro import TableProEditorKit import TableProTextEngine -@testable import TablePro import Testing @MainActor diff --git a/TableProTests/Core/Utilities/SQL/InvisibleCharacterRemoverTests.swift b/TableProTests/Core/Utilities/SQL/InvisibleCharacterRemoverTests.swift index ffa10bf167..8bbb9cc5aa 100644 --- a/TableProTests/Core/Utilities/SQL/InvisibleCharacterRemoverTests.swift +++ b/TableProTests/Core/Utilities/SQL/InvisibleCharacterRemoverTests.swift @@ -3,10 +3,10 @@ // TableProTests // -import TableProTextEngine import Foundation @testable import TablePro import TableProPluginKit +import TableProTextEngine import Testing @Suite("Remove invisible characters") diff --git a/TableProTests/Core/Utilities/SQL/SQLFoldPlaceholderLabelTests.swift b/TableProTests/Core/Utilities/SQL/SQLFoldPlaceholderLabelTests.swift index 25bb11ba8d..1c9ab7469c 100644 --- a/TableProTests/Core/Utilities/SQL/SQLFoldPlaceholderLabelTests.swift +++ b/TableProTests/Core/Utilities/SQL/SQLFoldPlaceholderLabelTests.swift @@ -3,10 +3,10 @@ // TableProTests // -import TableProEditorKit import Foundation -import Testing @testable import TablePro +import TableProEditorKit +import Testing @Suite("Fold placeholder summary") struct FoldPlaceholderSummaryTests { diff --git a/TableProTests/Core/Utilities/SQL/StatementBlankTests.swift b/TableProTests/Core/Utilities/SQL/StatementBlankTests.swift index 198303ab74..a1d40f90b1 100644 --- a/TableProTests/Core/Utilities/SQL/StatementBlankTests.swift +++ b/TableProTests/Core/Utilities/SQL/StatementBlankTests.swift @@ -3,9 +3,9 @@ // TableProTests // -import TableProTextEngine import Foundation @testable import TablePro +import TableProTextEngine import Testing @Suite("Statement blank characters") diff --git a/TableProTests/Core/Vim/VimTextBufferAdapterPerfTests.swift b/TableProTests/Core/Vim/VimTextBufferAdapterPerfTests.swift index 1242ffa2c1..a88d9e6492 100644 --- a/TableProTests/Core/Vim/VimTextBufferAdapterPerfTests.swift +++ b/TableProTests/Core/Vim/VimTextBufferAdapterPerfTests.swift @@ -7,9 +7,9 @@ // import AppKit -import TableProTextEngine -import TableProPluginKit @testable import TablePro +import TableProPluginKit +import TableProTextEngine import Testing @Suite("VimTextBufferAdapter Incremental LineCount") diff --git a/TableProTests/Editor/PasteHighlightCancelTests.swift b/TableProTests/Editor/PasteHighlightCancelTests.swift index f805f16874..d2c9ecfda1 100644 --- a/TableProTests/Editor/PasteHighlightCancelTests.swift +++ b/TableProTests/Editor/PasteHighlightCancelTests.swift @@ -13,11 +13,11 @@ // import AppKit -@preconcurrency @testable import TableProEditorKit -import TableProTextEngine import Foundation import Rearrange +@preconcurrency @testable import TableProEditorKit import TableProGrammars +import TableProTextEngine import Testing @MainActor diff --git a/TableProTests/Views/Editor/EditorControllerFixture.swift b/TableProTests/Views/Editor/EditorControllerFixture.swift index 95c3edcfaf..6bdbcfd116 100644 --- a/TableProTests/Views/Editor/EditorControllerFixture.swift +++ b/TableProTests/Views/Editor/EditorControllerFixture.swift @@ -8,8 +8,8 @@ import AppKit @testable import TableProEditorKit -import TableProTextEngine import TableProGrammars +import TableProTextEngine @MainActor internal enum EditorControllerFixture { diff --git a/TableProTests/Views/Editor/EditorKeyMonitorCompositionTests.swift b/TableProTests/Views/Editor/EditorKeyMonitorCompositionTests.swift index f0f35dbb7b..cec6f2775c 100644 --- a/TableProTests/Views/Editor/EditorKeyMonitorCompositionTests.swift +++ b/TableProTests/Views/Editor/EditorKeyMonitorCompositionTests.swift @@ -5,9 +5,9 @@ import AppKit import Carbon.HIToolbox +import SwiftUI @testable import TableProEditorKit import TableProTextEngine -import SwiftUI import Testing internal struct EditorKeyChord: Sendable, CustomTestStringConvertible { diff --git a/TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift b/TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift index 837408c04d..9ab8e1871b 100644 --- a/TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift +++ b/TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift @@ -9,10 +9,10 @@ // import AppKit -@testable import TableProEditorKit -import TableProTextEngine import SwiftUI @testable import TablePro +@testable import TableProEditorKit +import TableProTextEngine import Testing private final class RecordingCoordinator: TextViewCoordinator { diff --git a/TableProTests/Views/Editor/EditorPeripheralSurfaceTests.swift b/TableProTests/Views/Editor/EditorPeripheralSurfaceTests.swift index 7867dec7b1..b59d29b245 100644 --- a/TableProTests/Views/Editor/EditorPeripheralSurfaceTests.swift +++ b/TableProTests/Views/Editor/EditorPeripheralSurfaceTests.swift @@ -4,10 +4,10 @@ // import AppKit -@testable import TableProEditorKit -import TableProTextEngine @testable import TablePro +@testable import TableProEditorKit import TableProGrammars +import TableProTextEngine import Testing @MainActor diff --git a/TableProTests/Views/Editor/EditorPeripheralsTests.swift b/TableProTests/Views/Editor/EditorPeripheralsTests.swift index 48984a5ddc..2821e75c8e 100644 --- a/TableProTests/Views/Editor/EditorPeripheralsTests.swift +++ b/TableProTests/Views/Editor/EditorPeripheralsTests.swift @@ -3,10 +3,10 @@ // TableProTests // -import TableProEditorKit import Foundation -import Testing @testable import TablePro +import TableProEditorKit +import Testing /// A gutter can be shown without line numbers so it can host the fold rail alone, and that is what left a 30pt /// column holding a 14pt control, blank whenever the document had nothing to fold. Every editor in the app builds diff --git a/TableProTests/Views/Editor/FoldCommandBehaviourTests.swift b/TableProTests/Views/Editor/FoldCommandBehaviourTests.swift index c76f4920ff..4dd8a237c1 100644 --- a/TableProTests/Views/Editor/FoldCommandBehaviourTests.swift +++ b/TableProTests/Views/Editor/FoldCommandBehaviourTests.swift @@ -4,12 +4,12 @@ // import AppKit -import TableProEditorKit -import TableProTextEngine import Foundation @testable import TablePro +import TableProEditorKit import TableProGrammars import TableProPluginKit +import TableProTextEngine import Testing @Suite("Fold commands") diff --git a/TableProTests/Views/Editor/FoldGutterLayoutTests.swift b/TableProTests/Views/Editor/FoldGutterLayoutTests.swift index 619d0a3ad2..89f4dd7d35 100644 --- a/TableProTests/Views/Editor/FoldGutterLayoutTests.swift +++ b/TableProTests/Views/Editor/FoldGutterLayoutTests.swift @@ -4,11 +4,11 @@ // import AppKit -import TableProEditorKit -import TableProTextEngine import Foundation @testable import TablePro +import TableProEditorKit import TableProGrammars +import TableProTextEngine import Testing @Suite("Fold gutter layout") diff --git a/TableProTests/Views/Editor/FoldPreviewHitTestTests.swift b/TableProTests/Views/Editor/FoldPreviewHitTestTests.swift index 8586ced59d..98797dab31 100644 --- a/TableProTests/Views/Editor/FoldPreviewHitTestTests.swift +++ b/TableProTests/Views/Editor/FoldPreviewHitTestTests.swift @@ -4,12 +4,12 @@ // import AppKit -import TableProEditorKit -import TableProTextEngine import Foundation @testable import TablePro +import TableProEditorKit import TableProGrammars import TableProPluginKit +import TableProTextEngine import Testing @Suite("Fold preview hit testing") diff --git a/TableProTests/Views/Editor/QueryCompletionAdapterLifecycleTests.swift b/TableProTests/Views/Editor/QueryCompletionAdapterLifecycleTests.swift index 4dde15eba3..39294f4522 100644 --- a/TableProTests/Views/Editor/QueryCompletionAdapterLifecycleTests.swift +++ b/TableProTests/Views/Editor/QueryCompletionAdapterLifecycleTests.swift @@ -10,11 +10,11 @@ // deterministically unit-testable; these tests cover the logic the fix relies on. // -import TableProEditorKit -import TableProTextEngine import Foundation @testable import TablePro +import TableProEditorKit import TableProPluginKit +import TableProTextEngine import Testing @Suite("Query Completion Adapter Lifecycle") diff --git a/TableProTests/Views/Editor/QueryDiagnosticsRefreshTests.swift b/TableProTests/Views/Editor/QueryDiagnosticsRefreshTests.swift index f704b30d54..93df95e3b3 100644 --- a/TableProTests/Views/Editor/QueryDiagnosticsRefreshTests.swift +++ b/TableProTests/Views/Editor/QueryDiagnosticsRefreshTests.swift @@ -4,11 +4,11 @@ // import AppKit -@testable import TableProEditorKit -@testable import TableProTextEngine import Foundation import SwiftUI @testable import TablePro +@testable import TableProEditorKit +@testable import TableProTextEngine import Testing @MainActor diff --git a/TableProTests/Views/Editor/QueryEditorLargePasteTests.swift b/TableProTests/Views/Editor/QueryEditorLargePasteTests.swift index fa845f1222..b908ee6c92 100644 --- a/TableProTests/Views/Editor/QueryEditorLargePasteTests.swift +++ b/TableProTests/Views/Editor/QueryEditorLargePasteTests.swift @@ -12,10 +12,10 @@ // run that target, so a test there would never gate a regression. // -@preconcurrency @testable import TableProEditorKit -import TableProTextEngine import Foundation +@preconcurrency @testable import TableProEditorKit import TableProGrammars +import TableProTextEngine import Testing private final class CompletionRecorder: @unchecked Sendable { diff --git a/TableProTests/Views/Editor/RemoveInvisibleCharactersCommandTests.swift b/TableProTests/Views/Editor/RemoveInvisibleCharactersCommandTests.swift index ca5c7a356f..0b03492993 100644 --- a/TableProTests/Views/Editor/RemoveInvisibleCharactersCommandTests.swift +++ b/TableProTests/Views/Editor/RemoveInvisibleCharactersCommandTests.swift @@ -4,10 +4,10 @@ // import AppKit -@testable import TableProEditorKit -import TableProTextEngine import Foundation @testable import TablePro +@testable import TableProEditorKit +import TableProTextEngine import Testing @MainActor diff --git a/TableProTests/Views/Editor/SQLFoldPerformanceGuardTests.swift b/TableProTests/Views/Editor/SQLFoldPerformanceGuardTests.swift index ada804cacb..ca19acd85f 100644 --- a/TableProTests/Views/Editor/SQLFoldPerformanceGuardTests.swift +++ b/TableProTests/Views/Editor/SQLFoldPerformanceGuardTests.swift @@ -7,12 +7,12 @@ // import AppKit -import TableProEditorKit -import TableProTextEngine import Foundation @testable import TablePro +import TableProEditorKit import TableProGrammars import TableProPluginKit +import TableProTextEngine import Testing @Suite("SQL folding performance guards") diff --git a/TableProTests/Views/Editor/StatementNavigationCommandTests.swift b/TableProTests/Views/Editor/StatementNavigationCommandTests.swift index 9619d76fe7..b89d0b6d80 100644 --- a/TableProTests/Views/Editor/StatementNavigationCommandTests.swift +++ b/TableProTests/Views/Editor/StatementNavigationCommandTests.swift @@ -7,12 +7,12 @@ // import AppKit -import TableProEditorKit -import TableProTextEngine import Foundation @testable import TablePro +import TableProEditorKit import TableProGrammars import TableProPluginKit +import TableProTextEngine import Testing @Suite("Statement navigation commands") diff --git a/TableProTests/Views/Editor/StatementRunControllerTests.swift b/TableProTests/Views/Editor/StatementRunControllerTests.swift index d0c9b450fa..30a34028ed 100644 --- a/TableProTests/Views/Editor/StatementRunControllerTests.swift +++ b/TableProTests/Views/Editor/StatementRunControllerTests.swift @@ -7,12 +7,12 @@ // import AppKit -import TableProEditorKit -import TableProTextEngine import Foundation @testable import TablePro +import TableProEditorKit import TableProGrammars import TableProPluginKit +import TableProTextEngine import Testing @Suite("Statement run controls") diff --git a/TableProTests/Views/Editor/StatementRunPerformanceGuardTests.swift b/TableProTests/Views/Editor/StatementRunPerformanceGuardTests.swift index 5e31de75b5..624697f464 100644 --- a/TableProTests/Views/Editor/StatementRunPerformanceGuardTests.swift +++ b/TableProTests/Views/Editor/StatementRunPerformanceGuardTests.swift @@ -8,12 +8,12 @@ // import AppKit -import TableProEditorKit -import TableProTextEngine import Foundation @testable import TablePro +import TableProEditorKit import TableProGrammars import TableProPluginKit +import TableProTextEngine import Testing @Suite("Statement decoration performance guards") diff --git a/TableProTests/Views/Editor/SyntaxHighlightingTests.swift b/TableProTests/Views/Editor/SyntaxHighlightingTests.swift index 9fafc06f4c..c33562f825 100644 --- a/TableProTests/Views/Editor/SyntaxHighlightingTests.swift +++ b/TableProTests/Views/Editor/SyntaxHighlightingTests.swift @@ -8,10 +8,10 @@ // import AppKit -@testable import TableProEditorKit import Foundation import SwiftTreeSitter @testable import TablePro +@testable import TableProEditorKit import TableProGrammars import Testing diff --git a/TableProTests/Views/Editor/TypesetterWrapLengthTests.swift b/TableProTests/Views/Editor/TypesetterWrapLengthTests.swift index fee9e1ba3f..967159efd2 100644 --- a/TableProTests/Views/Editor/TypesetterWrapLengthTests.swift +++ b/TableProTests/Views/Editor/TypesetterWrapLengthTests.swift @@ -12,8 +12,8 @@ // import AppKit -@testable import TableProTextEngine import Foundation +@testable import TableProTextEngine import Testing @MainActor diff --git a/TableProTests/Views/Main/MainContentCoordinatorDisplayStateTests.swift b/TableProTests/Views/Main/MainContentCoordinatorDisplayStateTests.swift index d9b78fd83a..3f4f3e2b19 100644 --- a/TableProTests/Views/Main/MainContentCoordinatorDisplayStateTests.swift +++ b/TableProTests/Views/Main/MainContentCoordinatorDisplayStateTests.swift @@ -4,9 +4,9 @@ // import AppKit -import TableProEditorKit import Foundation import SwiftUI +import TableProEditorKit import TableProPluginKit import Testing diff --git a/TableProTests/Views/Main/MainContentCoordinatorTabSwitchTests.swift b/TableProTests/Views/Main/MainContentCoordinatorTabSwitchTests.swift index 9305806ba2..e0980b9cf2 100644 --- a/TableProTests/Views/Main/MainContentCoordinatorTabSwitchTests.swift +++ b/TableProTests/Views/Main/MainContentCoordinatorTabSwitchTests.swift @@ -4,9 +4,9 @@ // import AppKit -import TableProEditorKit import Foundation import SwiftUI +import TableProEditorKit import TableProPluginKit import Testing diff --git a/TableProTests/Views/Main/MainContentCoordinatorTableMetadataTests.swift b/TableProTests/Views/Main/MainContentCoordinatorTableMetadataTests.swift index f419ba779b..8644f07115 100644 --- a/TableProTests/Views/Main/MainContentCoordinatorTableMetadataTests.swift +++ b/TableProTests/Views/Main/MainContentCoordinatorTableMetadataTests.swift @@ -4,9 +4,9 @@ // import AppKit -import TableProEditorKit import Foundation import SwiftUI +import TableProEditorKit import TableProPluginKit import Testing From 2e916e5e9f0b1fc91678a039e1784e2942e1f2a7 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Tue, 15 Sep 2026 14:52:35 +0700 Subject: [PATCH 4/6] build(editor): drop swift-custom-dump so the editor package's lockfile is toolchain-independent --- Packages/TableProEditor/Package.resolved | 20 +------------------ Packages/TableProEditor/Package.swift | 6 ++---- .../TextViewController+IndentTests.swift | 15 +++++++------- .../TextViewController+MoveLinesTests.swift | 9 ++++----- 4 files changed, 14 insertions(+), 36 deletions(-) diff --git a/Packages/TableProEditor/Package.resolved b/Packages/TableProEditor/Package.resolved index e4c1b06caa..7b2ddfe572 100644 --- a/Packages/TableProEditor/Package.resolved +++ b/Packages/TableProEditor/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "bee6f7cd17346c97c10c6a097ad528bdb169d8e780ccdfd270cd3768c19f80bb", + "originHash" : "1b5dffbc76dc5f663746a71dadea6dce0ab402033adf018419de50c3a2d0b442", "pins" : [ { "identity" : "rearrange", @@ -19,24 +19,6 @@ "version" : "1.6.0" } }, - { - "identity" : "swift-custom-dump", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-custom-dump", - "state" : { - "revision" : "4fb9e7cbb4b8f5a7354005db39447f570d6b3e19", - "version" : "1.7.3" - } - }, - { - "identity" : "swift-issue-reporting", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-issue-reporting", - "state" : { - "revision" : "71c7c9a761d1ca6ed4ccb6ced040fe1c1a39e8e7", - "version" : "2.1.0" - } - }, { "identity" : "swifttreesitter", "kind" : "remoteSourceControl", diff --git a/Packages/TableProEditor/Package.swift b/Packages/TableProEditor/Package.swift index 5108415c6d..7134aba618 100644 --- a/Packages/TableProEditor/Package.swift +++ b/Packages/TableProEditor/Package.swift @@ -13,8 +13,7 @@ let package = Package( .package(path: "../TableProGrammars"), .package(url: "https://github.com/ChimeHQ/TextStory", from: "0.9.0"), .package(url: "https://github.com/ChimeHQ/TextFormation", from: "0.8.2"), - .package(url: "https://github.com/apple/swift-collections.git", .upToNextMajor(from: "1.0.0")), - .package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.0.0") + .package(url: "https://github.com/apple/swift-collections.git", .upToNextMajor(from: "1.0.0")) ], targets: [ .target( @@ -49,8 +48,7 @@ let package = Package( name: "TableProEditorKitTests", dependencies: [ "TableProEditorKit", - "TableProGrammars", - .product(name: "CustomDump", package: "swift-custom-dump") + "TableProGrammars" ], swiftSettings: [.swiftLanguageMode(.v5)] ) diff --git a/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+IndentTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+IndentTests.swift index 7fc0c85d88..7927768319 100644 --- a/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+IndentTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+IndentTests.swift @@ -5,7 +5,6 @@ // Created by Ludwig, Tom on 08.10.24. // -import CustomDump @testable import TableProEditorKit @testable import TableProTextEngine import XCTest @@ -26,7 +25,7 @@ final class TextViewControllerIndentTests: XCTestCase { controller.textView.selectionManager.textSelections = [.init(range: NSRange(location: 0, length: 0))] controller.handleIndent(inwards: true) - expectNoDifference(controller.text, "This is a test string") + XCTAssertEqual(controller.text, "This is a test string") // Normally, 4 spaces are used for indentation; however, now we only insert 2 leading spaces. // The outcome should be the same, though. @@ -35,7 +34,7 @@ final class TextViewControllerIndentTests: XCTestCase { controller.textView.selectionManager.textSelections = [.init(range: NSRange(location: 0, length: 0))] controller.handleIndent(inwards: true) - expectNoDifference(controller.text, "This is a test string") + XCTAssertEqual(controller.text, "This is a test string") } func testHandleIndentWithSpacesOutwards() { @@ -46,7 +45,7 @@ final class TextViewControllerIndentTests: XCTestCase { controller.handleIndent(inwards: false) - expectNoDifference(controller.text, " This is a test string") + XCTAssertEqual(controller.text, " This is a test string") } func testHandleIndentWithTabsInwards() { @@ -58,7 +57,7 @@ final class TextViewControllerIndentTests: XCTestCase { controller.handleIndent(inwards: true) - expectNoDifference(controller.text, "This is a test string") + XCTAssertEqual(controller.text, "This is a test string") } func testHandleIndentWithTabsOutwards() { @@ -72,7 +71,7 @@ final class TextViewControllerIndentTests: XCTestCase { // Normally, we expect nothing to happen because only one line is selected. // However, this logic is not handled inside `handleIndent`. - expectNoDifference(controller.text, "\tThis is a test string") + XCTAssertEqual(controller.text, "\tThis is a test string") } func testHandleIndentMultiLine() { @@ -95,7 +94,7 @@ final class TextViewControllerIndentTests: XCTestCase { controller.handleIndent() let expectedString = "\tThis is a test string\n\tWith multiple lines\n\tAnd some indentation" - expectNoDifference(controller.text, expectedString) + XCTAssertEqual(controller.text, expectedString) } func testHandleInwardIndentMultiLine() { @@ -118,7 +117,7 @@ final class TextViewControllerIndentTests: XCTestCase { controller.handleIndent(inwards: true) let expectedString = "This is a test string\nWith multiple lines\nAnd some indentation" - expectNoDifference(controller.text, expectedString) + XCTAssertEqual(controller.text, expectedString) } func testMultipleLinesHighlighted() { diff --git a/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+MoveLinesTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+MoveLinesTests.swift index 43bb39029a..8118b6e334 100644 --- a/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+MoveLinesTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+MoveLinesTests.swift @@ -5,7 +5,6 @@ // Created by Bogdan Belogurov on 01/06/2025. // -import CustomDump @testable import TableProEditorKit @testable import TableProTextEngine import XCTest @@ -37,7 +36,7 @@ final class TextViewControllerMoveLinesTests: XCTestCase { controller.moveLinesUp() let expectedString = "With multiple lines\nThis is a test string\n" - expectNoDifference(controller.text, expectedString) + XCTAssertEqual(controller.text, expectedString) } func testHandleMoveLinesDownForSingleLine() { @@ -58,7 +57,7 @@ final class TextViewControllerMoveLinesTests: XCTestCase { controller.moveLinesDown() let expectedString = "With multiple lines\nThis is a test string\n" - expectNoDifference(controller.text, expectedString) + XCTAssertEqual(controller.text, expectedString) } func testHandleMoveLinesUpForMultiLine() { @@ -80,7 +79,7 @@ final class TextViewControllerMoveLinesTests: XCTestCase { controller.moveLinesUp() let expectedString = "With multiple lines\nAnd additional info\nThis is a test string\n" - expectNoDifference(controller.text, expectedString) + XCTAssertEqual(controller.text, expectedString) } func testHandleMoveLinesDownForMultiLine() { @@ -102,6 +101,6 @@ final class TextViewControllerMoveLinesTests: XCTestCase { controller.moveLinesDown() let expectedString = "And additional info\nThis is a test string\nWith multiple lines\n" - expectNoDifference(controller.text, expectedString) + XCTAssertEqual(controller.text, expectedString) } } From f7dbb56b3b04be3c0eca65da627a870bb6659c49 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Tue, 15 Sep 2026 15:37:49 +0700 Subject: [PATCH 5/6] test(editor): move the editor's own suites into the package and close the testable seam --- .../EmphasisManager/EmphasisManager.swift | 10 +++ .../EditorKeyMonitorCompositionTests.swift | 44 +++++----- .../EditorPeripheralSurfaceTests.swift | 14 ++- .../Controller/LongLineScrollTests.swift | 8 +- .../GutterHighlightTests.swift | 8 +- .../PasteHighlightCancelTests.swift | 2 +- .../LargePasteTests.swift | 2 +- .../LineFoldChunkBoundaryTests.swift | 7 +- .../Tests/TableProEditorKitTests/Mock.swift | 86 +++++++++++++++++++ .../SourceEditorDismantleTests.swift | 44 ++++++++++ .../SyntaxHighlightingTests.swift | 20 +---- .../TypesetterWrapLengthTests.swift | 2 +- .../xcshareddata/swiftpm/Package.resolved | 21 +---- .../Editor/EditorControllerFixture.swift | 2 +- .../Editor/EditorLifecycleTeardownTests.swift | 29 +------ .../Views/Editor/EditorThemeBridgeTests.swift | 32 +++++++ .../Editor/QueryDiagnosticsRefreshTests.swift | 25 ++---- ...emoveInvisibleCharactersCommandTests.swift | 16 +++- 18 files changed, 246 insertions(+), 126 deletions(-) rename {TableProTests/Views/Editor => Packages/TableProEditor/Tests/TableProEditorKitTests/Controller}/EditorKeyMonitorCompositionTests.swift (82%) rename {TableProTests/Views/Editor => Packages/TableProEditor/Tests/TableProEditorKitTests/Controller}/EditorPeripheralSurfaceTests.swift (90%) rename TableProTests/Views/Editor/SQLEditorLongLineScrollTests.swift => Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/LongLineScrollTests.swift (91%) rename {TableProTests/Views/Editor => Packages/TableProEditor/Tests/TableProEditorKitTests}/GutterHighlightTests.swift (93%) rename {TableProTests/Editor => Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting}/PasteHighlightCancelTests.swift (99%) rename TableProTests/Views/Editor/QueryEditorLargePasteTests.swift => Packages/TableProEditor/Tests/TableProEditorKitTests/LargePasteTests.swift (99%) create mode 100644 Packages/TableProEditor/Tests/TableProEditorKitTests/SourceEditorDismantleTests.swift rename {TableProTests/Views/Editor => Packages/TableProEditor/Tests/TableProEditorKitTests}/SyntaxHighlightingTests.swift (93%) rename {TableProTests/Views/Editor => Packages/TableProEditor/Tests/TableProTextEngineTests}/TypesetterWrapLengthTests.swift (99%) create mode 100644 TableProTests/Views/Editor/EditorThemeBridgeTests.swift diff --git a/Packages/TableProEditor/Sources/TableProTextEngine/EmphasisManager/EmphasisManager.swift b/Packages/TableProEditor/Sources/TableProTextEngine/EmphasisManager/EmphasisManager.swift index 88229f7396..af77a724bf 100644 --- a/Packages/TableProEditor/Sources/TableProTextEngine/EmphasisManager/EmphasisManager.swift +++ b/Packages/TableProEditor/Sources/TableProTextEngine/EmphasisManager/EmphasisManager.swift @@ -179,6 +179,16 @@ public final class EmphasisManager { emphasisGroups[id, default: []].map(\.emphasis) } + /// The tool tip an emphasis presents at a point in the text view, or `nil` where none is registered. + /// + /// Emphases own their tool tips, and AppKit only ever asks the owner. This is how anything outside the + /// manager reads what the editor would actually show under the pointer. + public func toolTip(at point: CGPoint) -> String? { + guard let textView else { return nil } + let text = toolTips.view(textView, stringForToolTip: 0, point: point, userData: nil) + return text.isEmpty ? nil : text + } + private func registerToolTip(for emphasisLayer: EmphasisLayer) { guard emphasisLayer.emphasis.toolTip != nil, emphasisLayer.isAttached else { return } toolTips.register( diff --git a/TableProTests/Views/Editor/EditorKeyMonitorCompositionTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/EditorKeyMonitorCompositionTests.swift similarity index 82% rename from TableProTests/Views/Editor/EditorKeyMonitorCompositionTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/EditorKeyMonitorCompositionTests.swift index cec6f2775c..57098ab7a6 100644 --- a/TableProTests/Views/Editor/EditorKeyMonitorCompositionTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/EditorKeyMonitorCompositionTests.swift @@ -1,6 +1,6 @@ // // EditorKeyMonitorCompositionTests.swift -// TableProTests +// TableProEditorKitTests // import AppKit @@ -63,7 +63,7 @@ internal struct EditorKeyChord: Sendable, CustomTestStringConvertible { @MainActor func event(in window: NSWindow?) -> NSEvent? { - EditorControllerFixture.keyDown(keyCode: keyCode, characters: characters, modifiers: modifiers, in: window) + Mock.keyDown(keyCode: keyCode, characters: characters, modifiers: modifiers, in: window) } } @@ -101,10 +101,10 @@ private struct StubSuggestionEntry: CodeSuggestionEntry { internal struct EditorKeyMonitorCompositionTests { @Test("The editor leaves its plain keys to the input method mid-composition", arguments: EditorKeyChord.inputMethodKeys) func editorKeysDeferToComposition(chord: EditorKeyChord) throws { - let (window, editor) = EditorControllerFixture.makeFocusedInWindow(string: " SELECT 1\nFROM ") + let (window, editor) = Mock.focusedTextViewController(string: " SELECT 1\nFROM ") let delegate = RecordingCompletionDelegate() editor.completionDelegate = delegate - EditorControllerFixture.beginComposition("le", in: editor.textView) + Mock.beginComposition("le", in: editor.textView) let composed = editor.textView.string let event = try #require(chord.event(in: window)) @@ -115,10 +115,10 @@ internal struct EditorKeyMonitorCompositionTests { @Test("The editor keeps its Command chords from the menu bar mid-composition and runs none", arguments: EditorKeyChord.commandChords) func editorCommandChordsWithheldDuringComposition(chord: EditorKeyChord) throws { - let (window, editor) = EditorControllerFixture.makeFocusedInWindow(string: " SELECT 1\nFROM ") + let (window, editor) = Mock.focusedTextViewController(string: " SELECT 1\nFROM ") let delegate = RecordingCompletionDelegate() editor.completionDelegate = delegate - EditorControllerFixture.beginComposition("le", in: editor.textView) + Mock.beginComposition("le", in: editor.textView) let composed = editor.textView.string let event = try #require(chord.event(in: window)) @@ -129,8 +129,8 @@ internal struct EditorKeyMonitorCompositionTests { @Test("A Command chord the editor does not own reaches the menu bar mid-composition", arguments: EditorKeyChord.foreignCommandChords) func foreignCommandChordsPassDuringComposition(chord: EditorKeyChord) throws { - let (window, editor) = EditorControllerFixture.makeFocusedInWindow(string: "SELECT ") - EditorControllerFixture.beginComposition("le", in: editor.textView) + let (window, editor) = Mock.focusedTextViewController(string: "SELECT ") + Mock.beginComposition("le", in: editor.textView) let event = try #require(chord.event(in: window)) #expect(editor.handleEvent(event: event) === event) @@ -139,11 +139,11 @@ internal struct EditorKeyMonitorCompositionTests { @Test("A composition the input method empties gives the editor its keys back", arguments: EditorKeyChord.editorCommands) func emptiedCompositionReturnsKeysToEditor(chord: EditorKeyChord) throws { - let (window, editor) = EditorControllerFixture.makeFocusedInWindow(string: " SELECT 1\nFROM ") + let (window, editor) = Mock.focusedTextViewController(string: " SELECT 1\nFROM ") let delegate = RecordingCompletionDelegate() editor.completionDelegate = delegate - EditorControllerFixture.beginComposition("le", in: editor.textView) - EditorControllerFixture.emptyComposition(in: editor.textView) + Mock.beginComposition("le", in: editor.textView) + Mock.emptyComposition(in: editor.textView) try #require(editor.textView.hasMarkedText() == false) let event = try #require(chord.event(in: window)) @@ -152,7 +152,7 @@ internal struct EditorKeyMonitorCompositionTests { @Test("The editor claims each of those keys when nothing is composing", arguments: EditorKeyChord.editorCommands) func editorCommandsClaimSettledText(chord: EditorKeyChord) throws { - let (window, editor) = EditorControllerFixture.makeFocusedInWindow(string: " SELECT 1\nFROM ") + let (window, editor) = Mock.focusedTextViewController(string: " SELECT 1\nFROM ") let delegate = RecordingCompletionDelegate() editor.completionDelegate = delegate let event = try #require(chord.event(in: window)) @@ -162,10 +162,10 @@ internal struct EditorKeyMonitorCompositionTests { @Test("The completion list leaves its keys to the input method mid-composition", arguments: EditorKeyChord.completionListKeys) func completionListDefersToComposition(chord: EditorKeyChord) throws { - let (window, editor) = EditorControllerFixture.makeFocusedInWindow(string: "SELECT ") + let (window, editor) = Mock.focusedTextViewController(string: "SELECT ") let delegate = RecordingCompletionDelegate() let panel = makeCompletionList(for: editor, delegate: delegate) - EditorControllerFixture.beginComposition("le", in: editor.textView) + Mock.beginComposition("le", in: editor.textView) let event = try #require(chord.event(in: window)) #expect(panel.handleKeyDown(event) === event) @@ -175,7 +175,7 @@ internal struct EditorKeyMonitorCompositionTests { @Test("The completion list claims its keys when nothing is composing", arguments: EditorKeyChord.completionListKeys) func completionListClaimsSettledText(chord: EditorKeyChord) throws { - let (window, editor) = EditorControllerFixture.makeFocusedInWindow(string: "SELECT ") + let (window, editor) = Mock.focusedTextViewController(string: "SELECT ") let delegate = RecordingCompletionDelegate() let panel = makeCompletionList(for: editor, delegate: delegate) let event = try #require(chord.event(in: window)) @@ -185,13 +185,13 @@ internal struct EditorKeyMonitorCompositionTests { @Test("Escape mid-composition in the editor leaves the find panel open") func findPanelDefersToEditorComposition() throws { - let (window, editor) = EditorControllerFixture.makeFocusedInWindow(string: "SELECT ") + let (window, editor) = Mock.focusedTextViewController(string: "SELECT ") let finder = try #require(editor.findViewController) finder.showFindPanel(animated: false) defer { finder.hideFindPanel(animated: false) } _ = window.makeFirstResponder(editor.textView) - EditorControllerFixture.beginComposition("le", in: editor.textView) - let escape = try #require(EditorControllerFixture.keyDown(keyCode: kVK_Escape, characters: "\u{1b}", in: window)) + Mock.beginComposition("le", in: editor.textView) + let escape = try #require(Mock.keyDown(keyCode: kVK_Escape, characters: "\u{1b}", in: window)) #expect(finder.findPanel.handleKeyDown(escape) === escape) #expect(finder.viewModel.isShowingFindPanel) @@ -199,7 +199,7 @@ internal struct EditorKeyMonitorCompositionTests { @Test("Escape mid-composition in a text field leaves the find panel open") func findPanelDefersToFieldComposition() throws { - let (window, editor) = EditorControllerFixture.makeFocusedInWindow(string: "SELECT ") + let (window, editor) = Mock.focusedTextViewController(string: "SELECT ") let finder = try #require(editor.findViewController) finder.showFindPanel(animated: false) defer { finder.hideFindPanel(animated: false) } @@ -213,7 +213,7 @@ internal struct EditorKeyMonitorCompositionTests { replacementRange: NSRange(location: NSNotFound, length: 0) ) try #require(fieldEditor.hasMarkedText()) - let escape = try #require(EditorControllerFixture.keyDown(keyCode: kVK_Escape, characters: "\u{1b}", in: window)) + let escape = try #require(Mock.keyDown(keyCode: kVK_Escape, characters: "\u{1b}", in: window)) #expect(finder.findPanel.handleKeyDown(escape) === escape) #expect(finder.viewModel.isShowingFindPanel) @@ -221,12 +221,12 @@ internal struct EditorKeyMonitorCompositionTests { @Test("Escape with nothing composing closes the find panel") func findPanelClosesOnSettledEscape() throws { - let (window, editor) = EditorControllerFixture.makeFocusedInWindow(string: "SELECT ") + let (window, editor) = Mock.focusedTextViewController(string: "SELECT ") let finder = try #require(editor.findViewController) finder.showFindPanel(animated: false) defer { finder.hideFindPanel(animated: false) } _ = window.makeFirstResponder(editor.textView) - let escape = try #require(EditorControllerFixture.keyDown(keyCode: kVK_Escape, characters: "\u{1b}", in: window)) + let escape = try #require(Mock.keyDown(keyCode: kVK_Escape, characters: "\u{1b}", in: window)) #expect(finder.findPanel.handleKeyDown(escape) == nil) #expect(finder.viewModel.isShowingFindPanel == false) diff --git a/TableProTests/Views/Editor/EditorPeripheralSurfaceTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/EditorPeripheralSurfaceTests.swift similarity index 90% rename from TableProTests/Views/Editor/EditorPeripheralSurfaceTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/EditorPeripheralSurfaceTests.swift index b59d29b245..08acd50a90 100644 --- a/TableProTests/Views/Editor/EditorPeripheralSurfaceTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/EditorPeripheralSurfaceTests.swift @@ -1,10 +1,9 @@ // // EditorPeripheralSurfaceTests.swift -// TableProTests +// TableProEditorKitTests // import AppKit -@testable import TablePro @testable import TableProEditorKit import TableProGrammars import TableProTextEngine @@ -24,14 +23,21 @@ struct EditorPeripheralSurfaceTests { init(language: CodeLanguage = .default) { let configuration = SourceEditorConfiguration( appearance: .init( - theme: EditorControllerFixture.theme, + theme: Mock.theme(), font: .monospacedSystemFont(ofSize: 12, weight: .regular), lineHeightMultiple: 1.0, wrapLines: false, tabWidth: 4 ), layout: .init(contentInsets: NSEdgeInsets(top: 0, left: 0, bottom: 8, right: 0)), - peripherals: EditorPeripherals.editor(lineNumbers: true, folding: false) + peripherals: .init( + showGutter: true, + showLineNumbers: true, + showFoldingRibbon: false, + showStatementRunControls: false, + gutterFitsContent: false, + showSpecialCharacters: true + ) ) controller = TextViewController( string: "SELECT * FROM users;\nSELECT * FROM orders;", diff --git a/TableProTests/Views/Editor/SQLEditorLongLineScrollTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/LongLineScrollTests.swift similarity index 91% rename from TableProTests/Views/Editor/SQLEditorLongLineScrollTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/LongLineScrollTests.swift index 847dc3b7a9..8f5777e8d4 100644 --- a/TableProTests/Views/Editor/SQLEditorLongLineScrollTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/LongLineScrollTests.swift @@ -1,6 +1,6 @@ // // SQLEditorLongLineScrollTests.swift -// TableProTests +// TableProEditorKitTests // import AppKit @@ -17,7 +17,7 @@ struct SQLEditorLongLineScrollTests { @Test("Undoing a long paste narrows the editor and brings back the start of every line") func undoingALongPasteReturnsToTheLineStarts() throws { - let controller = EditorControllerFixture.make(string: query) + let controller = Mock.loadedTextViewController(string: query) let end = (query as NSString).length let narrowWidth = controller.textView.frame.width @@ -36,7 +36,7 @@ struct SQLEditorLongLineScrollTests { @Test("The start of a line is never left under the gutter") func lineStartClearsTheGutter() throws { - let controller = EditorControllerFixture.make(string: pastedRow + "\n" + query) + let controller = Mock.loadedTextViewController(string: pastedRow + "\n" + query) controller.textView.scroll(NSPoint(x: 1_000_000, y: 0)) let lineStart = (pastedRow as NSString).length + 1 @@ -52,7 +52,7 @@ struct SQLEditorLongLineScrollTests { @Test("A long line scrolled a few points in stays there when the editor is laid out again (#2841)") func positionNearTheLineStartSurvivesLayout() throws { - let controller = EditorControllerFixture.make(string: pastedRow + "\n" + query) + let controller = Mock.loadedTextViewController(string: pastedRow + "\n" + query) controller.textView.layoutManager.layoutLines() controller.scrollPosition = CGPoint(x: 20, y: 0) try #require(abs(controller.scrollPosition.x - 20) <= 0.5, "Scrolled to \(controller.scrollPosition.x)") diff --git a/TableProTests/Views/Editor/GutterHighlightTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/GutterHighlightTests.swift similarity index 93% rename from TableProTests/Views/Editor/GutterHighlightTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/GutterHighlightTests.swift index 34f605f81d..8714034878 100644 --- a/TableProTests/Views/Editor/GutterHighlightTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/GutterHighlightTests.swift @@ -1,6 +1,6 @@ // // GutterHighlightTests.swift -// TableProTests +// TableProEditorKitTests // // Regression tests for gutter line-number highlighting at end of document. // Originally the gutter tested membership via `IndexSet.intersects(integersIn: lineRange)`, @@ -24,7 +24,7 @@ struct GutterHighlightTests { @Test("Caret at end of single-line query highlights the only line") func caretAtEndOfSingleLineHighlightsLine() throws { - let controller = EditorControllerFixture.make() + let controller = Mock.loadedTextViewController() setText("SELECT * FROM users", on: controller) let length = controller.textView.length controller.textView.selectionManager.setSelectedRange(NSRange(location: length, length: 0)) @@ -36,7 +36,7 @@ struct GutterHighlightTests { @Test("Caret at end of multi-line query highlights only the last line") func caretAtEndOfMultiLineHighlightsLastLine() throws { - let controller = EditorControllerFixture.make() + let controller = Mock.loadedTextViewController() setText("abc\ndef", on: controller) let length = controller.textView.length controller.textView.selectionManager.setSelectedRange(NSRange(location: length, length: 0)) @@ -50,7 +50,7 @@ struct GutterHighlightTests { @Test("Caret in middle of line highlights that line") func caretInMiddleOfLineHighlightsThatLine() throws { - let controller = EditorControllerFixture.make() + let controller = Mock.loadedTextViewController() setText("abc\ndef", on: controller) controller.textView.selectionManager.setSelectedRange(NSRange(location: 1, length: 0)) diff --git a/TableProTests/Editor/PasteHighlightCancelTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/PasteHighlightCancelTests.swift similarity index 99% rename from TableProTests/Editor/PasteHighlightCancelTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/PasteHighlightCancelTests.swift index d2c9ecfda1..69c664e1f5 100644 --- a/TableProTests/Editor/PasteHighlightCancelTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/PasteHighlightCancelTests.swift @@ -1,6 +1,6 @@ // // PasteHighlightCancelTests.swift -// TableProTests +// TableProEditorKitTests // // A cancelled tree-sitter edit used to invalidate the range as it was BEFORE the edit. That range // is empty for an insertion at a caret, and `HighlightProviderState.invalidate(_:)` returns without diff --git a/TableProTests/Views/Editor/QueryEditorLargePasteTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/LargePasteTests.swift similarity index 99% rename from TableProTests/Views/Editor/QueryEditorLargePasteTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/LargePasteTests.swift index b908ee6c92..e4bf9ac33b 100644 --- a/TableProTests/Views/Editor/QueryEditorLargePasteTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/LargePasteTests.swift @@ -1,6 +1,6 @@ // // QueryEditorLargePasteTests.swift -// TableProTests +// TableProEditorKitTests // // Regression tests for issue #2158: pasting a large block into the query editor crashed the app. // A caret paste over `maxSyncEditLength` routes the tree-sitter edit to the async arm, and that arm diff --git a/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldChunkBoundaryTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldChunkBoundaryTests.swift index 658af8eca6..d850bb1931 100644 --- a/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldChunkBoundaryTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldChunkBoundaryTests.swift @@ -47,9 +47,10 @@ struct LineFoldChunkBoundaryTests { controller.foldProvider = provider let model = LineFoldModel(controller: controller, foldView: NSView()) - // The calculation runs on the main actor, which other suites share, so wait for it to reach the last line - // rather than for a fixed time. - let deadline = ContinuousClock.now + .seconds(5) + // The calculation runs on the main actor, which every other suite in this target shares, so wait for it to + // reach the last line rather than for a fixed time. The deadline only turns a hang into a failure; it is not + // a budget, and five seconds of it was not enough once the editor's own suites moved into this target. + let deadline = ContinuousClock.now + .seconds(60) while provider.previousDepths[100] == nil, ContinuousClock.now < deadline { try await Task.sleep(for: .milliseconds(10)) } diff --git a/Packages/TableProEditor/Tests/TableProEditorKitTests/Mock.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/Mock.swift index daa44928f8..6eea0031a9 100644 --- a/Packages/TableProEditor/Tests/TableProEditorKitTests/Mock.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/Mock.swift @@ -66,6 +66,92 @@ enum Mock { ) } + /// A controller whose view is loaded and laid out, for tests that need the editor's real AppKit + /// behaviour rather than a stand-in. + @MainActor + static func loadedTextViewController( + string: String = "", + wrapLines: Bool = false, + coordinators: [TextViewCoordinator] = [] + ) -> TextViewController { + let controller = TextViewController( + string: string, + language: .default, + configuration: SourceEditorConfiguration( + appearance: .init( + theme: theme(), + font: .monospacedSystemFont(ofSize: 12, weight: .regular), + lineHeightMultiple: 1.0, + wrapLines: wrapLines, + tabWidth: 4 + ) + ), + cursorPositions: [], + highlightProviders: [], + coordinators: coordinators + ) + controller.loadView() + controller.view.frame = NSRect(x: 0, y: 0, width: 1_000, height: 1_000) + controller.view.layoutSubtreeIfNeeded() + return controller + } + + @MainActor + static func focusedTextViewController(string: String) -> (NSWindow, TextViewController) { + let controller = loadedTextViewController(string: string) + let window = NSWindow( + contentRect: NSRect(x: 0, y: 0, width: 1_000, height: 1_000), + styleMask: [.titled], + backing: .buffered, + defer: false + ) + window.isReleasedWhenClosed = false + window.contentView = controller.view + controller.view.layoutSubtreeIfNeeded() + _ = window.makeFirstResponder(controller.textView) + let end = (string as NSString).length + controller.setCursorPositions([CursorPosition(range: NSRange(location: end, length: 0))]) + return (window, controller) + } + + @MainActor + static func beginComposition(_ markedText: String, in textView: TextView) { + textView.setMarkedText( + markedText, + selectedRange: NSRange(location: (markedText as NSString).length, length: 0), + replacementRange: NSRange(location: NSNotFound, length: 0) + ) + } + + @MainActor + static func emptyComposition(in textView: TextView) { + textView.setMarkedText( + "", + selectedRange: NSRange(location: 0, length: 0), + replacementRange: NSRange(location: NSNotFound, length: 0) + ) + } + + static func keyDown( + keyCode: Int, + characters: String, + modifiers: NSEvent.ModifierFlags = [], + in window: NSWindow? + ) -> NSEvent? { + NSEvent.keyEvent( + with: .keyDown, + location: .zero, + modifierFlags: modifiers, + timestamp: 0, + windowNumber: window?.windowNumber ?? 0, + context: nil, + characters: characters, + charactersIgnoringModifiers: characters, + isARepeat: false, + keyCode: UInt16(keyCode) + ) + } + @MainActor static func windowedTextViewController(theme: EditorTheme) -> (NSWindow, TextViewController) { let controller = textViewController(theme: theme) diff --git a/Packages/TableProEditor/Tests/TableProEditorKitTests/SourceEditorDismantleTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/SourceEditorDismantleTests.swift new file mode 100644 index 0000000000..d710c57663 --- /dev/null +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/SourceEditorDismantleTests.swift @@ -0,0 +1,44 @@ +// +// SourceEditorDismantleTests.swift +// TableProEditorKitTests +// +// `onDisappear` fires on a live editor whenever its pane is unparented, so teardown hangs off +// `dismantleNSViewController`, which fires only when the representable's identity goes. A coordinator +// destroyed twice, or left in the list, is what that contract exists to prevent (#2236). +// + +import AppKit +import SwiftUI +@testable import TableProEditorKit +import Testing + +private final class RecordingCoordinator: TextViewCoordinator { + private(set) var destroyCount = 0 + + func prepareCoordinator(controller: TextViewController) {} + + func destroy() { + destroyCount += 1 + } +} + +@MainActor +@Suite("SourceEditor dismantle") +struct SourceEditorDismantleTests { + @Test("dismantleNSViewController destroys each text coordinator once and empties the list") + func dismantleDestroysCoordinatorsOnce() { + let recording = RecordingCoordinator() + let controller = Mock.loadedTextViewController(string: "SELECT 1", coordinators: [recording]) + let coordinator = SourceEditor.Coordinator( + text: .binding(.constant("SELECT 1")), + editorState: .constant(SourceEditorState()), + highlightProviders: [], + textCoordinators: [recording] + ) + + SourceEditor.dismantleNSViewController(controller, coordinator: coordinator) + + #expect(recording.destroyCount == 1) + #expect(controller.textCoordinators.values().isEmpty) + } +} diff --git a/TableProTests/Views/Editor/SyntaxHighlightingTests.swift b/Packages/TableProEditor/Tests/TableProEditorKitTests/SyntaxHighlightingTests.swift similarity index 93% rename from TableProTests/Views/Editor/SyntaxHighlightingTests.swift rename to Packages/TableProEditor/Tests/TableProEditorKitTests/SyntaxHighlightingTests.swift index c33562f825..ec86a9dd71 100644 --- a/TableProTests/Views/Editor/SyntaxHighlightingTests.swift +++ b/Packages/TableProEditor/Tests/TableProEditorKitTests/SyntaxHighlightingTests.swift @@ -1,6 +1,6 @@ // // SyntaxHighlightingTests.swift -// TableProTests +// TableProEditorKitTests // // The grammars' capture names and the editor's `CaptureName` vocabulary are two hand-maintained lists that must // agree. When they drifted, `TreeSitterClient` dropped every capture it could not name and the token kept the plain @@ -10,7 +10,6 @@ import AppKit import Foundation import SwiftTreeSitter -@testable import TablePro @testable import TableProEditorKit import TableProGrammars import Testing @@ -174,16 +173,6 @@ struct SyntaxHighlightingTests { // MARK: - The theme's own wiring - @MainActor - @Test("The theme's operator and function colours reach the editor") - func themeCarriesOperatorAndFunctionColors() { - let colors = ThemeEngine.shared.colors.editor - let theme = ThemeEngine.shared.makeEditorTheme() - - #expect(Self.sameColor(theme.operators.color, colors.operator)) - #expect(Self.sameColor(theme.functions.color, colors.function)) - } - // MARK: - Helpers struct Palette { @@ -289,11 +278,4 @@ struct SyntaxHighlightingTests { } return names } - - private static func sameColor(_ lhs: NSColor, _ rhs: NSColor) -> Bool { - guard let left = lhs.usingColorSpace(.sRGB), let right = rhs.usingColorSpace(.sRGB) else { return false } - return abs(left.redComponent - right.redComponent) < 0.001 - && abs(left.greenComponent - right.greenComponent) < 0.001 - && abs(left.blueComponent - right.blueComponent) < 0.001 - } } diff --git a/TableProTests/Views/Editor/TypesetterWrapLengthTests.swift b/Packages/TableProEditor/Tests/TableProTextEngineTests/TypesetterWrapLengthTests.swift similarity index 99% rename from TableProTests/Views/Editor/TypesetterWrapLengthTests.swift rename to Packages/TableProEditor/Tests/TableProTextEngineTests/TypesetterWrapLengthTests.swift index 967159efd2..ba2c07cbfe 100644 --- a/TableProTests/Views/Editor/TypesetterWrapLengthTests.swift +++ b/Packages/TableProEditor/Tests/TableProTextEngineTests/TypesetterWrapLengthTests.swift @@ -1,6 +1,6 @@ // // TypesetterWrapLengthTests.swift -// TableProTests +// TableProTextEngineTests // // Regression tests for wrapped line typesetting. `suggestLineBreak` returns an offset into the run, // not a length, but the typesetter passed it straight through as the CTLine length. Every fragment diff --git a/TablePro.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/TablePro.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 7a05d47328..e572e47a39 100644 --- a/TablePro.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/TablePro.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,4 +1,5 @@ { + "originHash" : "69dbdfbad9beb7ad22f52968e7dd42ac0f80f460ec8408de16041501970ff3c5", "pins" : [ { "identity" : "bigint", @@ -80,15 +81,6 @@ "version" : "4.2.0" } }, - { - "identity" : "swift-custom-dump", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-custom-dump", - "state" : { - "revision" : "e9c34fd54ece006b491a0e6d23fe9a6024b9a828", - "version" : "1.7.0" - } - }, { "identity" : "swift-distributed-tracing", "kind" : "remoteSourceControl", @@ -206,15 +198,6 @@ "version" : "0.25.10" } }, - { - "identity" : "xctest-dynamic-overlay", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay", - "state" : { - "revision" : "8f6abcf4c8950e2679d5b2fee4ca284fd7c34886", - "version" : "1.11.0" - } - }, { "identity" : "yams", "kind" : "remoteSourceControl", @@ -234,5 +217,5 @@ } } ], - "version" : 2 + "version" : 3 } diff --git a/TableProTests/Views/Editor/EditorControllerFixture.swift b/TableProTests/Views/Editor/EditorControllerFixture.swift index 6bdbcfd116..2a364b60fe 100644 --- a/TableProTests/Views/Editor/EditorControllerFixture.swift +++ b/TableProTests/Views/Editor/EditorControllerFixture.swift @@ -7,7 +7,7 @@ // import AppKit -@testable import TableProEditorKit +import TableProEditorKit import TableProGrammars import TableProTextEngine diff --git a/TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift b/TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift index 9ab8e1871b..8797d9ec7b 100644 --- a/TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift +++ b/TableProTests/Views/Editor/EditorLifecycleTeardownTests.swift @@ -11,20 +11,10 @@ import AppKit import SwiftUI @testable import TablePro -@testable import TableProEditorKit +import TableProEditorKit import TableProTextEngine import Testing -private final class RecordingCoordinator: TextViewCoordinator { - private(set) var destroyCount = 0 - - func prepareCoordinator(controller: TextViewController) {} - - func destroy() { - destroyCount += 1 - } -} - private final class DismantleRecorder { var makeCount = 0 var dismantleCount = 0 @@ -84,23 +74,6 @@ struct EditorLifecycleTeardownTests { #expect(controller.textView.string == "SELECT 1") } - @Test("dismantleNSViewController destroys each text coordinator once and empties the list") - func dismantleDestroysCoordinatorsOnce() { - let recording = RecordingCoordinator() - let controller = EditorControllerFixture.make(string: "SELECT 1", coordinators: [recording]) - let coordinator = SourceEditor.Coordinator( - text: .binding(.constant("SELECT 1")), - editorState: .constant(SourceEditorState()), - highlightProviders: [], - textCoordinators: [recording] - ) - - SourceEditor.dismantleNSViewController(controller, coordinator: coordinator) - - #expect(recording.destroyCount == 1) - #expect(controller.textCoordinators.values().isEmpty) - } - /// The production shape: closing a connection removes it from the registry, which selects a /// neighbour and unparents this pane, so `teardown()` always runs on a detached hosting /// controller. Nothing lays a detached view out, so without the explicit layout pass SwiftUI diff --git a/TableProTests/Views/Editor/EditorThemeBridgeTests.swift b/TableProTests/Views/Editor/EditorThemeBridgeTests.swift new file mode 100644 index 0000000000..d474ad6574 --- /dev/null +++ b/TableProTests/Views/Editor/EditorThemeBridgeTests.swift @@ -0,0 +1,32 @@ +// +// EditorThemeBridgeTests.swift +// TableProTests +// +// The colours the app's theme engine hands the editor. Everything about how the editor then paints +// them lives with the editor, in TableProEditorKitTests. +// + +import AppKit +@testable import TablePro +import TableProEditorKit +import Testing + +@Suite("Editor theme bridge") +struct EditorThemeBridgeTests { + @MainActor + @Test("The theme's operator and function colours reach the editor") + func themeCarriesOperatorAndFunctionColors() { + let colors = ThemeEngine.shared.colors.editor + let theme = ThemeEngine.shared.makeEditorTheme() + + #expect(Self.sameColor(theme.operators.color, colors.operator)) + #expect(Self.sameColor(theme.functions.color, colors.function)) + } + + private static func sameColor(_ lhs: NSColor, _ rhs: NSColor) -> Bool { + guard let left = lhs.usingColorSpace(.sRGB), let right = rhs.usingColorSpace(.sRGB) else { return false } + return abs(left.redComponent - right.redComponent) < 0.001 + && abs(left.greenComponent - right.greenComponent) < 0.001 + && abs(left.blueComponent - right.blueComponent) < 0.001 + } +} diff --git a/TableProTests/Views/Editor/QueryDiagnosticsRefreshTests.swift b/TableProTests/Views/Editor/QueryDiagnosticsRefreshTests.swift index 93df95e3b3..598ea4575b 100644 --- a/TableProTests/Views/Editor/QueryDiagnosticsRefreshTests.swift +++ b/TableProTests/Views/Editor/QueryDiagnosticsRefreshTests.swift @@ -7,8 +7,8 @@ import AppKit import Foundation import SwiftUI @testable import TablePro -@testable import TableProEditorKit -@testable import TableProTextEngine +import TableProEditorKit +import TableProTextEngine import Testing @MainActor @@ -87,15 +87,17 @@ struct QueryDiagnosticsRefreshTests { #expect(underlines(in: controller).isEmpty) } - @Test("A tab switch pushed through the text binding re-checks the incoming tab") - func tabSwitchThroughBinding() async { + /// A tab switch replaces the whole document, which is what `SourceEditor`'s binding does for the editor. + /// The binding plumbing itself is the editor's, and `SourceEditorBindingSyncTests` covers it; what belongs + /// here is that a second replacement re-checks rather than leaving the first document's answer behind. + @Test("A second replacement re-checks the incoming document") + func secondReplacementIsChecked() async { let (coordinator, controller) = makeEditor() defer { coordinator.destroy() } - let sync = TextBindingSync(text: .binding(.constant("")), phase: RepresentableSyncPhase()) - sync.applyRepresentableText("SELECT 1)", controller: controller) + controller.setText("SELECT 1)") #expect(await waitForUnderlines(in: controller) == [NSRange(location: 8, length: 1)]) - sync.applyRepresentableText("SELECT name FROM t /* open", controller: controller) + controller.setText("SELECT name FROM t /* open") #expect(underlines(in: controller).isEmpty) #expect(await waitForUnderlines(in: controller) == [NSRange(location: 19, length: 2)]) @@ -273,12 +275,3 @@ struct QueryDiagnosticMessageTests { #expect(rotors.filter { $0.label == QueryDiagnosticsRotorSearch.label }.count == 1) } } - -private extension EmphasisManager { - @MainActor - func toolTip(at point: CGPoint) -> String? { - guard let textView else { return nil } - let text = toolTips.view(textView, stringForToolTip: 0, point: point, userData: nil) - return text.isEmpty ? nil : text - } -} diff --git a/TableProTests/Views/Editor/RemoveInvisibleCharactersCommandTests.swift b/TableProTests/Views/Editor/RemoveInvisibleCharactersCommandTests.swift index 0b03492993..4a2a403736 100644 --- a/TableProTests/Views/Editor/RemoveInvisibleCharactersCommandTests.swift +++ b/TableProTests/Views/Editor/RemoveInvisibleCharactersCommandTests.swift @@ -6,7 +6,7 @@ import AppKit import Foundation @testable import TablePro -@testable import TableProEditorKit +import TableProEditorKit import TableProTextEngine import Testing @@ -40,11 +40,21 @@ struct RemoveInvisibleCharactersCommandTests { #expect(controller.textView.string == original) } + /// The command turns the editor's typing filters off for the length of its own edit, which is what + /// `separatorIsNotReindented` above measures. Asserting on the flag that does it only says a flag was + /// cleared; typing a newline afterwards and getting the leading indent back says the same filter is + /// running again. @Test("Typing filters still run for ordinary edits afterwards") func filtersResume() { - let (coordinator, controller) = makeEditor("SELECT\u{A0}1") + let (coordinator, controller) = makeEditor(" SELECT\u{A0}1") coordinator.performRemoveInvisibleCharacters() - #expect(controller.isApplyingUnfilteredEdits == false) + #expect(controller.textView.string == " SELECT 1") + + let end = (controller.textView.string as NSString).length + controller.textView.selectionManager.setSelectedRange(NSRange(location: end, length: 0)) + controller.textView.insertText("\n", replacementRange: NSRange(location: end, length: 0)) + + #expect(controller.textView.string == " SELECT 1\n ") } @Test("A read-only editor is left alone") From c151483b5a431b436c64e1c020ba60d067ed97b0 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Tue, 15 Sep 2026 15:39:11 +0700 Subject: [PATCH 6/6] build(editor): keep the app's resolved pins at the format CI writes --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/TablePro.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/TablePro.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index e572e47a39..b9f2986d36 100644 --- a/TablePro.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/TablePro.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,4 @@ { - "originHash" : "69dbdfbad9beb7ad22f52968e7dd42ac0f80f460ec8408de16041501970ff3c5", "pins" : [ { "identity" : "bigint", @@ -217,5 +216,5 @@ } } ], - "version" : 3 + "version" : 2 }