Skip to content

Releases: KalebCooper/swift-responsive-layout

Release list

0.4.0

Choose a tag to compare

@KalebCooper KalebCooper released this 02 Sep 15:13

Changed

  • Repository renamed from ResponsiveLayoutKit to swift-responsive-layout
    (https://github.com/KalebCooper/swift-responsive-layout), following the
    swift-* package naming convention. The package manifest name is now
    swift-responsive-layout. The library product and module remain
    ResponsiveLayoutKit, so import ResponsiveLayoutKit is unchanged.
    GitHub redirects the old URL, but update .package(url:) and any
    .product(name:package:) references (package: "swift-responsive-layout").
    The DocC site now lives at
    https://kalebcooper.github.io/swift-responsive-layout/.
  • Xcode scheme is now swift-responsive-layout (auto-generated from the
    manifest name). CI, the PR template, and CONTRIBUTING reference the new
    scheme name.

0.3.0

Choose a tag to compare

@KalebCooper KalebCooper released this 23 Jul 19:09

Added

  • \.responsiveLayout environment value: the canonically resolved layout
    family as a value (override → scene truth → container size class → phone),
    for feeding computed properties, view arguments, and pure functions without
    the closure APIs. \.containerResponsiveLayout is the container-shaped
    companion that deliberately ignores scene truth.
  • responsiveContentWidth(tabletFraction:): caps scroll content to a readable
    fraction of the scene width on tablet layouts (default
    baseTabletLayoutRatio), full-width on phone — the SwiftUI analogue of
    UIKit's readableContentGuide. Applied to a ScrollView's content, the
    scroll surface stays edge-to-edge.
  • accessibilityScrollFloor(_:): declares a compressible floor for greedy
    views (aspect-ratio images, maps) inside accessibilityScrollView(_:), so
    they shrink to the floor before the scrolling decision fires instead of
    forcing permanent scrolling via their large ideal height.
  • sceneLayout(mocking:) + SceneLayoutMockValues: publish a synthetic scene
    environment for previews and tests, making every scene-truth read — family, size,
    orientation, safe area — resolve against declared values on any canvas.
  • SceneLayoutEnvironment.isLandscapeAspectRatio: whether the scene is wider
    than tall — the aspect-ratio answer layout math wants, distinct from
    interfaceOrientation under freely resized windows.
  • SceneLayoutReader is now public: closure-based scene-truth access with
    self-discovery when no anchor exists upstream.
  • DocC article "First Frame and Scene Discovery": the sceneLayout == nil
    first-frame contract and the prescribed one-expression fallback patterns.
  • Demo app coverage for the new APIs: resolved-value readouts, a readable
    content width screen, a compressible-floor screen, and a mocked-scene
    preview.

Changed

  • Claude Code skill (responsivelayoutkit) documents the new value-level,
    content-width, floor, mock, and reader APIs, and warns against hand-rolled
    resolution chains. Plugin bumped to 1.1.0.