The value carried by the context.
Provide value to every descendant of children. The exact
shape of children is framework-specific — ReactNode for
React, the slot's render function for Svelte, the setup
return value for Vue. The implementation simply makes the
supplied value available to subsequent consume calls
within that scope.
Read the currently provided value. The exact host primitive is
framework-specific — useContext(ctx) in React, inject(key)
in Vue, getContext(key) in Svelte. When no provider is
mounted in scope, adapter implementations may return their
canonical "default" value or undefined — the choice is
adapter-defined.
Abstract provide / consume port that framework adapters implement against their native context primitive. The provide step wraps its
childrenin the framework's provider machinery so any descendant calling consume receives the supplied value; consume is called from inside a child renderer to read the current value.The return type of
provideand the argument type ofconsumeare deliberatelyunknownso the port works for both React-style "wrap children in a provider component" implementations and Svelte-style "set on the current component instance" implementations without forcing one shape on the other.