Commit graph

17 commits

Author SHA1 Message Date
2a0a15d38f Add a display-scoped Clipboard API 2026-08-12 00:19:16 -04:00
7c651e2064 Add breakpoint modifiers and condition DSL 2026-08-11 18:17:01 -04:00
dcaa660b78 Add Adwaita convenience initializers 2026-08-09 22:27:56 -04:00
6772b805b7 Add dialog, alert, and toast presentation modifiers 2026-08-08 14:48:02 -04:00
f3bcae1f74 Add typed widget references 2026-08-05 17:56:30 -04:00
b398edf3ee Add path-driven NavigationView with NavigationStack semantics 2026-08-02 16:24:43 -04:00
da91b02a6a Port @Environment and @Observable support
Adds SwiftUI-style @Environment property wrapper with key-path and
object-injection flavors, an @Observable bridge that flushes on a GLib
idle source at highIdle priority (ahead of GTK redraw), targeted widget
updates driven by Observation tracking, and two-way observable bindings
that ride the existing bindProperty path.

New library files (4):
- State/ObservationBridge.swift -- coalesced flush bridge
- State/EnvironmentValues.swift -- scope-local key-to-box map
- State/Environment.swift -- @Environment wrapper, DynamicProperty
- Core/View+Environment.swift -- .environment(...) modifiers

Modified library files (8):
- DependencyTracker: import Observation, observing: param, didArmObservation
- EitherView/ForEach: opt container trackers out of Observation
- NodeRegistry: isEmpty for retention check
- PropertyBinding: hasDependencies || didArmObservation gate
- Binding: readOnly init, observable key-path init
- MountContext: environment field, withEnvironment, inheritance
- AnyView: _resolveDynamicProperties hook before user body eval

New tests (21 across 3 files):
- EnvironmentTests (7): scoping, nesting, projections, ForEach, lazy branches, reuse
- ObservableTests (11): acceptance case, write-back, coalescing, teardown,
  binding echo, re-arm de-dupe, retention, flush ordering
- StateTests (+3): Observation arming unit tests

Example: EnvironmentDemoPage demonstrates the feature end to end.
2026-07-30 16:53:10 -04:00
058945af03 Add GLibMainExecutor and async .task modifier 2026-07-29 23:55:09 -04:00
a12a9198dc Add GLib main-loop Idle/Timeout sources and view lifecycle modifiers 2026-07-29 01:24:49 -04:00
4f31f74a7d Add Adwaita style class view modifiers 2026-07-28 23:37:03 -04:00
c35d039634 Add InterpolatedText for reactive string interpolation inits and modifiers 2026-07-28 22:33:05 -04:00
3130fb1471 Migrate to generated wrappers 2026-07-26 18:28:50 -04:00
4c7054e31f Initial Adwaita widget wrappers 2026-07-24 02:20:00 -04:00
4594728770 Implement collections and teardown 2026-07-24 00:07:02 -04:00
d177a85236 Conditionals: EitherView and OptionalView with reactive branch visibility 2026-07-23 22:35:34 -04:00
c309fc3d1a State module with reactive label bindings and tracked closures
Add @State, StateBox, Binding, DependencyTracker, and
SubscriptionToken for targeted reactive updates.

Label gains two reactive overloads: Label(Binding<String>)
for the explicit-binding path and Label(() -> String) for
tracked closures. Both update the Gtk.Label text in-place
without re-mounting.

Regression tests verify label updates survive when the
Swift wrapper is deallocated after the GObject is attached
to the widget tree (GTK does not retain wrappers).

Includes 28 new tests across ReactiveLabelTests and
StateTests suites.
2026-07-23 21:06:09 -04:00
145d0a710d Foundation implementation 2026-07-23 19:36:28 -04:00