Commit graph

20 commits

Author SHA1 Message Date
ecb8a5ff3b Support observable-driven conditionals 2026-08-19 12:52:48 -04:00
b74896cf50 Mount conditional slot branches as raw widgets 2026-08-19 02:14:56 -04:00
ccb16154e9 Support heterogeneous top-level view bodies 2026-08-19 01:49:51 -04:00
6c99db5470 Add reactive conditional view reconciliation 2026-08-19 01:06:37 -04:00
9f1afe9a91 Update main loop scheduling, lifecycle, and reactive teardown 2026-08-11 22:55:55 -04:00
3919f1fe34 Optimize Portico state and collection updates 2026-08-11 11:27:24 -04:00
44f95fe0ad Add onChange view modifiers 2026-08-10 23:06:49 -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
f3bcae1f74 Add typed widget references 2026-08-05 17:56:30 -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
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
3130fb1471 Migrate to generated wrappers 2026-07-26 18:28:50 -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
145d0a710d Foundation implementation 2026-07-23 19:36:28 -04:00