Commit graph

28 commits

Author SHA1 Message Date
b1e11a8553 Restore ToolbarView convenience initializers 2026-08-09 19:15:25 -04:00
23d7508763 Expand generated widget initializers 2026-08-09 19:06:48 -04:00
facca97f73 Spread ForEach rows into dynamic containers 2026-08-08 20:22:35 -04:00
6772b805b7 Add dialog, alert, and toast presentation modifiers 2026-08-08 14:48:02 -04:00
30f84b0aee Fix child-adder code generation 2026-08-05 21:55:39 -04:00
e5f483a7a7 All for extra ToolbarView init flexibility 2026-08-05 18:46:54 -04:00
6950051bae Fix ambiguous ToolbarView init 2026-08-05 18:41:47 -04:00
667400ea71 Add ToolbarView extension 2026-08-05 18:38:06 -04:00
f3bcae1f74 Add typed widget references 2026-08-05 17:56:30 -04:00
5e625d6123 Add application shutdown lifecycle hooks 2026-08-04 21:37:16 -04:00
0b3761db4b Add reactive if/else scene branching to SceneBuilder 2026-08-02 18:10:26 -04:00
b398edf3ee Add path-driven NavigationView with NavigationStack semantics 2026-08-02 16:24:43 -04:00
772a3c3a71 Add @Bindable property wrapper 2026-08-01 13:26:42 -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
519f7b4384 Make Binding modifiers two-way for readable properties 2026-07-26 23:11:53 -04:00
14d8160889 Implement DocC generation 2026-07-26 19:18:45 -04:00
3130fb1471 Migrate to generated wrappers 2026-07-26 18:28:50 -04:00
9a2e167661 Initial Adwaita widget wrappers (except actually include the files this time) 2026-07-24 02:21:56 -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
fd2cae3808 Complete native drop-in 2026-07-23 23:29:52 -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