@yahoo/uds-create-config 5.91.6 → 5.91.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -23,6 +23,13 @@ const STYLE_PROPERTIES = [
|
|
|
23
23
|
"width",
|
|
24
24
|
"height"
|
|
25
25
|
];
|
|
26
|
+
/**
|
|
27
|
+
* Inline properties left out of the comparison because they change no still paint: what the
|
|
28
|
+
* pointer looks like over an element and whether it takes the pointer. A package part writes them
|
|
29
|
+
* on the element its `render` names (Ariakit's `SelectLabel` sets `cursor: default`), which the
|
|
30
|
+
* anatomy paints as a plain tag.
|
|
31
|
+
*/
|
|
32
|
+
const UNPAINTED_STYLE_PROPERTIES = new Set(["cursor", "pointer-events"]);
|
|
26
33
|
/** Pixel slack for the size comparisons — sub-pixel layout and font rounding. */
|
|
27
34
|
const SIZE_TOLERANCE_PX = 1.5;
|
|
28
35
|
/** The alignment key: a layer is `Component/layer`; anything else is its tag. */
|
|
@@ -321,7 +328,7 @@ function diffRendered(anatomy, instance, options = {}) {
|
|
|
321
328
|
instance: b.text
|
|
322
329
|
});
|
|
323
330
|
const inline = a.inlineStyle === true && b.inlineStyle === true;
|
|
324
|
-
const properties = inline ? [...new Set([...Object.keys(a.style), ...Object.keys(b.style)])].sort() : STYLE_PROPERTIES;
|
|
331
|
+
const properties = inline ? [...new Set([...Object.keys(a.style), ...Object.keys(b.style)])].filter((property) => !UNPAINTED_STYLE_PROPERTIES.has(property)).sort() : STYLE_PROPERTIES;
|
|
325
332
|
for (const property of properties) {
|
|
326
333
|
const va = a.style[property];
|
|
327
334
|
const vb = b.style[property];
|
|
@@ -1715,7 +1715,7 @@ function expandInstance(sink, path, instanceProps, content, hint, instanceSlots)
|
|
|
1715
1715
|
if (placed) children.push(placed);
|
|
1716
1716
|
}
|
|
1717
1717
|
if (isRoot && allContent.length > 0 && !contentPlaced) children.push(...allContent);
|
|
1718
|
-
if (positionedText !== void 0 && props.children
|
|
1718
|
+
if (positionedText !== void 0 && props.children == null) props.children = positionedText;
|
|
1719
1719
|
const slots = { ...boundFills };
|
|
1720
1720
|
const routed = slot ? instanceSlots?.[slot.from] : void 0;
|
|
1721
1721
|
const overridden = routed?.length && slot && !slot.untargeted ? intoName(slot.into) : void 0;
|