@redvars/peacock 3.2.2 → 3.2.4
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/dist/BaseButton.js.map +1 -1
- package/dist/asciidoc-pJfx9Q5g.js +8 -0
- package/dist/asciidoc-pJfx9Q5g.js.map +1 -0
- package/dist/ayu-dark-B_QwGMx7.js +5 -0
- package/dist/ayu-dark-B_QwGMx7.js.map +1 -0
- package/dist/ayu-light-D3FWc2Ex.js +5 -0
- package/dist/ayu-light-D3FWc2Ex.js.map +1 -0
- package/dist/ayu-mirage-BmOeqvbN.js +5 -0
- package/dist/ayu-mirage-BmOeqvbN.js.map +1 -0
- package/dist/bird2-K3o4L1QD.js +8 -0
- package/dist/bird2-K3o4L1QD.js.map +1 -0
- package/dist/c3-B07AahKi.js +8 -0
- package/dist/c3-B07AahKi.js.map +1 -0
- package/dist/code-highlighter.js +46 -22
- package/dist/code-highlighter.js.map +1 -1
- package/dist/custom-elements-jsdocs.json +29 -2
- package/dist/custom-elements.json +89 -3
- package/dist/{erb-m-j2vBLm.js → erb-ChJ68mCV.js} +2 -2
- package/dist/{erb-m-j2vBLm.js.map → erb-ChJ68mCV.js.map} +1 -1
- package/dist/focus-ring.js +32 -17
- package/dist/focus-ring.js.map +1 -1
- package/dist/horizon-bright-BLApERHE.js +5 -0
- package/dist/horizon-bright-BLApERHE.js.map +1 -0
- package/dist/icon.js +1 -1
- package/dist/index.js +2 -2
- package/dist/just-B9LTc0LG.js +36 -0
- package/dist/just-B9LTc0LG.js.map +1 -0
- package/dist/latex-BlSVCRS1.js +12 -0
- package/dist/latex-BlSVCRS1.js.map +1 -0
- package/dist/llvm-DmXvUVfA.js +8 -0
- package/dist/llvm-DmXvUVfA.js.map +1 -0
- package/dist/marko-BmJxIfAg.js +17 -0
- package/dist/marko-BmJxIfAg.js.map +1 -0
- package/dist/{mdc-BrYnGSXv.js → mdc-C7Ba-c77.js} +2 -2
- package/dist/{mdc-BrYnGSXv.js.map → mdc-C7Ba-c77.js.map} +1 -1
- package/dist/menu-item.js +70 -20
- package/dist/menu-item.js.map +1 -1
- package/dist/mojo-DYU6y2W9.js +8 -0
- package/dist/{mojo-u5OgFbxC.js.map → mojo-DYU6y2W9.js.map} +1 -1
- package/dist/moonbit-CV1yN8C9.js +8 -0
- package/dist/moonbit-CV1yN8C9.js.map +1 -0
- package/dist/{nextflow-u9s9iK4L.js → nextflow-Dg6qlPoG.js} +5 -2
- package/dist/nextflow-Dg6qlPoG.js.map +1 -0
- package/dist/nextflow-groovy-CORam5Fa.js +8 -0
- package/dist/nextflow-groovy-CORam5Fa.js.map +1 -0
- package/dist/nushell-CljK3mss.js +8 -0
- package/dist/nushell-CljK3mss.js.map +1 -0
- package/dist/peacock-loader.js +2 -2
- package/dist/ron-BdzR44AN.js +8 -0
- package/dist/ron-BdzR44AN.js.map +1 -0
- package/dist/{rst-DF3hmW_x.js → rst-CFS_KoQV.js} +2 -2
- package/dist/{rst-DF3hmW_x.js.map → rst-CFS_KoQV.js.map} +1 -1
- package/dist/ruby-D6iviT7z.js +39 -0
- package/dist/ruby-D6iviT7z.js.map +1 -0
- package/dist/src/button/BaseButton.d.ts +1 -1
- package/dist/src/focus-ring/focus-ring.d.ts +4 -0
- package/dist/src/menu/menu-item/menu-item.d.ts +10 -0
- package/dist/svelte-BkSXBbLu.js +17 -0
- package/dist/svelte-BkSXBbLu.js.map +1 -0
- package/dist/{swift-BCgZrEcl.js → swift-DyFZxOd-.js} +2 -2
- package/dist/{swift-BCgZrEcl.js.map → swift-DyFZxOd-.js.map} +1 -1
- package/dist/{switch-CSs3KDGd.js → switch-CC-S5fbc.js} +5 -4
- package/dist/switch-CC-S5fbc.js.map +1 -0
- package/dist/tex-BbUv4agS.js +11 -0
- package/dist/tex-BbUv4agS.js.map +1 -0
- package/dist/tooltip.js +72 -64
- package/dist/tooltip.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{twig-VqT-e9DI.js → twig-B60fOxJY.js} +2 -2
- package/dist/{twig-VqT-e9DI.js.map → twig-B60fOxJY.js.map} +1 -1
- package/dist/typedoc.json +73816 -73545
- package/dist/{unsafe-html-BIBrxtsS.js → unsafe-html-BS8X6Gto.js} +2 -2
- package/dist/{unsafe-html-BIBrxtsS.js.map → unsafe-html-BS8X6Gto.js.map} +1 -1
- package/package.json +5 -1
- package/readme.md +1 -1
- package/src/button/BaseButton.ts +1 -1
- package/src/button/button/button.scss +1 -0
- package/src/button/button/button.ts +1 -1
- package/src/button/icon-button/icon-button.ts +1 -1
- package/src/focus-ring/focus-ring.ts +34 -17
- package/src/menu/demo/index.html +36 -0
- package/src/menu/menu-item/menu-item.scss +13 -0
- package/src/menu/menu-item/menu-item.ts +65 -21
- package/dist/asciidoc-BDJTg1PM.js +0 -8
- package/dist/asciidoc-BDJTg1PM.js.map +0 -1
- package/dist/ayu-dark-ygzj7KbW.js +0 -5
- package/dist/ayu-dark-ygzj7KbW.js.map +0 -1
- package/dist/ayu-light-DsUL6vCY.js +0 -5
- package/dist/ayu-light-DsUL6vCY.js.map +0 -1
- package/dist/ayu-mirage-CyHYB1Vf.js +0 -5
- package/dist/ayu-mirage-CyHYB1Vf.js.map +0 -1
- package/dist/c3-CmLsUuAG.js +0 -8
- package/dist/c3-CmLsUuAG.js.map +0 -1
- package/dist/latex-Dym6_5Jv.js +0 -12
- package/dist/latex-Dym6_5Jv.js.map +0 -1
- package/dist/llvm-CPhCWK2d.js +0 -8
- package/dist/llvm-CPhCWK2d.js.map +0 -1
- package/dist/marko-C4cA5Esr.js +0 -17
- package/dist/marko-C4cA5Esr.js.map +0 -1
- package/dist/mojo-u5OgFbxC.js +0 -8
- package/dist/moonbit-aQWdlyG4.js +0 -8
- package/dist/moonbit-aQWdlyG4.js.map +0 -1
- package/dist/nextflow-u9s9iK4L.js.map +0 -1
- package/dist/nushell-Lv1Ave7e.js +0 -8
- package/dist/nushell-Lv1Ave7e.js.map +0 -1
- package/dist/ron-BKVA_67x.js +0 -8
- package/dist/ron-BKVA_67x.js.map +0 -1
- package/dist/ruby-w0WL1wp4.js +0 -39
- package/dist/ruby-w0WL1wp4.js.map +0 -1
- package/dist/svelte-CwlnTKtO.js +0 -17
- package/dist/svelte-CwlnTKtO.js.map +0 -1
- package/dist/switch-CSs3KDGd.js.map +0 -1
- package/dist/tex-C5wdBdOa.js +0 -11
- package/dist/tex-C5wdBdOa.js.map +0 -1
package/dist/tooltip.js
CHANGED
|
@@ -99,10 +99,6 @@ const oppositeSideMap = {
|
|
|
99
99
|
bottom: 'top',
|
|
100
100
|
top: 'bottom'
|
|
101
101
|
};
|
|
102
|
-
const oppositeAlignmentMap = {
|
|
103
|
-
start: 'end',
|
|
104
|
-
end: 'start'
|
|
105
|
-
};
|
|
106
102
|
function clamp(start, value, end) {
|
|
107
103
|
return max(start, min(value, end));
|
|
108
104
|
}
|
|
@@ -121,9 +117,9 @@ function getOppositeAxis(axis) {
|
|
|
121
117
|
function getAxisLength(axis) {
|
|
122
118
|
return axis === 'y' ? 'height' : 'width';
|
|
123
119
|
}
|
|
124
|
-
const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
|
|
125
120
|
function getSideAxis(placement) {
|
|
126
|
-
|
|
121
|
+
const firstChar = placement[0];
|
|
122
|
+
return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';
|
|
127
123
|
}
|
|
128
124
|
function getAlignmentAxis(placement) {
|
|
129
125
|
return getOppositeAxis(getSideAxis(placement));
|
|
@@ -146,7 +142,7 @@ function getExpandedPlacements(placement) {
|
|
|
146
142
|
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
147
143
|
}
|
|
148
144
|
function getOppositeAlignmentPlacement(placement) {
|
|
149
|
-
return placement.replace(
|
|
145
|
+
return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
|
|
150
146
|
}
|
|
151
147
|
const lrPlacement = ['left', 'right'];
|
|
152
148
|
const rlPlacement = ['right', 'left'];
|
|
@@ -177,7 +173,8 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
|
177
173
|
return list;
|
|
178
174
|
}
|
|
179
175
|
function getOppositePlacement(placement) {
|
|
180
|
-
|
|
176
|
+
const side = getSide(placement);
|
|
177
|
+
return oppositeSideMap[side] + placement.slice(side.length);
|
|
181
178
|
}
|
|
182
179
|
function expandPaddingObject(padding) {
|
|
183
180
|
return {
|
|
@@ -336,6 +333,9 @@ async function detectOverflow(state, options) {
|
|
|
336
333
|
};
|
|
337
334
|
}
|
|
338
335
|
|
|
336
|
+
// Maximum number of resets that can occur before bailing to avoid infinite reset loops.
|
|
337
|
+
const MAX_RESET_COUNT = 50;
|
|
338
|
+
|
|
339
339
|
/**
|
|
340
340
|
* Computes the `x` and `y` coordinates that will place the floating element
|
|
341
341
|
* next to a given reference element.
|
|
@@ -350,7 +350,10 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
350
350
|
middleware = [],
|
|
351
351
|
platform
|
|
352
352
|
} = config;
|
|
353
|
-
const
|
|
353
|
+
const platformWithDetectOverflow = platform.detectOverflow ? platform : {
|
|
354
|
+
...platform,
|
|
355
|
+
detectOverflow
|
|
356
|
+
};
|
|
354
357
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
355
358
|
let rects = await platform.getElementRects({
|
|
356
359
|
reference,
|
|
@@ -362,14 +365,17 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
362
365
|
y
|
|
363
366
|
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
364
367
|
let statefulPlacement = placement;
|
|
365
|
-
let middlewareData = {};
|
|
366
368
|
let resetCount = 0;
|
|
367
|
-
|
|
368
|
-
|
|
369
|
+
const middlewareData = {};
|
|
370
|
+
for (let i = 0; i < middleware.length; i++) {
|
|
371
|
+
const currentMiddleware = middleware[i];
|
|
372
|
+
if (!currentMiddleware) {
|
|
373
|
+
continue;
|
|
374
|
+
}
|
|
369
375
|
const {
|
|
370
376
|
name,
|
|
371
377
|
fn
|
|
372
|
-
} =
|
|
378
|
+
} = currentMiddleware;
|
|
373
379
|
const {
|
|
374
380
|
x: nextX,
|
|
375
381
|
y: nextY,
|
|
@@ -383,10 +389,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
383
389
|
strategy,
|
|
384
390
|
middlewareData,
|
|
385
391
|
rects,
|
|
386
|
-
platform:
|
|
387
|
-
...platform,
|
|
388
|
-
detectOverflow: (_platform$detectOverf = platform.detectOverflow) != null ? _platform$detectOverf : detectOverflow
|
|
389
|
-
},
|
|
392
|
+
platform: platformWithDetectOverflow,
|
|
390
393
|
elements: {
|
|
391
394
|
reference,
|
|
392
395
|
floating
|
|
@@ -394,14 +397,11 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
394
397
|
});
|
|
395
398
|
x = nextX != null ? nextX : x;
|
|
396
399
|
y = nextY != null ? nextY : y;
|
|
397
|
-
middlewareData = {
|
|
398
|
-
...middlewareData,
|
|
399
|
-
|
|
400
|
-
...middlewareData[name],
|
|
401
|
-
...data
|
|
402
|
-
}
|
|
400
|
+
middlewareData[name] = {
|
|
401
|
+
...middlewareData[name],
|
|
402
|
+
...data
|
|
403
403
|
};
|
|
404
|
-
if (reset && resetCount
|
|
404
|
+
if (reset && resetCount < MAX_RESET_COUNT) {
|
|
405
405
|
resetCount++;
|
|
406
406
|
if (typeof reset === 'object') {
|
|
407
407
|
if (reset.placement) {
|
|
@@ -772,7 +772,6 @@ function isShadowRoot(value) {
|
|
|
772
772
|
}
|
|
773
773
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
774
774
|
}
|
|
775
|
-
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
|
|
776
775
|
function isOverflowElement(element) {
|
|
777
776
|
const {
|
|
778
777
|
overflow,
|
|
@@ -780,32 +779,35 @@ function isOverflowElement(element) {
|
|
|
780
779
|
overflowY,
|
|
781
780
|
display
|
|
782
781
|
} = getComputedStyle$1(element);
|
|
783
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) &&
|
|
782
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
|
|
784
783
|
}
|
|
785
|
-
const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
|
|
786
784
|
function isTableElement(element) {
|
|
787
|
-
return
|
|
785
|
+
return /^(table|td|th)$/.test(getNodeName(element));
|
|
788
786
|
}
|
|
789
|
-
const topLayerSelectors = [':popover-open', ':modal'];
|
|
790
787
|
function isTopLayer(element) {
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
return
|
|
794
|
-
} catch (_e) {
|
|
795
|
-
return false;
|
|
788
|
+
try {
|
|
789
|
+
if (element.matches(':popover-open')) {
|
|
790
|
+
return true;
|
|
796
791
|
}
|
|
797
|
-
})
|
|
792
|
+
} catch (_e) {
|
|
793
|
+
// no-op
|
|
794
|
+
}
|
|
795
|
+
try {
|
|
796
|
+
return element.matches(':modal');
|
|
797
|
+
} catch (_e) {
|
|
798
|
+
return false;
|
|
799
|
+
}
|
|
798
800
|
}
|
|
799
|
-
const
|
|
800
|
-
const
|
|
801
|
-
const
|
|
801
|
+
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
802
|
+
const containRe = /paint|layout|strict|content/;
|
|
803
|
+
const isNotNone = value => !!value && value !== 'none';
|
|
804
|
+
let isWebKitValue;
|
|
802
805
|
function isContainingBlock(elementOrCss) {
|
|
803
|
-
const webkit = isWebKit();
|
|
804
806
|
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
805
807
|
|
|
806
808
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
807
809
|
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
808
|
-
return
|
|
810
|
+
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
|
|
809
811
|
}
|
|
810
812
|
function getContainingBlock(element) {
|
|
811
813
|
let currentNode = getParentNode(element);
|
|
@@ -820,12 +822,13 @@ function getContainingBlock(element) {
|
|
|
820
822
|
return null;
|
|
821
823
|
}
|
|
822
824
|
function isWebKit() {
|
|
823
|
-
if (
|
|
824
|
-
|
|
825
|
+
if (isWebKitValue == null) {
|
|
826
|
+
isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
|
|
827
|
+
}
|
|
828
|
+
return isWebKitValue;
|
|
825
829
|
}
|
|
826
|
-
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
|
|
827
830
|
function isLastTraversableNode(node) {
|
|
828
|
-
return
|
|
831
|
+
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
829
832
|
}
|
|
830
833
|
function getComputedStyle$1(element) {
|
|
831
834
|
return getWindow(element).getComputedStyle(element);
|
|
@@ -881,8 +884,9 @@ function getOverflowAncestors(node, list, traverseIframes) {
|
|
|
881
884
|
if (isBody) {
|
|
882
885
|
const frameElement = getFrameElement(win);
|
|
883
886
|
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
887
|
+
} else {
|
|
888
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
884
889
|
}
|
|
885
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
886
890
|
}
|
|
887
891
|
function getFrameElement(win) {
|
|
888
892
|
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
@@ -1059,7 +1063,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
1059
1063
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1060
1064
|
scroll = getNodeScroll(offsetParent);
|
|
1061
1065
|
}
|
|
1062
|
-
if (
|
|
1066
|
+
if (isOffsetParentAnElement) {
|
|
1063
1067
|
const offsetRect = getBoundingClientRect(offsetParent);
|
|
1064
1068
|
scale = getScale(offsetParent);
|
|
1065
1069
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
@@ -1147,7 +1151,6 @@ function getViewportRect(element, strategy) {
|
|
|
1147
1151
|
};
|
|
1148
1152
|
}
|
|
1149
1153
|
|
|
1150
|
-
const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
|
|
1151
1154
|
// Returns the inner client rect, subtracting scrollbars if present.
|
|
1152
1155
|
function getInnerBoundingClientRect(element, strategy) {
|
|
1153
1156
|
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
@@ -1212,7 +1215,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
1212
1215
|
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
1213
1216
|
currentContainingBlockComputedStyle = null;
|
|
1214
1217
|
}
|
|
1215
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle &&
|
|
1218
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
1216
1219
|
if (shouldDropCurrentNode) {
|
|
1217
1220
|
// Drop non-containing blocks.
|
|
1218
1221
|
result = result.filter(ancestor => ancestor !== currentNode);
|
|
@@ -1237,20 +1240,23 @@ function getClippingRect(_ref) {
|
|
|
1237
1240
|
} = _ref;
|
|
1238
1241
|
const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
1239
1242
|
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
1240
|
-
const
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1243
|
+
const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
|
|
1244
|
+
let top = firstRect.top;
|
|
1245
|
+
let right = firstRect.right;
|
|
1246
|
+
let bottom = firstRect.bottom;
|
|
1247
|
+
let left = firstRect.left;
|
|
1248
|
+
for (let i = 1; i < clippingAncestors.length; i++) {
|
|
1249
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
|
|
1250
|
+
top = max(rect.top, top);
|
|
1251
|
+
right = min(rect.right, right);
|
|
1252
|
+
bottom = min(rect.bottom, bottom);
|
|
1253
|
+
left = max(rect.left, left);
|
|
1254
|
+
}
|
|
1249
1255
|
return {
|
|
1250
|
-
width:
|
|
1251
|
-
height:
|
|
1252
|
-
x:
|
|
1253
|
-
y:
|
|
1256
|
+
width: right - left,
|
|
1257
|
+
height: bottom - top,
|
|
1258
|
+
x: left,
|
|
1259
|
+
y: top
|
|
1254
1260
|
};
|
|
1255
1261
|
}
|
|
1256
1262
|
|
|
@@ -1501,7 +1507,7 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
1501
1507
|
animationFrame = false
|
|
1502
1508
|
} = options;
|
|
1503
1509
|
const referenceEl = unwrapElement(reference);
|
|
1504
|
-
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
|
|
1510
|
+
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
|
|
1505
1511
|
ancestors.forEach(ancestor => {
|
|
1506
1512
|
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
|
1507
1513
|
passive: true
|
|
@@ -1514,7 +1520,7 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
1514
1520
|
if (elementResize) {
|
|
1515
1521
|
resizeObserver = new ResizeObserver(_ref => {
|
|
1516
1522
|
let [firstEntry] = _ref;
|
|
1517
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
1523
|
+
if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
|
|
1518
1524
|
// Prevent update loops when using the `size` middleware.
|
|
1519
1525
|
// https://github.com/floating-ui/floating-ui/issues/1740
|
|
1520
1526
|
resizeObserver.unobserve(floating);
|
|
@@ -1529,7 +1535,9 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
1529
1535
|
if (referenceEl && !animationFrame) {
|
|
1530
1536
|
resizeObserver.observe(referenceEl);
|
|
1531
1537
|
}
|
|
1532
|
-
|
|
1538
|
+
if (floating) {
|
|
1539
|
+
resizeObserver.observe(floating);
|
|
1540
|
+
}
|
|
1533
1541
|
}
|
|
1534
1542
|
let frameId;
|
|
1535
1543
|
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|