@iyulab/components 3.2.0 → 3.2.1
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/CHANGELOG.md +11 -0
- package/dist/components/UFloatingElement.d.ts +3 -0
- package/dist/components/UFloatingElement.js +19 -1
- package/dist/custom-elements.json +3763 -3678
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.2.1] - 2026-11-25
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Open floating elements (`u-select`, `u-popover`, `u-tooltip`, menus, pickers) no longer stay `visibility: hidden` after
|
|
8
|
+
their anchor comes back into view without any ancestor or anchor resizing. The anchor-hidden judgement is a snapshot, and
|
|
9
|
+
when the content above an anchor shrinks (a section still filling in right after a route change) only the anchor moves, so
|
|
10
|
+
nothing re-ran the check and an open popup stayed invisible until something else triggered a re-measure. While an open
|
|
11
|
+
floating element is marked `anchor-hidden` it is now re-measured every animation frame, and the polling stops as soon as the
|
|
12
|
+
anchor is visible again or the element closes. Runtime behaviour is otherwise unchanged.
|
|
13
|
+
|
|
3
14
|
## [3.2.0] - 2026-11-16
|
|
4
15
|
|
|
5
16
|
### Added
|
|
@@ -113,6 +113,7 @@ export declare class UFloatingElement extends UElement {
|
|
|
113
113
|
protected arrowEl?: HTMLElement;
|
|
114
114
|
private cleanup;
|
|
115
115
|
private trackSeq;
|
|
116
|
+
private hiddenFrame;
|
|
116
117
|
private showTimer?;
|
|
117
118
|
private hideTimer?;
|
|
118
119
|
/** `:state(parked)` 를 싣는다 — 닫힌 동안 레이아웃에서 빠진다(아래 `park()`). */
|
|
@@ -132,6 +133,8 @@ export declare class UFloatingElement extends UElement {
|
|
|
132
133
|
private parkWhenSettled;
|
|
133
134
|
/** 자동 위치 추적을 끊고, 계산 중인 track() 이 뒤늦게 추적을 걸지 못하게 한다. */
|
|
134
135
|
private untrack;
|
|
136
|
+
/** `anchor-hidden` 이 서 있는 동안 다음 프레임에 다시 잰다. 추적이 끊기거나 속성이 풀리면 멈춘다. */
|
|
137
|
+
private recheckWhileHidden;
|
|
135
138
|
/** 타겟 기준으로 위치를 계산하고, 스크롤·리사이즈를 따라 재배치하도록 추적을 건다. */
|
|
136
139
|
private track;
|
|
137
140
|
/**
|
|
@@ -32,6 +32,7 @@ var UFloatingElement = class extends UElement {
|
|
|
32
32
|
this.hideDelay = 0;
|
|
33
33
|
this.cleanup = null;
|
|
34
34
|
this.trackSeq = 0;
|
|
35
|
+
this.hiddenFrame = 0;
|
|
35
36
|
this.floatingInternals = typeof this.attachInternals === "function" ? this.attachInternals() : void 0;
|
|
36
37
|
this.parkSeq = 0;
|
|
37
38
|
}
|
|
@@ -104,11 +105,26 @@ var UFloatingElement = class extends UElement {
|
|
|
104
105
|
/** 자동 위치 추적을 끊고, 계산 중인 track() 이 뒤늦게 추적을 걸지 못하게 한다. */
|
|
105
106
|
untrack() {
|
|
106
107
|
this.trackSeq++;
|
|
108
|
+
if (this.hiddenFrame) {
|
|
109
|
+
cancelAnimationFrame(this.hiddenFrame);
|
|
110
|
+
this.hiddenFrame = 0;
|
|
111
|
+
}
|
|
107
112
|
if (this.cleanup !== null) {
|
|
108
113
|
this.cleanup();
|
|
109
114
|
this.cleanup = null;
|
|
110
115
|
}
|
|
111
116
|
}
|
|
117
|
+
/** `anchor-hidden` 이 서 있는 동안 다음 프레임에 다시 잰다. 추적이 끊기거나 속성이 풀리면 멈춘다. */
|
|
118
|
+
recheckWhileHidden(target) {
|
|
119
|
+
if (this.hiddenFrame) return;
|
|
120
|
+
const seq = this.trackSeq;
|
|
121
|
+
this.hiddenFrame = requestAnimationFrame(() => {
|
|
122
|
+
this.hiddenFrame = 0;
|
|
123
|
+
if (seq !== this.trackSeq || !this.hasAttribute("anchor-hidden")) return;
|
|
124
|
+
if (!this.open && !this.showTimer) return;
|
|
125
|
+
this.reposition(target);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
112
128
|
/** 타겟 기준으로 위치를 계산하고, 스크롤·리사이즈를 따라 재배치하도록 추적을 건다. */
|
|
113
129
|
async track(target) {
|
|
114
130
|
this.untrack();
|
|
@@ -248,7 +264,9 @@ var UFloatingElement = class extends UElement {
|
|
|
248
264
|
top: `${position.y}px`,
|
|
249
265
|
transformOrigin: config.transform
|
|
250
266
|
});
|
|
251
|
-
|
|
267
|
+
const anchorHidden = !!position.middlewareData.hide?.referenceHidden;
|
|
268
|
+
this.toggleAttribute("anchor-hidden", anchorHidden);
|
|
269
|
+
if (anchorHidden) this.recheckWhileHidden(target);
|
|
252
270
|
const arrowData = position.middlewareData.arrow;
|
|
253
271
|
if (!this.arrowEl || !arrowData) return;
|
|
254
272
|
Object.assign(this.arrowEl.style, {
|