@adia-ai/web-components 0.8.46 → 0.8.47

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.
package/core/anchor.js CHANGED
@@ -122,7 +122,27 @@ function anchorNative(anchor, popover, { placement, gap, matchWidth }) {
122
122
  popover.style.left = '';
123
123
 
124
124
  return () => {
125
- anchor.style.anchorName = prevAnchorName;
125
+ // Ownership-guarded restore (bug, found live): a trigger element that
126
+ // is ITSELF a popover's own `[slot="trigger"]` can become the anchor
127
+ // for a SECOND, nested popover opened from inside the first (menu-ui's
128
+ // dropdown item dispatching `action`, which table-toolbar-ui's overflow
129
+ // "More" trigger handles by re-anchoring a filter/sort/columns panel to
130
+ // that SAME element). Anchor-name assignment here is a blind overwrite,
131
+ // never a set/append — so whichever `anchorPopover()` call's cleanup
132
+ // runs LAST always wins, even when it's cleaning up a DIFFERENT,
133
+ // already-superseded anchor-name than the one currently on the element.
134
+ // menu-ui's own close (`render()`'s reactive `#hide()`, scheduled async
135
+ // — reordering the synchronous call site doesn't change when this
136
+ // runs) fires after the nested popover's `anchorPopover()` has already
137
+ // claimed the trigger, and unconditionally restoring `prevAnchorName`
138
+ // clobbered that fresh claim back to empty — the nested popover's own
139
+ // `position-anchor` was left pointing at a name resolving to nothing,
140
+ // rendering unpositioned at the viewport origin instead of near its
141
+ // trigger. Only restore when this cleanup's OWN name is still the
142
+ // current value — i.e., nobody has claimed the anchor since; otherwise
143
+ // leave it alone, since undoing someone else's still-active claim is
144
+ // never correct regardless of call order.
145
+ if (anchor.style.anchorName === name) anchor.style.anchorName = prevAnchorName;
126
146
  for (const [k, v] of Object.entries(prevStyles)) popover.style[k] = v;
127
147
  };
128
148
  }
@@ -10044,6 +10044,13 @@
10044
10044
  },
10045
10045
  "description": "id-ref of the table-ui to control. Falls back to the first sibling table-ui within the same parent when omitted."
10046
10046
  },
10047
+ {
10048
+ "name": "size",
10049
+ "type": {
10050
+ "text": "string"
10051
+ },
10052
+ "description": "Toolbar scale, via sizing.css's universal [size=\"sm|md|lg\"] ambient tokens. Not table-toolbar-specific chrome — the same attribute that scales any component. Set it once on the toolbar instead of on each slotted scope/actions-leading/actions control individually; anything slotted with no [size] of its own inherits the ambient value. Default (empty) = md."
10053
+ },
10047
10054
  {
10048
10055
  "name": "text",
10049
10056
  "type": {