@fluentui/priority-overflow 9.4.1 → 9.4.2
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 -2
- package/dist/index.d.cts +246 -0
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/overflowManager.js +4 -4
- package/lib/overflowManager.js.map +1 -1
- package/lib-commonjs/{index.js → index.cjs} +2 -2
- package/lib-commonjs/{overflowManager.js → overflowManager.cjs} +4 -4
- package/package.json +13 -7
- /package/lib-commonjs/{consts.js → consts.cjs} +0 -0
- /package/lib-commonjs/{consts.js.map → consts.cjs.map} +0 -0
- /package/lib-commonjs/{createResizeObserver.js → createResizeObserver.cjs} +0 -0
- /package/lib-commonjs/{createResizeObserver.js.map → createResizeObserver.cjs.map} +0 -0
- /package/lib-commonjs/{debounce.js → debounce.cjs} +0 -0
- /package/lib-commonjs/{debounce.js.map → debounce.cjs.map} +0 -0
- /package/lib-commonjs/{index.js.map → index.cjs.map} +0 -0
- /package/lib-commonjs/{overflowManager.js.map → overflowManager.cjs.map} +0 -0
- /package/lib-commonjs/{priorityQueue.js → priorityQueue.cjs} +0 -0
- /package/lib-commonjs/{priorityQueue.js.map → priorityQueue.cjs.map} +0 -0
- /package/lib-commonjs/{types.js → types.cjs} +0 -0
- /package/lib-commonjs/{types.js.map → types.cjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
# Change Log - @fluentui/priority-overflow
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Tue, 11 Aug 2026 17:16:03 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.4.2](https://github.com/microsoft/fluentui/tree/@fluentui/priority-overflow_v9.4.2)
|
|
8
|
+
|
|
9
|
+
Tue, 11 Aug 2026 17:16:03 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/priority-overflow_v9.4.1..@fluentui/priority-overflow_v9.4.2)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake. ([PR #36327](https://github.com/microsoft/fluentui/pull/36327) by martinhochel@microsoft.com)
|
|
15
|
+
|
|
7
16
|
## [9.4.1](https://github.com/microsoft/fluentui/tree/@fluentui/priority-overflow_v9.4.1)
|
|
8
17
|
|
|
9
|
-
Wed, 15 Jul 2026 14:10:
|
|
18
|
+
Wed, 15 Jul 2026 14:10:40 GMT
|
|
10
19
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/priority-overflow_v9.4.0..@fluentui/priority-overflow_v9.4.1)
|
|
11
20
|
|
|
12
21
|
### Patches
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates an overflow manager instance for a single container.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
* @param initialOptions - Initial observe options. Missing values are filled with defaults.
|
|
6
|
+
* @returns overflow manager instance
|
|
7
|
+
*/
|
|
8
|
+
export declare function createOverflowManager(initialOptions?: Partial<OverflowOptions>): OverflowManager;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* An empty, frozen overflow snapshot used as the default before anything has been measured.
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare const EMPTY_SNAPSHOT: OverflowSnapshot;
|
|
15
|
+
|
|
16
|
+
export declare interface ObserveOptions extends Partial<OverflowOptions> {
|
|
17
|
+
/**
|
|
18
|
+
* forces update when observation begins, ensuring initial overflow state is correct. This is useful when the container starts with items that should be overflowed, or when the container resizes immediately after mounting.
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
forceUpdate?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Callback invoked when a single item's visibility changes.
|
|
26
|
+
*/
|
|
27
|
+
export declare type OnUpdateItemVisibility = (data: OnUpdateItemVisibilityPayload) => void;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Payload for item-level visibility updates.
|
|
31
|
+
*/
|
|
32
|
+
export declare interface OnUpdateItemVisibilityPayload {
|
|
33
|
+
/**
|
|
34
|
+
* Item whose visibility changed.
|
|
35
|
+
*/
|
|
36
|
+
item: OverflowItemEntry;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the item is now visible.
|
|
39
|
+
*/
|
|
40
|
+
visible: boolean;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Signature similar to standard event listeners, typed for overflow updates.
|
|
45
|
+
*/
|
|
46
|
+
export declare type OnUpdateOverflow = (data: OverflowEventPayload) => void;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Axis used to measure overflow.
|
|
50
|
+
*/
|
|
51
|
+
export declare type OverflowAxis = 'horizontal' | 'vertical';
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Direction where items are removed when overflow occurs.
|
|
55
|
+
*/
|
|
56
|
+
export declare type OverflowDirection = 'start' | 'end';
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Tracked divider in the overflow manager.
|
|
60
|
+
*/
|
|
61
|
+
export declare interface OverflowDividerEntry {
|
|
62
|
+
/**
|
|
63
|
+
* HTML element that disappears when its group overflows.
|
|
64
|
+
*/
|
|
65
|
+
element: HTMLElement;
|
|
66
|
+
/**
|
|
67
|
+
* Id of the group controlled by this divider.
|
|
68
|
+
*/
|
|
69
|
+
groupId: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Payload of the custom DOM event for overflow updates
|
|
74
|
+
*/
|
|
75
|
+
export declare interface OverflowEventPayload {
|
|
76
|
+
/**
|
|
77
|
+
* Items currently visible in the container.
|
|
78
|
+
*/
|
|
79
|
+
visibleItems: OverflowItemEntry[];
|
|
80
|
+
/**
|
|
81
|
+
* Items currently moved to overflow.
|
|
82
|
+
*/
|
|
83
|
+
invisibleItems: OverflowItemEntry[];
|
|
84
|
+
/**
|
|
85
|
+
* Current visibility state by group id.
|
|
86
|
+
*/
|
|
87
|
+
groupVisibility: Record<string, OverflowGroupState>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Visibility state for an overflow group.
|
|
92
|
+
*/
|
|
93
|
+
export declare type OverflowGroupState = 'visible' | 'hidden' | 'overflow';
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Tracked item in the overflow manager.
|
|
97
|
+
*/
|
|
98
|
+
export declare interface OverflowItemEntry {
|
|
99
|
+
/**
|
|
100
|
+
* HTML element that disappears when the item overflows.
|
|
101
|
+
*/
|
|
102
|
+
element: HTMLElement;
|
|
103
|
+
/**
|
|
104
|
+
* Lower-priority items become invisible first when the container overflows.
|
|
105
|
+
* @default 0
|
|
106
|
+
*/
|
|
107
|
+
priority: number;
|
|
108
|
+
/**
|
|
109
|
+
* Stable item id used to track visibility and emit updates.
|
|
110
|
+
*/
|
|
111
|
+
id: string;
|
|
112
|
+
/**
|
|
113
|
+
* Optional group id used to coordinate divider and grouped visibility states.
|
|
114
|
+
*/
|
|
115
|
+
groupId?: string;
|
|
116
|
+
/**
|
|
117
|
+
* If true, the item will never overflow and will always be visible.
|
|
118
|
+
* Pinned items are excluded from the overflow count.
|
|
119
|
+
* @default false
|
|
120
|
+
*/
|
|
121
|
+
pinned?: boolean;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Internal manager contract used to observe and compute priority overflow.
|
|
126
|
+
*
|
|
127
|
+
* @internal
|
|
128
|
+
*/
|
|
129
|
+
export declare interface OverflowManager {
|
|
130
|
+
/**
|
|
131
|
+
* Starts observing the container and managing the overflow state
|
|
132
|
+
*/
|
|
133
|
+
observe: (container: HTMLElement, options?: ObserveOptions) => void;
|
|
134
|
+
/**
|
|
135
|
+
* Stops observing the container
|
|
136
|
+
*/
|
|
137
|
+
disconnect: () => void;
|
|
138
|
+
/**
|
|
139
|
+
* Updates engine options without restarting observation.
|
|
140
|
+
*/
|
|
141
|
+
setOptions: (options: Partial<OverflowOptions>) => void;
|
|
142
|
+
/**
|
|
143
|
+
* Add overflow items
|
|
144
|
+
*/
|
|
145
|
+
addItem: (items: OverflowItemEntry) => void;
|
|
146
|
+
/**
|
|
147
|
+
* Remove overflow item
|
|
148
|
+
*/
|
|
149
|
+
removeItem: (itemId: string) => void;
|
|
150
|
+
/**
|
|
151
|
+
* Manually update the overflow, updates are batched and async
|
|
152
|
+
*/
|
|
153
|
+
update: () => void;
|
|
154
|
+
/**
|
|
155
|
+
* Manually update the overflow sync
|
|
156
|
+
*/
|
|
157
|
+
forceUpdate: () => void;
|
|
158
|
+
/**
|
|
159
|
+
* Adds an element that opens an overflow menu. This is used to calculate
|
|
160
|
+
* available space and check if additional items need to overflow
|
|
161
|
+
*/
|
|
162
|
+
addOverflowMenu: (element: HTMLElement) => void;
|
|
163
|
+
/**
|
|
164
|
+
* Add overflow divider
|
|
165
|
+
*/
|
|
166
|
+
addDivider: (divider: OverflowDividerEntry) => void;
|
|
167
|
+
/**
|
|
168
|
+
* Remove overflow divider
|
|
169
|
+
*/
|
|
170
|
+
removeDivider: (groupId: string) => void;
|
|
171
|
+
/**
|
|
172
|
+
* Unsets the overflow menu element
|
|
173
|
+
*/
|
|
174
|
+
removeOverflowMenu: () => void;
|
|
175
|
+
/**
|
|
176
|
+
* Returns the current overflow snapshot.
|
|
177
|
+
*/
|
|
178
|
+
getSnapshot: () => OverflowSnapshot;
|
|
179
|
+
/**
|
|
180
|
+
* Subscribes to snapshot changes.
|
|
181
|
+
*/
|
|
182
|
+
subscribe: (listener: () => void) => () => void;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Options used to initialize or reconfigure overflow observation.
|
|
187
|
+
*/
|
|
188
|
+
export declare interface OverflowOptions {
|
|
189
|
+
/**
|
|
190
|
+
* Padding in pixels reserved at the end of the container before overflow occurs.
|
|
191
|
+
* Useful for accounting for extra elements (for example an overflow menu button)
|
|
192
|
+
* or margins between items that are difficult to measure in JavaScript.
|
|
193
|
+
* @default 10
|
|
194
|
+
*/
|
|
195
|
+
padding?: number;
|
|
196
|
+
/**
|
|
197
|
+
* Direction where items are removed when overflow occurs.
|
|
198
|
+
* @default end
|
|
199
|
+
*/
|
|
200
|
+
overflowDirection?: OverflowDirection;
|
|
201
|
+
/**
|
|
202
|
+
* Overflow axis used for size measurement.
|
|
203
|
+
* @default horizontal
|
|
204
|
+
*/
|
|
205
|
+
overflowAxis?: OverflowAxis;
|
|
206
|
+
/**
|
|
207
|
+
* Minimum number of items that must remain visible.
|
|
208
|
+
*/
|
|
209
|
+
minimumVisible?: number;
|
|
210
|
+
/**
|
|
211
|
+
* Callback invoked when an individual item's visibility changes.
|
|
212
|
+
*/
|
|
213
|
+
onUpdateItemVisibility: OnUpdateItemVisibility;
|
|
214
|
+
/**
|
|
215
|
+
* Callback invoked after overflow state is recomputed.
|
|
216
|
+
*/
|
|
217
|
+
onUpdateOverflow: OnUpdateOverflow;
|
|
218
|
+
/**
|
|
219
|
+
* When true, reserve space as if the overflow menu were visible even with no overflowing items.
|
|
220
|
+
* @default false
|
|
221
|
+
*/
|
|
222
|
+
hasHiddenItems?: boolean;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Indexed, immutable overflow state returned by `OverflowManager.getSnapshot`.
|
|
227
|
+
*
|
|
228
|
+
* Unlike {@link OverflowEventPayload}, this is shaped for O(1) consumer lookups (item/group
|
|
229
|
+
* visibility by id, item count) rather than ordered item entries.
|
|
230
|
+
*/
|
|
231
|
+
export declare interface OverflowSnapshot {
|
|
232
|
+
/**
|
|
233
|
+
* Visibility of each registered item, keyed by item id.
|
|
234
|
+
*/
|
|
235
|
+
itemVisibility: Record<string, boolean>;
|
|
236
|
+
/**
|
|
237
|
+
* Current visibility state by group id.
|
|
238
|
+
*/
|
|
239
|
+
groupVisibility: Record<string, OverflowGroupState>;
|
|
240
|
+
/**
|
|
241
|
+
* Number of items currently moved to overflow (invisible).
|
|
242
|
+
*/
|
|
243
|
+
invisibleItemCount: number;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export { }
|
package/lib/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createOverflowManager } from
|
|
2
|
-
export { EMPTY_SNAPSHOT } from
|
|
1
|
+
export { createOverflowManager } from "./overflowManager.js";
|
|
2
|
+
export { EMPTY_SNAPSHOT } from "./consts.js";
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { createOverflowManager } from './overflowManager';\nexport { EMPTY_SNAPSHOT } from './consts';\nexport type {\n ObserveOptions,\n OverflowOptions,\n OnUpdateItemVisibility,\n OnUpdateItemVisibilityPayload,\n OnUpdateOverflow,\n OverflowAxis,\n OverflowDirection,\n OverflowEventPayload,\n OverflowGroupState,\n OverflowItemEntry,\n OverflowDividerEntry,\n OverflowManager,\n OverflowSnapshot,\n} from './types';\n"],"names":["createOverflowManager","EMPTY_SNAPSHOT"],"mappings":"AAAA,SAASA,qBAAqB,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { createOverflowManager } from './overflowManager';\nexport { EMPTY_SNAPSHOT } from './consts';\nexport type {\n ObserveOptions,\n OverflowOptions,\n OnUpdateItemVisibility,\n OnUpdateItemVisibilityPayload,\n OnUpdateOverflow,\n OverflowAxis,\n OverflowDirection,\n OverflowEventPayload,\n OverflowGroupState,\n OverflowItemEntry,\n OverflowDividerEntry,\n OverflowManager,\n OverflowSnapshot,\n} from './types';\n"],"names":["createOverflowManager","EMPTY_SNAPSHOT"],"mappings":"AAAA,SAASA,qBAAqB,QAAQ,uBAAoB;AAC1D,SAASC,cAAc,QAAQ,cAAW"}
|
package/lib/overflowManager.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DATA_OVERFLOWING, DATA_OVERFLOW_GROUP, EMPTY_SNAPSHOT } from
|
|
2
|
-
import { observeResize } from
|
|
3
|
-
import { debounce } from
|
|
4
|
-
import { createPriorityQueue } from
|
|
1
|
+
import { DATA_OVERFLOWING, DATA_OVERFLOW_GROUP, EMPTY_SNAPSHOT } from "./consts.js";
|
|
2
|
+
import { observeResize } from "./createResizeObserver.js";
|
|
3
|
+
import { debounce } from "./debounce.js";
|
|
4
|
+
import { createPriorityQueue } from "./priorityQueue.js";
|
|
5
5
|
const DEFAULT_OPTIONS = {
|
|
6
6
|
overflowAxis: 'horizontal',
|
|
7
7
|
overflowDirection: 'end',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/overflowManager.ts"],"sourcesContent":["import { DATA_OVERFLOWING, DATA_OVERFLOW_GROUP, EMPTY_SNAPSHOT } from './consts';\nimport { observeResize } from './createResizeObserver';\nimport { debounce } from './debounce';\nimport type { PriorityQueue } from './priorityQueue';\nimport { createPriorityQueue } from './priorityQueue';\nimport type {\n OverflowGroupState,\n OverflowItemEntry,\n OverflowManager,\n OverflowOptions,\n OverflowDividerEntry,\n OverflowSnapshot,\n} from './types';\n\nconst DEFAULT_OPTIONS: Required<OverflowOptions> = {\n overflowAxis: 'horizontal',\n overflowDirection: 'end',\n padding: 10,\n minimumVisible: 0,\n hasHiddenItems: false,\n onUpdateItemVisibility: () => {\n /* noop */\n },\n onUpdateOverflow: () => {\n /* noop */\n },\n};\n\n/**\n * Creates an overflow manager instance for a single container.\n *\n * @internal\n * @param initialOptions - Initial observe options. Missing values are filled with defaults.\n * @returns overflow manager instance\n */\nexport function createOverflowManager(initialOptions: Partial<OverflowOptions> = {}): OverflowManager {\n // calls to `offsetWidth or offsetHeight` can happen multiple times in an update\n // Use a cache to avoid causing too many recalcs and avoid scripting time to meausure sizes\n const sizeCache = new Map<HTMLElement, number>();\n let container: HTMLElement | undefined;\n let overflowMenu: HTMLElement | undefined;\n // Set as true when resize observer is observing\n let observing = false;\n // If true, next update will dispatch to onUpdateOverflow even if queue top states don't change\n // Initially true to force dispatch on first mount\n let forceDispatch = true;\n const options: Required<OverflowOptions> = { ...DEFAULT_OPTIONS, ...initialOptions };\n const overflowItems: Record<string, OverflowItemEntry> = {};\n const overflowDividers: Record<string, OverflowDividerEntry> = {};\n const listeners = new Set<() => void>();\n let disposeResizeObserver: () => void = () => {\n /* noop */\n };\n\n let snapshot: OverflowSnapshot = EMPTY_SNAPSHOT;\n const takeSnapshot = (nextSnapshot: OverflowSnapshot) => {\n snapshot = nextSnapshot;\n listeners.forEach(listener => listener());\n };\n\n const getNextItem = (queueToDequeue: PriorityQueue<string>, queueToEnqueue: PriorityQueue<string>) => {\n const nextItem = queueToDequeue.dequeue();\n queueToEnqueue.enqueue(nextItem);\n return overflowItems[nextItem];\n };\n\n const groupManager = createGroupManager();\n\n function compareItems(lt: string | null, rt: string | null): number {\n if (!lt || !rt) {\n return 0;\n }\n\n const lte = overflowItems[lt];\n const rte = overflowItems[rt];\n\n // TODO this should not happen but there have been reports of one of these items being undefined\n // Try to find a consistent repro for this\n if (!lte || !rte) {\n return lte ? 1 : -1;\n }\n\n // Pinned items have \"infinite\" priority - they should never be hidden\n if (lte.pinned !== rte.pinned) {\n return lte.pinned ? 1 : -1;\n }\n\n if (lte.priority !== rte.priority) {\n return lte.priority > rte.priority ? 1 : -1;\n }\n\n // Node.DOCUMENT_POSITION_FOLLOWING = 4, Node.DOCUMENT_POSITION_PRECEDING = 2\n const positionStatusBit = options.overflowDirection === 'end' ? 4 : 2;\n\n // eslint-disable-next-line no-bitwise\n return lte.element.compareDocumentPosition(rte.element) & positionStatusBit ? 1 : -1;\n }\n\n function getElementAxisSize(\n horizontal: 'clientWidth' | 'offsetWidth',\n vertical: 'clientHeight' | 'offsetHeight',\n el: HTMLElement,\n ): number {\n if (!sizeCache.has(el)) {\n sizeCache.set(el, options.overflowAxis === 'horizontal' ? el[horizontal] : el[vertical]);\n }\n\n return sizeCache.get(el)!;\n }\n\n const getOffsetSize = getElementAxisSize.bind(null, 'offsetWidth', 'offsetHeight');\n const getClientSize = getElementAxisSize.bind(null, 'clientWidth', 'clientHeight');\n\n const invisibleItemQueue = createPriorityQueue<string>((a, b) => -1 * compareItems(a, b));\n\n const visibleItemQueue = createPriorityQueue<string>(compareItems);\n\n function occupiedSize(): number {\n let totalItemSize = 0;\n for (const id of visibleItemQueue) {\n totalItemSize += getOffsetSize(overflowItems[id].element);\n }\n\n const totalDividerSize = Object.entries(groupManager.groupVisibility()).reduce(\n (acc, [id, state]) =>\n acc + (state !== 'hidden' && overflowDividers[id] ? getOffsetSize(overflowDividers[id].element) : 0),\n 0,\n );\n\n const overflowMenuSize =\n (invisibleItemQueue.size() > 0 || options.hasHiddenItems) && overflowMenu ? getOffsetSize(overflowMenu) : 0;\n\n return totalItemSize + totalDividerSize + overflowMenuSize;\n }\n\n const showItem = () => {\n const item = getNextItem(invisibleItemQueue, visibleItemQueue);\n options.onUpdateItemVisibility({ item, visible: true });\n\n if (item.groupId) {\n groupManager.showItem(item.id, item.groupId);\n\n if (groupManager.isSingleItemVisible(item.id, item.groupId)) {\n overflowDividers[item.groupId]?.element.removeAttribute(DATA_OVERFLOWING);\n }\n }\n };\n\n const hideItem = () => {\n const item = getNextItem(visibleItemQueue, invisibleItemQueue);\n options.onUpdateItemVisibility({ item, visible: false });\n\n if (item.groupId) {\n if (groupManager.isSingleItemVisible(item.id, item.groupId)) {\n overflowDividers[item.groupId]?.element.setAttribute(DATA_OVERFLOWING, '');\n }\n\n groupManager.hideItem(item.id, item.groupId);\n }\n };\n\n const dispatchOverflowUpdate = () => {\n const groupVisibility = groupManager.groupVisibility();\n\n // Build the legacy ordered-entry arrays and the snapshot's id -> visible map in a single pass\n // over each queue.\n const itemVisibility: Record<string, boolean> = {};\n const visibleItems: OverflowItemEntry[] = [];\n const invisibleItems: OverflowItemEntry[] = [];\n\n for (const itemId of visibleItemQueue) {\n itemVisibility[itemId] = true;\n visibleItems.push(overflowItems[itemId]);\n }\n for (const itemId of invisibleItemQueue) {\n itemVisibility[itemId] = false;\n invisibleItems.push(overflowItems[itemId]);\n }\n\n // Set the snapshot first so `getSnapshot()` is current for both subscribers and any\n // `onUpdateOverflow` consumer that reads it.\n takeSnapshot({\n itemVisibility,\n groupVisibility,\n invisibleItemCount: invisibleItems.length,\n });\n\n // Legacy event payload: ordered item entries for `onUpdateOverflow` consumers.\n options.onUpdateOverflow({ visibleItems, invisibleItems, groupVisibility });\n };\n\n const getSnapshot: OverflowManager['getSnapshot'] = () => snapshot;\n\n const processOverflowItems = (): boolean => {\n if (!container) {\n return false;\n }\n sizeCache.clear();\n\n const availableSize = getClientSize(container) - options.padding;\n\n // Snapshot of the visible/invisible state to compare for updates\n const visibleTop = visibleItemQueue.peek();\n const invisibleTop = invisibleItemQueue.peek();\n\n while (compareItems(invisibleItemQueue.peek(), visibleItemQueue.peek()) > 0) {\n hideItem(); // hide elements whose priority become smaller than the highest priority of the hidden one\n }\n\n // Run the show/hide step twice - the first step might not be correct if\n // it was triggered by a new item being added - new items are always visible by default.\n for (let i = 0; i < 2; i++) {\n // Add items until available width is filled - can result in overflow\n while (\n (occupiedSize() < availableSize && invisibleItemQueue.size() > 0) ||\n invisibleItemQueue.size() === 1 // attempt to show the last invisible item hoping it's size does not exceed overflow menu size\n ) {\n showItem();\n }\n\n // Remove items until there's no more overflow\n while (occupiedSize() > availableSize && visibleItemQueue.size() > options.minimumVisible) {\n const nextItemId = visibleItemQueue.peek();\n\n // Never hide pinned items - they should always remain visible\n if (nextItemId && overflowItems[nextItemId]?.pinned) {\n break;\n }\n\n hideItem();\n }\n }\n\n // only update when the state of visible/invisible items has changed\n return visibleItemQueue.peek() !== visibleTop || invisibleItemQueue.peek() !== invisibleTop;\n };\n\n const forceUpdate: OverflowManager['forceUpdate'] = () => {\n if (processOverflowItems() || forceDispatch) {\n forceDispatch = false;\n dispatchOverflowUpdate();\n }\n };\n\n const update: OverflowManager['update'] = debounce(forceUpdate);\n\n const setOptions: OverflowManager['setOptions'] = nextOptions => {\n if (options === nextOptions) {\n return;\n }\n\n const shouldTriggerUpdate =\n (nextOptions.overflowAxis && options.overflowAxis !== nextOptions.overflowAxis) ||\n (nextOptions.overflowDirection && options.overflowDirection !== nextOptions.overflowDirection) ||\n (nextOptions.padding && options.padding !== nextOptions.padding) ||\n (nextOptions.minimumVisible && options.minimumVisible !== nextOptions.minimumVisible) ||\n (nextOptions.hasHiddenItems && options.hasHiddenItems !== nextOptions.hasHiddenItems);\n\n Object.assign(options, nextOptions);\n\n if (shouldTriggerUpdate) {\n forceDispatch = true;\n update();\n }\n };\n\n const observe: OverflowManager['observe'] = (observedContainer, observeOptions) => {\n const { forceUpdate: shouldForceUpdate, ...userOptions } = observeOptions ?? {};\n Object.assign(options, userOptions);\n\n Object.values(overflowItems).forEach(item => {\n if (!visibleItemQueue.contains(item.id) && !invisibleItemQueue.contains(item.id)) {\n visibleItemQueue.enqueue(item.id);\n }\n });\n\n container = observedContainer;\n observing = true;\n disposeResizeObserver = observeResize(container, entries => {\n if (!entries[0] || !container) {\n return;\n }\n update();\n });\n\n if (shouldForceUpdate && getClientSize(observedContainer) > 0) {\n forceUpdate();\n }\n };\n\n const disconnect: OverflowManager['disconnect'] = () => {\n disposeResizeObserver();\n disposeResizeObserver = () => {\n /* noop */\n };\n\n // reset flags\n container = undefined;\n observing = false;\n forceDispatch = true;\n\n // clear all entries\n Object.keys(overflowItems).forEach(itemId => removeItem(itemId));\n Object.keys(overflowDividers).forEach(dividerId => removeDivider(dividerId));\n removeOverflowMenu();\n sizeCache.clear();\n\n // Reset the snapshot during teardown, but do not broadcast a final update.\n // Consumers unsubscribe as part of unmount, and a disconnect-time notification can race\n // those cleanups and dispatch into already-unmounting React listeners.\n snapshot = EMPTY_SNAPSHOT;\n };\n\n const addItem: OverflowManager['addItem'] = items => {\n if (overflowItems[items.id]) {\n return;\n }\n\n overflowItems[items.id] = items;\n\n // some options can affect priority which are only set on `observe`\n if (observing) {\n // Updates to elements might not change the queue tops\n // i.e. new element is enqueued but the top of the queue stays the same\n // force a dispatch on the next batched update\n forceDispatch = true;\n visibleItemQueue.enqueue(items.id);\n update();\n }\n\n if (items.groupId) {\n groupManager.addItem(items.id, items.groupId);\n items.element.setAttribute(DATA_OVERFLOW_GROUP, items.groupId);\n }\n };\n\n const addOverflowMenu: OverflowManager['addOverflowMenu'] = el => {\n overflowMenu = el;\n\n if (observing) {\n forceDispatch = true;\n update();\n }\n };\n\n const addDivider: OverflowManager['addDivider'] = divider => {\n if (!divider.groupId || overflowDividers[divider.groupId]) {\n return;\n }\n\n divider.element.setAttribute(DATA_OVERFLOW_GROUP, divider.groupId);\n overflowDividers[divider.groupId] = divider;\n };\n\n const removeOverflowMenu: OverflowManager['removeOverflowMenu'] = () => {\n overflowMenu = undefined;\n\n if (observing) {\n forceDispatch = true;\n update();\n }\n };\n\n const removeDivider: OverflowManager['removeDivider'] = groupId => {\n if (!overflowDividers[groupId]) {\n return;\n }\n const divider = overflowDividers[groupId];\n if (divider.groupId) {\n delete overflowDividers[groupId];\n divider.element.removeAttribute(DATA_OVERFLOW_GROUP);\n }\n };\n\n const removeItem: OverflowManager['removeItem'] = itemId => {\n if (!overflowItems[itemId]) {\n return;\n }\n\n if (observing) {\n // We might be removing an item in an overflow which would not affect the tops,\n // but we need to update anyway to update the overflow menu state\n forceDispatch = true;\n }\n\n const item = overflowItems[itemId];\n visibleItemQueue.remove(itemId);\n invisibleItemQueue.remove(itemId);\n\n if (item.groupId) {\n groupManager.removeItem(item.id, item.groupId);\n item.element.removeAttribute(DATA_OVERFLOW_GROUP);\n }\n\n sizeCache.delete(item.element);\n delete overflowItems[itemId];\n if (observing) {\n update();\n }\n };\n\n const subscribe: OverflowManager['subscribe'] = listener => {\n listeners.add(listener);\n\n return () => {\n listeners.delete(listener);\n };\n };\n\n return {\n addItem,\n disconnect,\n forceUpdate,\n observe,\n removeItem,\n update,\n addOverflowMenu,\n removeOverflowMenu,\n addDivider,\n removeDivider,\n setOptions,\n getSnapshot,\n subscribe,\n };\n}\n\nconst createGroupManager = () => {\n const groupVisibility: Record<string, OverflowGroupState> = {};\n const groups: Record<string, { visibleItemIds: Set<string>; invisibleItemIds: Set<string> }> = {};\n function updateGroupVisibility(groupId: string) {\n const group = groups[groupId];\n if (group.invisibleItemIds.size && group.visibleItemIds.size) {\n groupVisibility[groupId] = 'overflow';\n } else if (group.visibleItemIds.size === 0) {\n groupVisibility[groupId] = 'hidden';\n } else {\n groupVisibility[groupId] = 'visible';\n }\n }\n function isGroupVisible(groupId: string) {\n return groupVisibility[groupId] === 'visible' || groupVisibility[groupId] === 'overflow';\n }\n return {\n groupVisibility: () => groupVisibility,\n isSingleItemVisible(itemId: string, groupId: string) {\n return (\n isGroupVisible(groupId) &&\n groups[groupId].visibleItemIds.has(itemId) &&\n groups[groupId].visibleItemIds.size === 1\n );\n },\n addItem(itemId: string, groupId: string) {\n groups[groupId] ??= {\n visibleItemIds: new Set<string>(),\n invisibleItemIds: new Set<string>(),\n };\n\n groups[groupId].visibleItemIds.add(itemId);\n updateGroupVisibility(groupId);\n },\n removeItem(itemId: string, groupId: string) {\n groups[groupId].invisibleItemIds.delete(itemId);\n groups[groupId].visibleItemIds.delete(itemId);\n updateGroupVisibility(groupId);\n },\n showItem(itemId: string, groupId: string) {\n groups[groupId].invisibleItemIds.delete(itemId);\n groups[groupId].visibleItemIds.add(itemId);\n updateGroupVisibility(groupId);\n },\n hideItem(itemId: string, groupId: string) {\n groups[groupId].invisibleItemIds.add(itemId);\n groups[groupId].visibleItemIds.delete(itemId);\n updateGroupVisibility(groupId);\n },\n };\n};\n"],"names":["DATA_OVERFLOWING","DATA_OVERFLOW_GROUP","EMPTY_SNAPSHOT","observeResize","debounce","createPriorityQueue","DEFAULT_OPTIONS","overflowAxis","overflowDirection","padding","minimumVisible","hasHiddenItems","onUpdateItemVisibility","onUpdateOverflow","createOverflowManager","initialOptions","sizeCache","Map","container","overflowMenu","observing","forceDispatch","options","overflowItems","overflowDividers","listeners","Set","disposeResizeObserver","snapshot","takeSnapshot","nextSnapshot","forEach","listener","getNextItem","queueToDequeue","queueToEnqueue","nextItem","dequeue","enqueue","groupManager","createGroupManager","compareItems","lt","rt","lte","rte","pinned","priority","positionStatusBit","element","compareDocumentPosition","getElementAxisSize","horizontal","vertical","el","has","set","get","getOffsetSize","bind","getClientSize","invisibleItemQueue","a","b","visibleItemQueue","occupiedSize","totalItemSize","id","totalDividerSize","Object","entries","groupVisibility","reduce","acc","state","overflowMenuSize","size","showItem","item","visible","groupId","isSingleItemVisible","removeAttribute","hideItem","setAttribute","dispatchOverflowUpdate","itemVisibility","visibleItems","invisibleItems","itemId","push","invisibleItemCount","length","getSnapshot","processOverflowItems","clear","availableSize","visibleTop","peek","invisibleTop","i","nextItemId","forceUpdate","update","setOptions","nextOptions","shouldTriggerUpdate","assign","observe","observedContainer","observeOptions","shouldForceUpdate","userOptions","values","contains","disconnect","undefined","keys","removeItem","dividerId","removeDivider","removeOverflowMenu","addItem","items","addOverflowMenu","addDivider","divider","remove","delete","subscribe","add","groups","updateGroupVisibility","group","invisibleItemIds","visibleItemIds","isGroupVisible"],"mappings":"AAAA,SAASA,gBAAgB,EAAEC,mBAAmB,EAAEC,cAAc,QAAQ,WAAW;AACjF,SAASC,aAAa,QAAQ,yBAAyB;AACvD,SAASC,QAAQ,QAAQ,aAAa;AAEtC,SAASC,mBAAmB,QAAQ,kBAAkB;AAUtD,MAAMC,kBAA6C;IACjDC,cAAc;IACdC,mBAAmB;IACnBC,SAAS;IACTC,gBAAgB;IAChBC,gBAAgB;IAChBC,wBAAwB;IACtB,QAAQ,GACV;IACAC,kBAAkB;IAChB,QAAQ,GACV;AACF;AAEA;;;;;;C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,MAAM,CAACnD,QAAQ,CAACsD,gBAAgB,CAACJ,GAAG,CAACzC;YACrC0C,MAAM,CAACnD,QAAQ,CAACuD,cAAc,CAACP,MAAM,CAACvC;YACtC2C,sBAAsBpD;QACxB;IACF;AACF"}
|
|
1
|
+
{"version":3,"sources":["../src/overflowManager.ts"],"sourcesContent":["import { DATA_OVERFLOWING, DATA_OVERFLOW_GROUP, EMPTY_SNAPSHOT } from './consts';\nimport { observeResize } from './createResizeObserver';\nimport { debounce } from './debounce';\nimport type { PriorityQueue } from './priorityQueue';\nimport { createPriorityQueue } from './priorityQueue';\nimport type {\n OverflowGroupState,\n OverflowItemEntry,\n OverflowManager,\n OverflowOptions,\n OverflowDividerEntry,\n OverflowSnapshot,\n} from './types';\n\nconst DEFAULT_OPTIONS: Required<OverflowOptions> = {\n overflowAxis: 'horizontal',\n overflowDirection: 'end',\n padding: 10,\n minimumVisible: 0,\n hasHiddenItems: false,\n onUpdateItemVisibility: () => {\n /* noop */\n },\n onUpdateOverflow: () => {\n /* noop */\n },\n};\n\n/**\n * Creates an overflow manager instance for a single container.\n *\n * @internal\n * @param initialOptions - Initial observe options. Missing values are filled with defaults.\n * @returns overflow manager instance\n */\nexport function createOverflowManager(initialOptions: Partial<OverflowOptions> = {}): OverflowManager {\n // calls to `offsetWidth or offsetHeight` can happen multiple times in an update\n // Use a cache to avoid causing too many recalcs and avoid scripting time to meausure sizes\n const sizeCache = new Map<HTMLElement, number>();\n let container: HTMLElement | undefined;\n let overflowMenu: HTMLElement | undefined;\n // Set as true when resize observer is observing\n let observing = false;\n // If true, next update will dispatch to onUpdateOverflow even if queue top states don't change\n // Initially true to force dispatch on first mount\n let forceDispatch = true;\n const options: Required<OverflowOptions> = { ...DEFAULT_OPTIONS, ...initialOptions };\n const overflowItems: Record<string, OverflowItemEntry> = {};\n const overflowDividers: Record<string, OverflowDividerEntry> = {};\n const listeners = new Set<() => void>();\n let disposeResizeObserver: () => void = () => {\n /* noop */\n };\n\n let snapshot: OverflowSnapshot = EMPTY_SNAPSHOT;\n const takeSnapshot = (nextSnapshot: OverflowSnapshot) => {\n snapshot = nextSnapshot;\n listeners.forEach(listener => listener());\n };\n\n const getNextItem = (queueToDequeue: PriorityQueue<string>, queueToEnqueue: PriorityQueue<string>) => {\n const nextItem = queueToDequeue.dequeue();\n queueToEnqueue.enqueue(nextItem);\n return overflowItems[nextItem];\n };\n\n const groupManager = createGroupManager();\n\n function compareItems(lt: string | null, rt: string | null): number {\n if (!lt || !rt) {\n return 0;\n }\n\n const lte = overflowItems[lt];\n const rte = overflowItems[rt];\n\n // TODO this should not happen but there have been reports of one of these items being undefined\n // Try to find a consistent repro for this\n if (!lte || !rte) {\n return lte ? 1 : -1;\n }\n\n // Pinned items have \"infinite\" priority - they should never be hidden\n if (lte.pinned !== rte.pinned) {\n return lte.pinned ? 1 : -1;\n }\n\n if (lte.priority !== rte.priority) {\n return lte.priority > rte.priority ? 1 : -1;\n }\n\n // Node.DOCUMENT_POSITION_FOLLOWING = 4, Node.DOCUMENT_POSITION_PRECEDING = 2\n const positionStatusBit = options.overflowDirection === 'end' ? 4 : 2;\n\n // eslint-disable-next-line no-bitwise\n return lte.element.compareDocumentPosition(rte.element) & positionStatusBit ? 1 : -1;\n }\n\n function getElementAxisSize(\n horizontal: 'clientWidth' | 'offsetWidth',\n vertical: 'clientHeight' | 'offsetHeight',\n el: HTMLElement,\n ): number {\n if (!sizeCache.has(el)) {\n sizeCache.set(el, options.overflowAxis === 'horizontal' ? el[horizontal] : el[vertical]);\n }\n\n return sizeCache.get(el)!;\n }\n\n const getOffsetSize = getElementAxisSize.bind(null, 'offsetWidth', 'offsetHeight');\n const getClientSize = getElementAxisSize.bind(null, 'clientWidth', 'clientHeight');\n\n const invisibleItemQueue = createPriorityQueue<string>((a, b) => -1 * compareItems(a, b));\n\n const visibleItemQueue = createPriorityQueue<string>(compareItems);\n\n function occupiedSize(): number {\n let totalItemSize = 0;\n for (const id of visibleItemQueue) {\n totalItemSize += getOffsetSize(overflowItems[id].element);\n }\n\n const totalDividerSize = Object.entries(groupManager.groupVisibility()).reduce(\n (acc, [id, state]) =>\n acc + (state !== 'hidden' && overflowDividers[id] ? getOffsetSize(overflowDividers[id].element) : 0),\n 0,\n );\n\n const overflowMenuSize =\n (invisibleItemQueue.size() > 0 || options.hasHiddenItems) && overflowMenu ? getOffsetSize(overflowMenu) : 0;\n\n return totalItemSize + totalDividerSize + overflowMenuSize;\n }\n\n const showItem = () => {\n const item = getNextItem(invisibleItemQueue, visibleItemQueue);\n options.onUpdateItemVisibility({ item, visible: true });\n\n if (item.groupId) {\n groupManager.showItem(item.id, item.groupId);\n\n if (groupManager.isSingleItemVisible(item.id, item.groupId)) {\n overflowDividers[item.groupId]?.element.removeAttribute(DATA_OVERFLOWING);\n }\n }\n };\n\n const hideItem = () => {\n const item = getNextItem(visibleItemQueue, invisibleItemQueue);\n options.onUpdateItemVisibility({ item, visible: false });\n\n if (item.groupId) {\n if (groupManager.isSingleItemVisible(item.id, item.groupId)) {\n overflowDividers[item.groupId]?.element.setAttribute(DATA_OVERFLOWING, '');\n }\n\n groupManager.hideItem(item.id, item.groupId);\n }\n };\n\n const dispatchOverflowUpdate = () => {\n const groupVisibility = groupManager.groupVisibility();\n\n // Build the legacy ordered-entry arrays and the snapshot's id -> visible map in a single pass\n // over each queue.\n const itemVisibility: Record<string, boolean> = {};\n const visibleItems: OverflowItemEntry[] = [];\n const invisibleItems: OverflowItemEntry[] = [];\n\n for (const itemId of visibleItemQueue) {\n itemVisibility[itemId] = true;\n visibleItems.push(overflowItems[itemId]);\n }\n for (const itemId of invisibleItemQueue) {\n itemVisibility[itemId] = false;\n invisibleItems.push(overflowItems[itemId]);\n }\n\n // Set the snapshot first so `getSnapshot()` is current for both subscribers and any\n // `onUpdateOverflow` consumer that reads it.\n takeSnapshot({\n itemVisibility,\n groupVisibility,\n invisibleItemCount: invisibleItems.length,\n });\n\n // Legacy event payload: ordered item entries for `onUpdateOverflow` consumers.\n options.onUpdateOverflow({ visibleItems, invisibleItems, groupVisibility });\n };\n\n const getSnapshot: OverflowManager['getSnapshot'] = () => snapshot;\n\n const processOverflowItems = (): boolean => {\n if (!container) {\n return false;\n }\n sizeCache.clear();\n\n const availableSize = getClientSize(container) - options.padding;\n\n // Snapshot of the visible/invisible state to compare for updates\n const visibleTop = visibleItemQueue.peek();\n const invisibleTop = invisibleItemQueue.peek();\n\n while (compareItems(invisibleItemQueue.peek(), visibleItemQueue.peek()) > 0) {\n hideItem(); // hide elements whose priority become smaller than the highest priority of the hidden one\n }\n\n // Run the show/hide step twice - the first step might not be correct if\n // it was triggered by a new item being added - new items are always visible by default.\n for (let i = 0; i < 2; i++) {\n // Add items until available width is filled - can result in overflow\n while (\n (occupiedSize() < availableSize && invisibleItemQueue.size() > 0) ||\n invisibleItemQueue.size() === 1 // attempt to show the last invisible item hoping it's size does not exceed overflow menu size\n ) {\n showItem();\n }\n\n // Remove items until there's no more overflow\n while (occupiedSize() > availableSize && visibleItemQueue.size() > options.minimumVisible) {\n const nextItemId = visibleItemQueue.peek();\n\n // Never hide pinned items - they should always remain visible\n if (nextItemId && overflowItems[nextItemId]?.pinned) {\n break;\n }\n\n hideItem();\n }\n }\n\n // only update when the state of visible/invisible items has changed\n return visibleItemQueue.peek() !== visibleTop || invisibleItemQueue.peek() !== invisibleTop;\n };\n\n const forceUpdate: OverflowManager['forceUpdate'] = () => {\n if (processOverflowItems() || forceDispatch) {\n forceDispatch = false;\n dispatchOverflowUpdate();\n }\n };\n\n const update: OverflowManager['update'] = debounce(forceUpdate);\n\n const setOptions: OverflowManager['setOptions'] = nextOptions => {\n if (options === nextOptions) {\n return;\n }\n\n const shouldTriggerUpdate =\n (nextOptions.overflowAxis && options.overflowAxis !== nextOptions.overflowAxis) ||\n (nextOptions.overflowDirection && options.overflowDirection !== nextOptions.overflowDirection) ||\n (nextOptions.padding && options.padding !== nextOptions.padding) ||\n (nextOptions.minimumVisible && options.minimumVisible !== nextOptions.minimumVisible) ||\n (nextOptions.hasHiddenItems && options.hasHiddenItems !== nextOptions.hasHiddenItems);\n\n Object.assign(options, nextOptions);\n\n if (shouldTriggerUpdate) {\n forceDispatch = true;\n update();\n }\n };\n\n const observe: OverflowManager['observe'] = (observedContainer, observeOptions) => {\n const { forceUpdate: shouldForceUpdate, ...userOptions } = observeOptions ?? {};\n Object.assign(options, userOptions);\n\n Object.values(overflowItems).forEach(item => {\n if (!visibleItemQueue.contains(item.id) && !invisibleItemQueue.contains(item.id)) {\n visibleItemQueue.enqueue(item.id);\n }\n });\n\n container = observedContainer;\n observing = true;\n disposeResizeObserver = observeResize(container, entries => {\n if (!entries[0] || !container) {\n return;\n }\n update();\n });\n\n if (shouldForceUpdate && getClientSize(observedContainer) > 0) {\n forceUpdate();\n }\n };\n\n const disconnect: OverflowManager['disconnect'] = () => {\n disposeResizeObserver();\n disposeResizeObserver = () => {\n /* noop */\n };\n\n // reset flags\n container = undefined;\n observing = false;\n forceDispatch = true;\n\n // clear all entries\n Object.keys(overflowItems).forEach(itemId => removeItem(itemId));\n Object.keys(overflowDividers).forEach(dividerId => removeDivider(dividerId));\n removeOverflowMenu();\n sizeCache.clear();\n\n // Reset the snapshot during teardown, but do not broadcast a final update.\n // Consumers unsubscribe as part of unmount, and a disconnect-time notification can race\n // those cleanups and dispatch into already-unmounting React listeners.\n snapshot = EMPTY_SNAPSHOT;\n };\n\n const addItem: OverflowManager['addItem'] = items => {\n if (overflowItems[items.id]) {\n return;\n }\n\n overflowItems[items.id] = items;\n\n // some options can affect priority which are only set on `observe`\n if (observing) {\n // Updates to elements might not change the queue tops\n // i.e. new element is enqueued but the top of the queue stays the same\n // force a dispatch on the next batched update\n forceDispatch = true;\n visibleItemQueue.enqueue(items.id);\n update();\n }\n\n if (items.groupId) {\n groupManager.addItem(items.id, items.groupId);\n items.element.setAttribute(DATA_OVERFLOW_GROUP, items.groupId);\n }\n };\n\n const addOverflowMenu: OverflowManager['addOverflowMenu'] = el => {\n overflowMenu = el;\n\n if (observing) {\n forceDispatch = true;\n update();\n }\n };\n\n const addDivider: OverflowManager['addDivider'] = divider => {\n if (!divider.groupId || overflowDividers[divider.groupId]) {\n return;\n }\n\n divider.element.setAttribute(DATA_OVERFLOW_GROUP, divider.groupId);\n overflowDividers[divider.groupId] = divider;\n };\n\n const removeOverflowMenu: OverflowManager['removeOverflowMenu'] = () => {\n overflowMenu = undefined;\n\n if (observing) {\n forceDispatch = true;\n update();\n }\n };\n\n const removeDivider: OverflowManager['removeDivider'] = groupId => {\n if (!overflowDividers[groupId]) {\n return;\n }\n const divider = overflowDividers[groupId];\n if (divider.groupId) {\n delete overflowDividers[groupId];\n divider.element.removeAttribute(DATA_OVERFLOW_GROUP);\n }\n };\n\n const removeItem: OverflowManager['removeItem'] = itemId => {\n if (!overflowItems[itemId]) {\n return;\n }\n\n if (observing) {\n // We might be removing an item in an overflow which would not affect the tops,\n // but we need to update anyway to update the overflow menu state\n forceDispatch = true;\n }\n\n const item = overflowItems[itemId];\n visibleItemQueue.remove(itemId);\n invisibleItemQueue.remove(itemId);\n\n if (item.groupId) {\n groupManager.removeItem(item.id, item.groupId);\n item.element.removeAttribute(DATA_OVERFLOW_GROUP);\n }\n\n sizeCache.delete(item.element);\n delete overflowItems[itemId];\n if (observing) {\n update();\n }\n };\n\n const subscribe: OverflowManager['subscribe'] = listener => {\n listeners.add(listener);\n\n return () => {\n listeners.delete(listener);\n };\n };\n\n return {\n addItem,\n disconnect,\n forceUpdate,\n observe,\n removeItem,\n update,\n addOverflowMenu,\n removeOverflowMenu,\n addDivider,\n removeDivider,\n setOptions,\n getSnapshot,\n subscribe,\n };\n}\n\nconst createGroupManager = () => {\n const groupVisibility: Record<string, OverflowGroupState> = {};\n const groups: Record<string, { visibleItemIds: Set<string>; invisibleItemIds: Set<string> }> = {};\n function updateGroupVisibility(groupId: string) {\n const group = groups[groupId];\n if (group.invisibleItemIds.size && group.visibleItemIds.size) {\n groupVisibility[groupId] = 'overflow';\n } else if (group.visibleItemIds.size === 0) {\n groupVisibility[groupId] = 'hidden';\n } else {\n groupVisibility[groupId] = 'visible';\n }\n }\n function isGroupVisible(groupId: string) {\n return groupVisibility[groupId] === 'visible' || groupVisibility[groupId] === 'overflow';\n }\n return {\n groupVisibility: () => groupVisibility,\n isSingleItemVisible(itemId: string, groupId: string) {\n return (\n isGroupVisible(groupId) &&\n groups[groupId].visibleItemIds.has(itemId) &&\n groups[groupId].visibleItemIds.size === 1\n );\n },\n addItem(itemId: string, groupId: string) {\n groups[groupId] ??= {\n visibleItemIds: new Set<string>(),\n invisibleItemIds: new Set<string>(),\n };\n\n groups[groupId].visibleItemIds.add(itemId);\n updateGroupVisibility(groupId);\n },\n removeItem(itemId: string, groupId: string) {\n groups[groupId].invisibleItemIds.delete(itemId);\n groups[groupId].visibleItemIds.delete(itemId);\n updateGroupVisibility(groupId);\n },\n showItem(itemId: string, groupId: string) {\n groups[groupId].invisibleItemIds.delete(itemId);\n groups[groupId].visibleItemIds.add(itemId);\n updateGroupVisibility(groupId);\n },\n hideItem(itemId: string, groupId: string) {\n groups[groupId].invisibleItemIds.add(itemId);\n groups[groupId].visibleItemIds.delete(itemId);\n updateGroupVisibility(groupId);\n },\n };\n};\n"],"names":["DATA_OVERFLOWING","DATA_OVERFLOW_GROUP","EMPTY_SNAPSHOT","observeResize","debounce","createPriorityQueue","DEFAULT_OPTIONS","overflowAxis","overflowDirection","padding","minimumVisible","hasHiddenItems","onUpdateItemVisibility","onUpdateOverflow","createOverflowManager","initialOptions","sizeCache","Map","container","overflowMenu","observing","forceDispatch","options","overflowItems","overflowDividers","listeners","Set","disposeResizeObserver","snapshot","takeSnapshot","nextSnapshot","forEach","listener","getNextItem","queueToDequeue","queueToEnqueue","nextItem","dequeue","enqueue","groupManager","createGroupManager","compareItems","lt","rt","lte","rte","pinned","priority","positionStatusBit","element","compareDocumentPosition","getElementAxisSize","horizontal","vertical","el","has","set","get","getOffsetSize","bind","getClientSize","invisibleItemQueue","a","b","visibleItemQueue","occupiedSize","totalItemSize","id","totalDividerSize","Object","entries","groupVisibility","reduce","acc","state","overflowMenuSize","size","showItem","item","visible","groupId","isSingleItemVisible","removeAttribute","hideItem","setAttribute","dispatchOverflowUpdate","itemVisibility","visibleItems","invisibleItems","itemId","push","invisibleItemCount","length","getSnapshot","processOverflowItems","clear","availableSize","visibleTop","peek","invisibleTop","i","nextItemId","forceUpdate","update","setOptions","nextOptions","shouldTriggerUpdate","assign","observe","observedContainer","observeOptions","shouldForceUpdate","userOptions","values","contains","disconnect","undefined","keys","removeItem","dividerId","removeDivider","removeOverflowMenu","addItem","items","addOverflowMenu","addDivider","divider","remove","delete","subscribe","add","groups","updateGroupVisibility","group","invisibleItemIds","visibleItemIds","isGroupVisible"],"mappings":"AAAA,SAASA,gBAAgB,EAAEC,mBAAmB,EAAEC,cAAc,QAAQ,cAAW;AACjF,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,QAAQ,QAAQ,gBAAa;AAEtC,SAASC,mBAAmB,QAAQ,qBAAkB;AAUtD,MAAMC,kBAA6C;IACjDC,cAAc;IACdC,mBAAmB;IACnBC,SAAS;IACTC,gBAAgB;IAChBC,gBAAgB;IAChBC,wBAAwB;IACtB,QAAQ,GACV;IACAC,kBAAkB;IAChB,QAAQ,GACV;AACF;AAEA;;;;;;CAMC,GACD,OAAO,SAASC,sBAAsBC,iBAA2C,CAAC,CAAC;IACjF,gFAAgF;IAChF,2FAA2F;IAC3F,MAAMC,YAAY,IAAIC;IACtB,IAAIC;IACJ,IAAIC;IACJ,gDAAgD;IAChD,IAAIC,YAAY;IAChB,+FAA+F;IAC/F,kDAAkD;IAClD,IAAIC,gBAAgB;IACpB,MAAMC,UAAqC;QAAE,GAAGhB,eAAe;QAAE,GAAGS,cAAc;IAAC;IACnF,MAAMQ,gBAAmD,CAAC;IAC1D,MAAMC,mBAAyD,CAAC;IAChE,MAAMC,YAAY,IAAIC;IACtB,IAAIC,wBAAoC;IACtC,QAAQ,GACV;IAEA,IAAIC,WAA6B1B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D,QAAQ,CAACuD,cAAc,CAAChF,GAAG,CAACkC,WACnC0C,MAAM,CAACnD,QAAQ,CAACuD,cAAc,CAAC3D,IAAI,KAAK;QAE5C;QACA8C,SAAQjC,MAAc,EAAET,OAAe;gBACrCmD,SAAOnD;;YAAPmD,MAAAA,UAAAA,OAAM,CAACnD,WAAAA,QAAQ,iCAAfmD,OAAM,CAACnD,SAAQ,GAAK;gBAClBuD,gBAAgB,IAAI7G;gBACpB4G,kBAAkB,IAAI5G;YACxB;YAEAyG,MAAM,CAACnD,QAAQ,CAACuD,cAAc,CAACL,GAAG,CAACzC;YACnC2C,sBAAsBpD;QACxB;QACAsC,YAAW7B,MAAc,EAAET,OAAe;YACxCmD,MAAM,CAACnD,QAAQ,CAACsD,gBAAgB,CAACN,MAAM,CAACvC;YACxC0C,MAAM,CAACnD,QAAQ,CAACuD,cAAc,CAACP,MAAM,CAACvC;YACtC2C,sBAAsBpD;QACxB;QACAH,UAASY,MAAc,EAAET,OAAe;YACtCmD,MAAM,CAACnD,QAAQ,CAACsD,gBAAgB,CAACN,MAAM,CAACvC;YACxC0C,MAAM,CAACnD,QAAQ,CAACuD,cAAc,CAACL,GAAG,CAACzC;YACnC2C,sBAAsBpD;QACxB;QACAG,UAASM,MAAc,EAAET,OAAe;YACtCmD,MAAM,CAACnD,QAAQ,CAACsD,gBAAgB,CAACJ,GAAG,CAACzC;YACrC0C,MAAM,CAACnD,QAAQ,CAACuD,cAAc,CAACP,MAAM,CAACvC;YACtC2C,sBAAsBpD;QACxB;IACF;AACF"}
|
|
@@ -16,5 +16,5 @@ _export(exports, {
|
|
|
16
16
|
return _overflowManager.createOverflowManager;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
const _overflowManager = require("./overflowManager");
|
|
20
|
-
const _consts = require("./consts");
|
|
19
|
+
const _overflowManager = require("./overflowManager.cjs");
|
|
20
|
+
const _consts = require("./consts.cjs");
|
|
@@ -8,10 +8,10 @@ Object.defineProperty(exports, "createOverflowManager", {
|
|
|
8
8
|
return createOverflowManager;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _consts = require("./consts");
|
|
12
|
-
const _createResizeObserver = require("./createResizeObserver");
|
|
13
|
-
const _debounce = require("./debounce");
|
|
14
|
-
const _priorityQueue = require("./priorityQueue");
|
|
11
|
+
const _consts = require("./consts.cjs");
|
|
12
|
+
const _createResizeObserver = require("./createResizeObserver.cjs");
|
|
13
|
+
const _debounce = require("./debounce.cjs");
|
|
14
|
+
const _priorityQueue = require("./priorityQueue.cjs");
|
|
15
15
|
const DEFAULT_OPTIONS = {
|
|
16
16
|
overflowAxis: 'horizontal',
|
|
17
17
|
overflowDirection: 'end',
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/priority-overflow",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.2",
|
|
4
4
|
"description": "Vanilla JS utilities to implement overflow menus",
|
|
5
|
-
"main": "lib-commonjs/index.
|
|
5
|
+
"main": "lib-commonjs/index.cjs",
|
|
6
6
|
"module": "lib/index.js",
|
|
7
7
|
"typings": "./dist/index.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
@@ -22,17 +22,23 @@
|
|
|
22
22
|
},
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
"import": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"default": "./lib/index.js"
|
|
28
|
+
},
|
|
29
|
+
"require": {
|
|
30
|
+
"types": "./dist/index.d.cts",
|
|
31
|
+
"default": "./lib-commonjs/index.cjs"
|
|
32
|
+
}
|
|
29
33
|
},
|
|
30
34
|
"./package.json": "./package.json"
|
|
31
35
|
},
|
|
32
36
|
"files": [
|
|
33
37
|
"*.md",
|
|
34
38
|
"dist/*.d.ts",
|
|
39
|
+
"dist/*.d.cts",
|
|
35
40
|
"lib",
|
|
36
41
|
"lib-commonjs"
|
|
37
|
-
]
|
|
42
|
+
],
|
|
43
|
+
"type": "module"
|
|
38
44
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|