0.9.1-alpha.31
Alpha@xaui/native@0.9.1-alpha.31
Patch Changes
-
7b0d12b: feat(divider): the v1
Divider— no variant, onealignSelffor both axesThe thirteenth entry of the core. One node and no slots: a rule is a filled box one point thick, and there is nothing inside it. A divider with a word across it is a
Rowholding two of these and aTypography— the composition the library already has. ADivider.Labelwould put a layout inside a line.No
variant, and this is the only component in the core without one. A variant is the design system's vocabulary (§1 bis) — a name that means the same thing everywhere it appears — and on a rule there is nothing for such a name to describe: no fill against a foreground, no border against a surface, no intent to report. It briefly had three, naming the three separator tokens, which is a shade of grey wearing a word.sizesays how heavy the rule is andcolorsays what colour it is, in React Native's own values; between them there is nothing a third name would add. The theme still sets the default — the rule paintsseparator.alignSelf: 'stretch'serves both orientations, and that one line is the whole mechanism: in aColumnthe cross axis is horizontal so a stretched child is full width, in aRowit is vertical so the same word makes a vertical rule full height, and on the axis the thickness fixes it is ignored. So there is nowidthorheightto keep in sync, and a horizontal divider written inside aRowcollapses on purpose rather than guessing.That is also why the recipe has no
size × orientationcompounds: thesizeaxis writes both keys blind and theorientationaxis, declared second, releases the wrong one. Four lines and two, instead of eight.asChildis there as R12 requires, and it earns its place on this component: anAnimated.Viewthat collapses a section takes the thickness and the ink from the recipe and the height from a shared value.sizeis the thickness —xsis the reference implementation'sthin, one device pixel, andlgis theirthick, six points. It defaults toxs, the one place in the library that does not default tomd: a rule you notice is a rule that is too thick.