Skip to content

feat: AppKit renderer (A2UIAppKit) #25

@BBC6BAE9

Description

@BBC6BAE9

Background

A2UISwiftCore is completely UI-framework-agnostic. It has zero dependency on SwiftUI, UIKit, or AppKit — making it suitable for integration with any Apple UI framework, including SwiftUI, UIKit, AppKit, and server-side Swift.

Current State

The existing A2UISwiftUI target demonstrates a full renderer built on top of A2UISwiftCore. The data layer is already ready for AppKit:

  • DataContext.subscribeDynamicValue() provides reactive data subscriptions without any SwiftUI dependency
  • MessageProcessor and SurfaceViewModel handle all protocol-level message processing
  • ComponentNode tree is framework-agnostic and can be walked by any renderer

What Needs to Be Done

  • Add a new A2UIAppKit SPM target in Package.swift with A2UISwiftCore as its only dependency
  • Implement a component set parallel to A2UISwiftUI, using native AppKit controls (NSTextField, NSButton, NSStackView, etc.)
  • Use DataContext.subscribeDynamicValue() to drive UI updates reactively
  • Handle component lifecycle (subscribe when view appears, unsubscribe when view deallocates)

Where to Start

  1. Read through Sources/A2UISwiftUI/ — the data layer calls are identical, only the rendering changes
  2. If feat: UIKit renderer (A2UIUIKit) #24 (UIKit renderer) is already in progress, consider referencing its architecture — UIKit and AppKit renderers share the same data-layer patterns
  3. Start with the four core layout components: Text, Button, Column, Row
  4. Validate the architecture with those four before expanding to the full component set

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions