Skip to content

2.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 02 Nov 14:48
· 7 commits to develop since this release
0069435

Added

  • NavigationRouter<Route, Sheet, Cover>: one @MainActor @Observable router for stack, sheet, and cover.
  • BaseNavigationContainer and View.navigationRouter(...).
  • maxDepth stack cap (default 30) and duplicate-top push guard.
  • push, replacePath, present(sheet:), present(cover:) return Bool (@discardableResult) and log rejections via os.Logger.
  • send(_:) returns its Task so callers can await the main-actor mutation.
  • tvOS 17, watchOS 10, and visionOS 1 declared in Package.swift.

Changed

  • Breaking: swift-tools-version 6.0 (Xcode 16+), Swift 6 language mode; minimums iOS 17 / macOS 14.
  • Because push/present/replacePath now return Bool, generic single-expression closures such as MainActor.run { router.push(x) } infer Bool and warn about an unused result. Call await router.push(x) directly, or write _ = router.push(x).
  • macOS presents covers as sheets instead of ignoring them.
  • A sheet and a cover can no longer be presented at the same time through the router API.
  • maxDepth is clamped to >= 1 on every assignment (assigning a negative value previously crashed replacePath); initialPath is truncated to maxDepth.

Removed

  • Breaking: public Collection.subscript(safe:) and Array.removeLastSafe().
  • Redundant @unchecked Sendable on @MainActor classes.

Fixed

  • v1 BaseNavigationStack.dismiss() pops a single-screen stack; replaceNavigationStack(path:) clears active modals.