0.9.1-alpha.2
Alpha@xaui/native@0.9.1-alpha.2
Patch Changes
-
c0a6e44: Add the slot primitives to
@xaui/native/system:createSlotContext,childrenToString,Slot,mergePropsandmergeRefs.createSlotContext(name)returns a[Provider, useSlot]pair, so each compound names the hook it exports and a slot read outside its root throws an error naming both the hook and the component instead of failing three frames later onundefined.childrenToStringimplements the text auto-wrap once for the whole library. It stringifies the tree recursively rather than inspecting the first child, which is what makes<Button>{count} items</Button>— children[3, ' items']— resolve to'3 items'.Slotis theasChildrender branch:const Root = asChild ? Slot : Pressable. It merges throughmergeProps, which composes event handlers rather than replacing them, stacks styles with the child's on top, keeps aPressablestate-function style callable, and merges refs.asChildhas to be uniform from the first component — retrofitting it changes the ref signature of every core component at once.