@fluentui/priority-overflow 9.1.8 → 9.1.10

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 CHANGED
@@ -1,12 +1,30 @@
1
1
  # Change Log - @fluentui/priority-overflow
2
2
 
3
- This log was last generated on Mon, 23 Oct 2023 09:48:54 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 20 Nov 2023 09:51:19 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.1.10](https://github.com/microsoft/fluentui/tree/@fluentui/priority-overflow_v9.1.10)
8
+
9
+ Mon, 20 Nov 2023 09:51:19 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/priority-overflow_v9.1.9..@fluentui/priority-overflow_v9.1.10)
11
+
12
+ ### Patches
13
+
14
+ - fix: disconnect should dispose all state correctly ([PR #29375](https://github.com/microsoft/fluentui/pull/29375) by lingfan.gao@microsoft.com)
15
+
16
+ ## [9.1.9](https://github.com/microsoft/fluentui/tree/@fluentui/priority-overflow_v9.1.9)
17
+
18
+ Thu, 09 Nov 2023 17:29:49 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/priority-overflow_v9.1.8..@fluentui/priority-overflow_v9.1.9)
20
+
21
+ ### Patches
22
+
23
+ - chore: use package.json#files setup instead of npmignore for all v9 libraries ([PR #29734](https://github.com/microsoft/fluentui/pull/29734) by martinhochel@microsoft.com)
24
+
7
25
  ## [9.1.8](https://github.com/microsoft/fluentui/tree/@fluentui/priority-overflow_v9.1.8)
8
26
 
9
- Mon, 23 Oct 2023 09:48:54 GMT
27
+ Mon, 23 Oct 2023 09:51:55 GMT
10
28
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/priority-overflow_v9.1.7..@fluentui/priority-overflow_v9.1.8)
11
29
 
12
30
  ### Patches
@@ -32,54 +32,6 @@ import { createPriorityQueue } from './priorityQueue';
32
32
  queueToEnqueue.enqueue(nextItem);
33
33
  return overflowItems[nextItem];
34
34
  };
35
- const createGroupManager = ()=>{
36
- const groupVisibility = {};
37
- const groups = {};
38
- function updateGroupVisibility(groupId) {
39
- const group = groups[groupId];
40
- if (group.invisibleItemIds.size && group.visibleItemIds.size) {
41
- groupVisibility[groupId] = 'overflow';
42
- } else if (group.visibleItemIds.size === 0) {
43
- groupVisibility[groupId] = 'hidden';
44
- } else {
45
- groupVisibility[groupId] = 'visible';
46
- }
47
- }
48
- function isGroupVisible(groupId) {
49
- return groupVisibility[groupId] === 'visible' || groupVisibility[groupId] === 'overflow';
50
- }
51
- return {
52
- groupVisibility: ()=>groupVisibility,
53
- isSingleItemVisible (itemId, groupId) {
54
- return isGroupVisible(groupId) && groups[groupId].visibleItemIds.has(itemId) && groups[groupId].visibleItemIds.size === 1;
55
- },
56
- addItem (itemId, groupId) {
57
- var _groups, _groupId;
58
- var _;
59
- (_ = (_groups = groups)[_groupId = groupId]) !== null && _ !== void 0 ? _ : _groups[_groupId] = {
60
- visibleItemIds: new Set(),
61
- invisibleItemIds: new Set()
62
- };
63
- groups[groupId].visibleItemIds.add(itemId);
64
- updateGroupVisibility(groupId);
65
- },
66
- removeItem (itemId, groupId) {
67
- groups[groupId].invisibleItemIds.delete(itemId);
68
- groups[groupId].visibleItemIds.delete(itemId);
69
- updateGroupVisibility(groupId);
70
- },
71
- showItem (itemId, groupId) {
72
- groups[groupId].invisibleItemIds.delete(itemId);
73
- groups[groupId].visibleItemIds.add(itemId);
74
- updateGroupVisibility(groupId);
75
- },
76
- hideItem (itemId, groupId) {
77
- groups[groupId].invisibleItemIds.add(itemId);
78
- groups[groupId].visibleItemIds.delete(itemId);
79
- updateGroupVisibility(groupId);
80
- }
81
- };
82
- };
83
35
  const groupManager = createGroupManager();
84
36
  function compareItems(lt, rt) {
85
37
  if (!lt || !rt) {
@@ -196,11 +148,6 @@ import { createPriorityQueue } from './priorityQueue';
196
148
  update();
197
149
  });
198
150
  };
199
- const disconnect = ()=>{
200
- observing = false;
201
- sizeCache.clear();
202
- disposeResizeObserver();
203
- };
204
151
  const addItem = (item)=>{
205
152
  if (overflowItems[item.id]) {
206
153
  return;
@@ -258,6 +205,18 @@ import { createPriorityQueue } from './priorityQueue';
258
205
  delete overflowItems[itemId];
259
206
  update();
260
207
  };
208
+ const disconnect = ()=>{
209
+ disposeResizeObserver();
210
+ // reset flags
211
+ container = undefined;
212
+ observing = false;
213
+ forceDispatch = true;
214
+ // clear all entries
215
+ Object.keys(overflowItems).forEach((itemId)=>removeItem(itemId));
216
+ Object.keys(overflowDividers).forEach((dividerId)=>removeDivider(dividerId));
217
+ removeOverflowMenu();
218
+ sizeCache.clear();
219
+ };
261
220
  return {
262
221
  addItem,
263
222
  disconnect,
@@ -271,3 +230,51 @@ import { createPriorityQueue } from './priorityQueue';
271
230
  removeDivider
272
231
  };
273
232
  }
233
+ const createGroupManager = ()=>{
234
+ const groupVisibility = {};
235
+ const groups = {};
236
+ function updateGroupVisibility(groupId) {
237
+ const group = groups[groupId];
238
+ if (group.invisibleItemIds.size && group.visibleItemIds.size) {
239
+ groupVisibility[groupId] = 'overflow';
240
+ } else if (group.visibleItemIds.size === 0) {
241
+ groupVisibility[groupId] = 'hidden';
242
+ } else {
243
+ groupVisibility[groupId] = 'visible';
244
+ }
245
+ }
246
+ function isGroupVisible(groupId) {
247
+ return groupVisibility[groupId] === 'visible' || groupVisibility[groupId] === 'overflow';
248
+ }
249
+ return {
250
+ groupVisibility: ()=>groupVisibility,
251
+ isSingleItemVisible (itemId, groupId) {
252
+ return isGroupVisible(groupId) && groups[groupId].visibleItemIds.has(itemId) && groups[groupId].visibleItemIds.size === 1;
253
+ },
254
+ addItem (itemId, groupId) {
255
+ var _groups, _groupId;
256
+ var _;
257
+ (_ = (_groups = groups)[_groupId = groupId]) !== null && _ !== void 0 ? _ : _groups[_groupId] = {
258
+ visibleItemIds: new Set(),
259
+ invisibleItemIds: new Set()
260
+ };
261
+ groups[groupId].visibleItemIds.add(itemId);
262
+ updateGroupVisibility(groupId);
263
+ },
264
+ removeItem (itemId, groupId) {
265
+ groups[groupId].invisibleItemIds.delete(itemId);
266
+ groups[groupId].visibleItemIds.delete(itemId);
267
+ updateGroupVisibility(groupId);
268
+ },
269
+ showItem (itemId, groupId) {
270
+ groups[groupId].invisibleItemIds.delete(itemId);
271
+ groups[groupId].visibleItemIds.add(itemId);
272
+ updateGroupVisibility(groupId);
273
+ },
274
+ hideItem (itemId, groupId) {
275
+ groups[groupId].invisibleItemIds.add(itemId);
276
+ groups[groupId].visibleItemIds.delete(itemId);
277
+ updateGroupVisibility(groupId);
278
+ }
279
+ };
280
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["overflowManager.ts"],"sourcesContent":["import { DATA_OVERFLOWING, DATA_OVERFLOW_GROUP } from './consts';\nimport { observeResize } from './createResizeObserver';\nimport { debounce } from './debounce';\nimport { createPriorityQueue, PriorityQueue } from './priorityQueue';\nimport type {\n OverflowGroupState,\n OverflowItemEntry,\n OverflowManager,\n ObserveOptions,\n OverflowDividerEntry,\n} from './types';\n\n/**\n * @internal\n * @returns overflow manager instance\n */\nexport function createOverflowManager(): 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<ObserveOptions> = {\n padding: 10,\n overflowAxis: 'horizontal',\n overflowDirection: 'end',\n minimumVisible: 0,\n onUpdateItemVisibility: () => undefined,\n onUpdateOverflow: () => undefined,\n };\n\n const overflowItems: Record<string, OverflowItemEntry> = {};\n const overflowDividers: Record<string, OverflowDividerEntry> = {};\n let disposeResizeObserver: () => void = () => null;\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 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\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 if (lte.priority !== rte.priority) {\n return lte.priority > rte.priority ? 1 : -1;\n }\n\n const positionStatusBit =\n options.overflowDirection === 'end' ? Node.DOCUMENT_POSITION_FOLLOWING : Node.DOCUMENT_POSITION_PRECEDING;\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 const totalItemSize = visibleItemQueue\n .all()\n .map(id => overflowItems[id].element)\n .map(getOffsetSize)\n .reduce((prev, current) => prev + current, 0);\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 = invisibleItemQueue.size() > 0 && 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 visibleItemIds = visibleItemQueue.all();\n const invisibleItemIds = invisibleItemQueue.all();\n\n const visibleItems = visibleItemIds.map(itemId => overflowItems[itemId]);\n const invisibleItems = invisibleItemIds.map(itemId => overflowItems[itemId]);\n\n options.onUpdateOverflow({ visibleItems, invisibleItems, groupVisibility: groupManager.groupVisibility() });\n };\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 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 observe: OverflowManager['observe'] = (observedContainer, userOptions) => {\n Object.assign(options, userOptions);\n observing = true;\n Object.values(overflowItems).forEach(item => visibleItemQueue.enqueue(item.id));\n\n container = observedContainer;\n disposeResizeObserver = observeResize(container, entries => {\n if (!entries[0] || !container) {\n return;\n }\n\n update();\n });\n };\n\n const disconnect: OverflowManager['disconnect'] = () => {\n observing = false;\n sizeCache.clear();\n disposeResizeObserver();\n };\n\n const addItem: OverflowManager['addItem'] = item => {\n if (overflowItems[item.id]) {\n return;\n }\n\n overflowItems[item.id] = item;\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(item.id);\n }\n\n if (item.groupId) {\n groupManager.addItem(item.id, item.groupId);\n item.element.setAttribute(DATA_OVERFLOW_GROUP, item.groupId);\n }\n\n update();\n };\n\n const addOverflowMenu: OverflowManager['addOverflowMenu'] = el => {\n overflowMenu = el;\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\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 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 update();\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 };\n}\n"],"names":["DATA_OVERFLOWING","DATA_OVERFLOW_GROUP","observeResize","debounce","createPriorityQueue","createOverflowManager","sizeCache","Map","container","overflowMenu","observing","forceDispatch","options","padding","overflowAxis","overflowDirection","minimumVisible","onUpdateItemVisibility","undefined","onUpdateOverflow","overflowItems","overflowDividers","disposeResizeObserver","getNextItem","queueToDequeue","queueToEnqueue","nextItem","dequeue","enqueue","createGroupManager","groupVisibility","groups","updateGroupVisibility","groupId","group","invisibleItemIds","size","visibleItemIds","isGroupVisible","isSingleItemVisible","itemId","has","addItem","Set","add","removeItem","delete","showItem","hideItem","groupManager","compareItems","lt","rt","lte","rte","priority","positionStatusBit","Node","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_PRECEDING","element","compareDocumentPosition","getElementAxisSize","horizontal","vertical","el","set","get","getOffsetSize","bind","getClientSize","invisibleItemQueue","a","b","visibleItemQueue","occupiedSize","totalItemSize","all","map","id","reduce","prev","current","totalDividerSize","Object","entries","acc","state","overflowMenuSize","item","visible","removeAttribute","setAttribute","dispatchOverflowUpdate","visibleItems","invisibleItems","processOverflowItems","clear","availableSize","visibleTop","peek","invisibleTop","i","forceUpdate","update","observe","observedContainer","userOptions","assign","values","forEach","disconnect","addOverflowMenu","addDivider","divider","removeOverflowMenu","removeDivider","remove"],"mappings":"AAAA,SAASA,gBAAgB,EAAEC,mBAAmB,QAAQ,WAAW;AACjE,SAASC,aAAa,QAAQ,yBAAyB;AACvD,SAASC,QAAQ,QAAQ,aAAa;AACtC,SAASC,mBAAmB,QAAuB,kBAAkB;AASrE;;;CAGC,GACD,OAAO,SAASC;IACd,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;I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D,KAAK7B,OAAO,CAAC+B,eAAe,CAAC1F;QAC/B;QAEAK,UAAUwC,MAAM,CAAC2C,KAAK7B,OAAO;QAC7B,OAAOxC,aAAa,CAACoB,OAAO;QAC5BgE;IACF;IAEA,OAAO;QACL9D;QACAqE;QACAR;QACAE;QACA5D;QACA2D;QACAQ;QACAG;QACAF;QACAG;IACF;AACF"}
1
+ {"version":3,"sources":["overflowManager.ts"],"sourcesContent":["import { DATA_OVERFLOWING, DATA_OVERFLOW_GROUP } from './consts';\nimport { observeResize } from './createResizeObserver';\nimport { debounce } from './debounce';\nimport { createPriorityQueue, PriorityQueue } from './priorityQueue';\nimport type {\n OverflowGroupState,\n OverflowItemEntry,\n OverflowManager,\n ObserveOptions,\n OverflowDividerEntry,\n} from './types';\n\n/**\n * @internal\n * @returns overflow manager instance\n */\nexport function createOverflowManager(): 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<ObserveOptions> = {\n padding: 10,\n overflowAxis: 'horizontal',\n overflowDirection: 'end',\n minimumVisible: 0,\n onUpdateItemVisibility: () => undefined,\n onUpdateOverflow: () => undefined,\n };\n\n const overflowItems: Record<string, OverflowItemEntry> = {};\n const overflowDividers: Record<string, OverflowDividerEntry> = {};\n let disposeResizeObserver: () => void = () => null;\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 if (lte.priority !== rte.priority) {\n return lte.priority > rte.priority ? 1 : -1;\n }\n\n const positionStatusBit =\n options.overflowDirection === 'end' ? Node.DOCUMENT_POSITION_FOLLOWING : Node.DOCUMENT_POSITION_PRECEDING;\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 const totalItemSize = visibleItemQueue\n .all()\n .map(id => overflowItems[id].element)\n .map(getOffsetSize)\n .reduce((prev, current) => prev + current, 0);\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 = invisibleItemQueue.size() > 0 && 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 visibleItemIds = visibleItemQueue.all();\n const invisibleItemIds = invisibleItemQueue.all();\n\n const visibleItems = visibleItemIds.map(itemId => overflowItems[itemId]);\n const invisibleItems = invisibleItemIds.map(itemId => overflowItems[itemId]);\n\n options.onUpdateOverflow({ visibleItems, invisibleItems, groupVisibility: groupManager.groupVisibility() });\n };\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 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 observe: OverflowManager['observe'] = (observedContainer, userOptions) => {\n Object.assign(options, userOptions);\n observing = true;\n Object.values(overflowItems).forEach(item => visibleItemQueue.enqueue(item.id));\n\n container = observedContainer;\n disposeResizeObserver = observeResize(container, entries => {\n if (!entries[0] || !container) {\n return;\n }\n\n update();\n });\n };\n\n const addItem: OverflowManager['addItem'] = item => {\n if (overflowItems[item.id]) {\n return;\n }\n\n overflowItems[item.id] = item;\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(item.id);\n }\n\n if (item.groupId) {\n groupManager.addItem(item.id, item.groupId);\n item.element.setAttribute(DATA_OVERFLOW_GROUP, item.groupId);\n }\n\n update();\n };\n\n const addOverflowMenu: OverflowManager['addOverflowMenu'] = el => {\n overflowMenu = el;\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\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 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 update();\n };\n\n const disconnect: OverflowManager['disconnect'] = () => {\n disposeResizeObserver();\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\n return {\n addItem,\n disconnect,\n forceUpdate,\n observe,\n removeItem,\n update,\n addOverflowMenu,\n removeOverflowMenu,\n addDivider,\n removeDivider,\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","observeResize","debounce","createPriorityQueue","createOverflowManager","sizeCache","Map","container","overflowMenu","observing","forceDispatch","options","padding","overflowAxis","overflowDirection","minimumVisible","onUpdateItemVisibility","undefined","onUpdateOverflow","overflowItems","overflowDividers","disposeResizeObserver","getNextItem","queueToDequeue","queueToEnqueue","nextItem","dequeue","enqueue","groupManager","createGroupManager","compareItems","lt","rt","lte","rte","priority","positionStatusBit","Node","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_PRECEDING","element","compareDocumentPosition","getElementAxisSize","horizontal","vertical","el","has","set","get","getOffsetSize","bind","getClientSize","invisibleItemQueue","a","b","visibleItemQueue","occupiedSize","totalItemSize","all","map","id","reduce","prev","current","totalDividerSize","Object","entries","groupVisibility","acc","state","overflowMenuSize","size","showItem","item","visible","groupId","isSingleItemVisible","removeAttribute","hideItem","setAttribute","dispatchOverflowUpdate","visibleItemIds","invisibleItemIds","visibleItems","itemId","invisibleItems","processOverflowItems","clear","availableSize","visibleTop","peek","invisibleTop","i","forceUpdate","update","observe","observedContainer","userOptions","assign","values","forEach","addItem","addOverflowMenu","addDivider","divider","removeOverflowMenu","removeDivider","removeItem","remove","delete","disconnect","keys","dividerId","groups","updateGroupVisibility","group","isGroupVisible","Set","add"],"mappings":"AAAA,SAASA,gBAAgB,EAAEC,mBAAmB,QAAQ,WAAW;AACjE,SAASC,aAAa,QAAQ,yBAAyB;AACvD,SAASC,QAAQ,QAAQ,aAAa;AACtC,SAASC,mBAAmB,QAAuB,kBAAkB;AASrE;;;CAGC,GACD,OAAO,SAASC;IACd,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,UAAoC;QACxCC,SAAS;QACTC,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AACzB;YACtC8B,sBAAsBvC;QACxB;QACAH,UAASY,MAAc,EAAET,OAAe;YACtCsC,MAAM,CAACtC,QAAQ,CAACO,gBAAgB,CAAC2B,MAAM,CAACzB;YACxC6B,MAAM,CAACtC,QAAQ,CAACM,cAAc,CAACqC,GAAG,CAAClC;YACnC8B,sBAAsBvC;QACxB;QACAG,UAASM,MAAc,EAAET,OAAe;YACtCsC,MAAM,CAACtC,QAAQ,CAACO,gBAAgB,CAACoC,GAAG,CAAClC;YACrC6B,MAAM,CAACtC,QAAQ,CAACM,cAAc,CAAC4B,MAAM,CAACzB;YACtC8B,sBAAsBvC;QACxB;IACF;AACF"}
@@ -39,54 +39,6 @@ function createOverflowManager() {
39
39
  queueToEnqueue.enqueue(nextItem);
40
40
  return overflowItems[nextItem];
41
41
  };
42
- const createGroupManager = ()=>{
43
- const groupVisibility = {};
44
- const groups = {};
45
- function updateGroupVisibility(groupId) {
46
- const group = groups[groupId];
47
- if (group.invisibleItemIds.size && group.visibleItemIds.size) {
48
- groupVisibility[groupId] = 'overflow';
49
- } else if (group.visibleItemIds.size === 0) {
50
- groupVisibility[groupId] = 'hidden';
51
- } else {
52
- groupVisibility[groupId] = 'visible';
53
- }
54
- }
55
- function isGroupVisible(groupId) {
56
- return groupVisibility[groupId] === 'visible' || groupVisibility[groupId] === 'overflow';
57
- }
58
- return {
59
- groupVisibility: ()=>groupVisibility,
60
- isSingleItemVisible (itemId, groupId) {
61
- return isGroupVisible(groupId) && groups[groupId].visibleItemIds.has(itemId) && groups[groupId].visibleItemIds.size === 1;
62
- },
63
- addItem (itemId, groupId) {
64
- var _groups, _groupId;
65
- var _;
66
- (_ = (_groups = groups)[_groupId = groupId]) !== null && _ !== void 0 ? _ : _groups[_groupId] = {
67
- visibleItemIds: new Set(),
68
- invisibleItemIds: new Set()
69
- };
70
- groups[groupId].visibleItemIds.add(itemId);
71
- updateGroupVisibility(groupId);
72
- },
73
- removeItem (itemId, groupId) {
74
- groups[groupId].invisibleItemIds.delete(itemId);
75
- groups[groupId].visibleItemIds.delete(itemId);
76
- updateGroupVisibility(groupId);
77
- },
78
- showItem (itemId, groupId) {
79
- groups[groupId].invisibleItemIds.delete(itemId);
80
- groups[groupId].visibleItemIds.add(itemId);
81
- updateGroupVisibility(groupId);
82
- },
83
- hideItem (itemId, groupId) {
84
- groups[groupId].invisibleItemIds.add(itemId);
85
- groups[groupId].visibleItemIds.delete(itemId);
86
- updateGroupVisibility(groupId);
87
- }
88
- };
89
- };
90
42
  const groupManager = createGroupManager();
91
43
  function compareItems(lt, rt) {
92
44
  if (!lt || !rt) {
@@ -203,11 +155,6 @@ function createOverflowManager() {
203
155
  update();
204
156
  });
205
157
  };
206
- const disconnect = ()=>{
207
- observing = false;
208
- sizeCache.clear();
209
- disposeResizeObserver();
210
- };
211
158
  const addItem = (item)=>{
212
159
  if (overflowItems[item.id]) {
213
160
  return;
@@ -265,6 +212,18 @@ function createOverflowManager() {
265
212
  delete overflowItems[itemId];
266
213
  update();
267
214
  };
215
+ const disconnect = ()=>{
216
+ disposeResizeObserver();
217
+ // reset flags
218
+ container = undefined;
219
+ observing = false;
220
+ forceDispatch = true;
221
+ // clear all entries
222
+ Object.keys(overflowItems).forEach((itemId)=>removeItem(itemId));
223
+ Object.keys(overflowDividers).forEach((dividerId)=>removeDivider(dividerId));
224
+ removeOverflowMenu();
225
+ sizeCache.clear();
226
+ };
268
227
  return {
269
228
  addItem,
270
229
  disconnect,
@@ -278,3 +237,51 @@ function createOverflowManager() {
278
237
  removeDivider
279
238
  };
280
239
  }
240
+ const createGroupManager = ()=>{
241
+ const groupVisibility = {};
242
+ const groups = {};
243
+ function updateGroupVisibility(groupId) {
244
+ const group = groups[groupId];
245
+ if (group.invisibleItemIds.size && group.visibleItemIds.size) {
246
+ groupVisibility[groupId] = 'overflow';
247
+ } else if (group.visibleItemIds.size === 0) {
248
+ groupVisibility[groupId] = 'hidden';
249
+ } else {
250
+ groupVisibility[groupId] = 'visible';
251
+ }
252
+ }
253
+ function isGroupVisible(groupId) {
254
+ return groupVisibility[groupId] === 'visible' || groupVisibility[groupId] === 'overflow';
255
+ }
256
+ return {
257
+ groupVisibility: ()=>groupVisibility,
258
+ isSingleItemVisible (itemId, groupId) {
259
+ return isGroupVisible(groupId) && groups[groupId].visibleItemIds.has(itemId) && groups[groupId].visibleItemIds.size === 1;
260
+ },
261
+ addItem (itemId, groupId) {
262
+ var _groups, _groupId;
263
+ var _;
264
+ (_ = (_groups = groups)[_groupId = groupId]) !== null && _ !== void 0 ? _ : _groups[_groupId] = {
265
+ visibleItemIds: new Set(),
266
+ invisibleItemIds: new Set()
267
+ };
268
+ groups[groupId].visibleItemIds.add(itemId);
269
+ updateGroupVisibility(groupId);
270
+ },
271
+ removeItem (itemId, groupId) {
272
+ groups[groupId].invisibleItemIds.delete(itemId);
273
+ groups[groupId].visibleItemIds.delete(itemId);
274
+ updateGroupVisibility(groupId);
275
+ },
276
+ showItem (itemId, groupId) {
277
+ groups[groupId].invisibleItemIds.delete(itemId);
278
+ groups[groupId].visibleItemIds.add(itemId);
279
+ updateGroupVisibility(groupId);
280
+ },
281
+ hideItem (itemId, groupId) {
282
+ groups[groupId].invisibleItemIds.add(itemId);
283
+ groups[groupId].visibleItemIds.delete(itemId);
284
+ updateGroupVisibility(groupId);
285
+ }
286
+ };
287
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["overflowManager.js"],"sourcesContent":["import { DATA_OVERFLOWING, DATA_OVERFLOW_GROUP } from './consts';\nimport { observeResize } from './createResizeObserver';\nimport { debounce } from './debounce';\nimport { createPriorityQueue } from './priorityQueue';\n/**\n * @internal\n * @returns overflow manager instance\n */ export function createOverflowManager() {\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();\n let container;\n let overflowMenu;\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 = {\n padding: 10,\n overflowAxis: 'horizontal',\n overflowDirection: 'end',\n minimumVisible: 0,\n onUpdateItemVisibility: ()=>undefined,\n onUpdateOverflow: ()=>undefined\n };\n const overflowItems = {};\n const overflowDividers = {};\n let disposeResizeObserver = ()=>null;\n const getNextItem = (queueToDequeue, queueToEnqueue)=>{\n const nextItem = queueToDequeue.dequeue();\n queueToEnqueue.enqueue(nextItem);\n return overflowItems[nextItem];\n };\n const createGroupManager = ()=>{\n const groupVisibility = {};\n const groups = {};\n function updateGroupVisibility(groupId) {\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) {\n return groupVisibility[groupId] === 'visible' || groupVisibility[groupId] === 'overflow';\n }\n return {\n groupVisibility: ()=>groupVisibility,\n isSingleItemVisible (itemId, groupId) {\n return isGroupVisible(groupId) && groups[groupId].visibleItemIds.has(itemId) && groups[groupId].visibleItemIds.size === 1;\n },\n addItem (itemId, groupId) {\n var _groups, _groupId;\n var _;\n (_ = (_groups = groups)[_groupId = groupId]) !== null && _ !== void 0 ? _ : _groups[_groupId] = {\n visibleItemIds: new Set(),\n invisibleItemIds: new Set()\n };\n groups[groupId].visibleItemIds.add(itemId);\n updateGroupVisibility(groupId);\n },\n removeItem (itemId, groupId) {\n groups[groupId].invisibleItemIds.delete(itemId);\n groups[groupId].visibleItemIds.delete(itemId);\n updateGroupVisibility(groupId);\n },\n showItem (itemId, groupId) {\n groups[groupId].invisibleItemIds.delete(itemId);\n groups[groupId].visibleItemIds.add(itemId);\n updateGroupVisibility(groupId);\n },\n hideItem (itemId, groupId) {\n groups[groupId].invisibleItemIds.add(itemId);\n groups[groupId].visibleItemIds.delete(itemId);\n updateGroupVisibility(groupId);\n }\n };\n };\n const groupManager = createGroupManager();\n function compareItems(lt, rt) {\n if (!lt || !rt) {\n return 0;\n }\n const lte = overflowItems[lt];\n const rte = overflowItems[rt];\n if (lte.priority !== rte.priority) {\n return lte.priority > rte.priority ? 1 : -1;\n }\n const positionStatusBit = options.overflowDirection === 'end' ? Node.DOCUMENT_POSITION_FOLLOWING : Node.DOCUMENT_POSITION_PRECEDING;\n // eslint-disable-next-line no-bitwise\n return lte.element.compareDocumentPosition(rte.element) & positionStatusBit ? 1 : -1;\n }\n function getElementAxisSize(horizontal, vertical, el) {\n if (!sizeCache.has(el)) {\n sizeCache.set(el, options.overflowAxis === 'horizontal' ? el[horizontal] : el[vertical]);\n }\n return sizeCache.get(el);\n }\n const getOffsetSize = getElementAxisSize.bind(null, 'offsetWidth', 'offsetHeight');\n const getClientSize = getElementAxisSize.bind(null, 'clientWidth', 'clientHeight');\n const invisibleItemQueue = createPriorityQueue((a, b)=>-1 * compareItems(a, b));\n const visibleItemQueue = createPriorityQueue(compareItems);\n function occupiedSize() {\n const totalItemSize = visibleItemQueue.all().map((id)=>overflowItems[id].element).map(getOffsetSize).reduce((prev, current)=>prev + current, 0);\n const totalDividerSize = Object.entries(groupManager.groupVisibility()).reduce((acc, [id, state])=>acc + (state !== 'hidden' && overflowDividers[id] ? getOffsetSize(overflowDividers[id].element) : 0), 0);\n const overflowMenuSize = invisibleItemQueue.size() > 0 && overflowMenu ? getOffsetSize(overflowMenu) : 0;\n return totalItemSize + totalDividerSize + overflowMenuSize;\n }\n const showItem = ()=>{\n const item = getNextItem(invisibleItemQueue, visibleItemQueue);\n options.onUpdateItemVisibility({\n item,\n visible: true\n });\n if (item.groupId) {\n groupManager.showItem(item.id, item.groupId);\n if (groupManager.isSingleItemVisible(item.id, item.groupId)) {\n var _overflowDividers_item_groupId;\n (_overflowDividers_item_groupId = overflowDividers[item.groupId]) === null || _overflowDividers_item_groupId === void 0 ? void 0 : _overflowDividers_item_groupId.element.removeAttribute(DATA_OVERFLOWING);\n }\n }\n };\n const hideItem = ()=>{\n const item = getNextItem(visibleItemQueue, invisibleItemQueue);\n options.onUpdateItemVisibility({\n item,\n visible: false\n });\n if (item.groupId) {\n if (groupManager.isSingleItemVisible(item.id, item.groupId)) {\n var _overflowDividers_item_groupId;\n (_overflowDividers_item_groupId = overflowDividers[item.groupId]) === null || _overflowDividers_item_groupId === void 0 ? void 0 : _overflowDividers_item_groupId.element.setAttribute(DATA_OVERFLOWING, '');\n }\n groupManager.hideItem(item.id, item.groupId);\n }\n };\n const dispatchOverflowUpdate = ()=>{\n const visibleItemIds = visibleItemQueue.all();\n const invisibleItemIds = invisibleItemQueue.all();\n const visibleItems = visibleItemIds.map((itemId)=>overflowItems[itemId]);\n const invisibleItems = invisibleItemIds.map((itemId)=>overflowItems[itemId]);\n options.onUpdateOverflow({\n visibleItems,\n invisibleItems,\n groupVisibility: groupManager.groupVisibility()\n });\n };\n const processOverflowItems = ()=>{\n if (!container) {\n return false;\n }\n sizeCache.clear();\n const availableSize = getClientSize(container) - options.padding;\n // Snapshot of the visible/invisible state to compare for updates\n const visibleTop = visibleItemQueue.peek();\n const invisibleTop = invisibleItemQueue.peek();\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 // 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(occupiedSize() < availableSize && invisibleItemQueue.size() > 0 || 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 // Remove items until there's no more overflow\n while(occupiedSize() > availableSize && visibleItemQueue.size() > options.minimumVisible){\n hideItem();\n }\n }\n // only update when the state of visible/invisible items has changed\n return visibleItemQueue.peek() !== visibleTop || invisibleItemQueue.peek() !== invisibleTop;\n };\n const forceUpdate = ()=>{\n if (processOverflowItems() || forceDispatch) {\n forceDispatch = false;\n dispatchOverflowUpdate();\n }\n };\n const update = debounce(forceUpdate);\n const observe = (observedContainer, userOptions)=>{\n Object.assign(options, userOptions);\n observing = true;\n Object.values(overflowItems).forEach((item)=>visibleItemQueue.enqueue(item.id));\n container = observedContainer;\n disposeResizeObserver = observeResize(container, (entries)=>{\n if (!entries[0] || !container) {\n return;\n }\n update();\n });\n };\n const disconnect = ()=>{\n observing = false;\n sizeCache.clear();\n disposeResizeObserver();\n };\n const addItem = (item)=>{\n if (overflowItems[item.id]) {\n return;\n }\n overflowItems[item.id] = item;\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(item.id);\n }\n if (item.groupId) {\n groupManager.addItem(item.id, item.groupId);\n item.element.setAttribute(DATA_OVERFLOW_GROUP, item.groupId);\n }\n update();\n };\n const addOverflowMenu = (el)=>{\n overflowMenu = el;\n };\n const addDivider = (divider)=>{\n if (!divider.groupId || overflowDividers[divider.groupId]) {\n return;\n }\n divider.element.setAttribute(DATA_OVERFLOW_GROUP, divider.groupId);\n overflowDividers[divider.groupId] = divider;\n };\n const removeOverflowMenu = ()=>{\n overflowMenu = undefined;\n };\n const 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 const removeItem = (itemId)=>{\n if (!overflowItems[itemId]) {\n return;\n }\n const item = overflowItems[itemId];\n visibleItemQueue.remove(itemId);\n invisibleItemQueue.remove(itemId);\n if (item.groupId) {\n groupManager.removeItem(item.id, item.groupId);\n item.element.removeAttribute(DATA_OVERFLOW_GROUP);\n }\n sizeCache.delete(item.element);\n delete overflowItems[itemId];\n update();\n };\n return {\n addItem,\n disconnect,\n forceUpdate,\n observe,\n removeItem,\n update,\n addOverflowMenu,\n removeOverflowMenu,\n addDivider,\n removeDivider\n };\n}\n"],"names":["createOverflowManager","sizeCache","Map","container","overflowMenu","observing","forceDispatch","options","padding","overflowAxis","overflowDirection","minimumVisible","onUpdateItemVisibility","undefined","onUpdateOverflow","overflowItems","overflowDividers","disposeResizeObserver","getNextItem","queueToDequeue","queueToEnqueue","nextItem","dequeue","enqueue","createGroupManager","groupVisibility","groups","updateGroupVisibility","groupId","group","invisibleItemIds","size","visibleItemIds","isGroupVisible","isSingleItemVisible","itemId","has","addItem","_groups","_groupId","_","Set","add","removeItem","delete","showItem","hideItem","groupManager","compareItems","lt","rt","lte","rte","priority","positionStatusBit","Node","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_PRECEDING","element","compareDocumentPosition","getElementAxisSize","horizontal","vertical","el","set","get","getOffsetSize","bind","getClientSize","invisibleItemQueue","createPriorityQueue","a","b","visibleItemQueue","occupiedSize","totalItemSize","all","map","id","reduce","prev","current","totalDividerSize","Object","entries","acc","state","overflowMenuSize","item","visible","_overflowDividers_item_groupId","removeAttribute","DATA_OVERFLOWING","setAttribute","dispatchOverflowUpdate","visibleItems","invisibleItems","processOverflowItems","clear","availableSize","visibleTop","peek","invisibleTop","i","forceUpdate","update","debounce","observe","observedContainer","userOptions","assign","values","forEach","observeResize","disconnect","DATA_OVERFLOW_GROUP","addOverflowMenu","addDivider","divider","removeOverflowMenu","removeDivider","remove"],"mappings":";;;;+BAOoBA;;;eAAAA;;;wBAPkC;sCACxB;0BACL;+BACW;AAIzB,SAASA;IAChB,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,UAAU;QACZC,SAAS;QACTC,cAAc;QACdC,mBAAmB;QACnBC,gBAAgB;QAChBC,wBAAwB,IAAIC;QAC5BC,kBAAkB,IAAID;IAC1B;IACA,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KAAKV,EAAE,EAAEU,KAAK5D,OAAO;YAC7C4D,KAAK9B,OAAO,CAACiC,eAAe,CAACwB,2BAAmB;QACpD;QACAlH,UAAU2C,MAAM,CAAC4C,KAAK9B,OAAO;QAC7B,OAAO3C,aAAa,CAACoB,OAAO;QAC5BsE;IACJ;IACA,OAAO;QACHpE;QACA6E;QACAV;QACAG;QACAhE;QACA8D;QACAW;QACAG;QACAF;QACAG;IACJ;AACJ"}
1
+ {"version":3,"sources":["overflowManager.js"],"sourcesContent":["import { DATA_OVERFLOWING, DATA_OVERFLOW_GROUP } from './consts';\nimport { observeResize } from './createResizeObserver';\nimport { debounce } from './debounce';\nimport { createPriorityQueue } from './priorityQueue';\n/**\n * @internal\n * @returns overflow manager instance\n */ export function createOverflowManager() {\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();\n let container;\n let overflowMenu;\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 = {\n padding: 10,\n overflowAxis: 'horizontal',\n overflowDirection: 'end',\n minimumVisible: 0,\n onUpdateItemVisibility: ()=>undefined,\n onUpdateOverflow: ()=>undefined\n };\n const overflowItems = {};\n const overflowDividers = {};\n let disposeResizeObserver = ()=>null;\n const getNextItem = (queueToDequeue, queueToEnqueue)=>{\n const nextItem = queueToDequeue.dequeue();\n queueToEnqueue.enqueue(nextItem);\n return overflowItems[nextItem];\n };\n const groupManager = createGroupManager();\n function compareItems(lt, rt) {\n if (!lt || !rt) {\n return 0;\n }\n const lte = overflowItems[lt];\n const rte = overflowItems[rt];\n if (lte.priority !== rte.priority) {\n return lte.priority > rte.priority ? 1 : -1;\n }\n const positionStatusBit = options.overflowDirection === 'end' ? Node.DOCUMENT_POSITION_FOLLOWING : Node.DOCUMENT_POSITION_PRECEDING;\n // eslint-disable-next-line no-bitwise\n return lte.element.compareDocumentPosition(rte.element) & positionStatusBit ? 1 : -1;\n }\n function getElementAxisSize(horizontal, vertical, el) {\n if (!sizeCache.has(el)) {\n sizeCache.set(el, options.overflowAxis === 'horizontal' ? el[horizontal] : el[vertical]);\n }\n return sizeCache.get(el);\n }\n const getOffsetSize = getElementAxisSize.bind(null, 'offsetWidth', 'offsetHeight');\n const getClientSize = getElementAxisSize.bind(null, 'clientWidth', 'clientHeight');\n const invisibleItemQueue = createPriorityQueue((a, b)=>-1 * compareItems(a, b));\n const visibleItemQueue = createPriorityQueue(compareItems);\n function occupiedSize() {\n const totalItemSize = visibleItemQueue.all().map((id)=>overflowItems[id].element).map(getOffsetSize).reduce((prev, current)=>prev + current, 0);\n const totalDividerSize = Object.entries(groupManager.groupVisibility()).reduce((acc, [id, state])=>acc + (state !== 'hidden' && overflowDividers[id] ? getOffsetSize(overflowDividers[id].element) : 0), 0);\n const overflowMenuSize = invisibleItemQueue.size() > 0 && overflowMenu ? getOffsetSize(overflowMenu) : 0;\n return totalItemSize + totalDividerSize + overflowMenuSize;\n }\n const showItem = ()=>{\n const item = getNextItem(invisibleItemQueue, visibleItemQueue);\n options.onUpdateItemVisibility({\n item,\n visible: true\n });\n if (item.groupId) {\n groupManager.showItem(item.id, item.groupId);\n if (groupManager.isSingleItemVisible(item.id, item.groupId)) {\n var _overflowDividers_item_groupId;\n (_overflowDividers_item_groupId = overflowDividers[item.groupId]) === null || _overflowDividers_item_groupId === void 0 ? void 0 : _overflowDividers_item_groupId.element.removeAttribute(DATA_OVERFLOWING);\n }\n }\n };\n const hideItem = ()=>{\n const item = getNextItem(visibleItemQueue, invisibleItemQueue);\n options.onUpdateItemVisibility({\n item,\n visible: false\n });\n if (item.groupId) {\n if (groupManager.isSingleItemVisible(item.id, item.groupId)) {\n var _overflowDividers_item_groupId;\n (_overflowDividers_item_groupId = overflowDividers[item.groupId]) === null || _overflowDividers_item_groupId === void 0 ? void 0 : _overflowDividers_item_groupId.element.setAttribute(DATA_OVERFLOWING, '');\n }\n groupManager.hideItem(item.id, item.groupId);\n }\n };\n const dispatchOverflowUpdate = ()=>{\n const visibleItemIds = visibleItemQueue.all();\n const invisibleItemIds = invisibleItemQueue.all();\n const visibleItems = visibleItemIds.map((itemId)=>overflowItems[itemId]);\n const invisibleItems = invisibleItemIds.map((itemId)=>overflowItems[itemId]);\n options.onUpdateOverflow({\n visibleItems,\n invisibleItems,\n groupVisibility: groupManager.groupVisibility()\n });\n };\n const processOverflowItems = ()=>{\n if (!container) {\n return false;\n }\n sizeCache.clear();\n const availableSize = getClientSize(container) - options.padding;\n // Snapshot of the visible/invisible state to compare for updates\n const visibleTop = visibleItemQueue.peek();\n const invisibleTop = invisibleItemQueue.peek();\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 // 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(occupiedSize() < availableSize && invisibleItemQueue.size() > 0 || 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 // Remove items until there's no more overflow\n while(occupiedSize() > availableSize && visibleItemQueue.size() > options.minimumVisible){\n hideItem();\n }\n }\n // only update when the state of visible/invisible items has changed\n return visibleItemQueue.peek() !== visibleTop || invisibleItemQueue.peek() !== invisibleTop;\n };\n const forceUpdate = ()=>{\n if (processOverflowItems() || forceDispatch) {\n forceDispatch = false;\n dispatchOverflowUpdate();\n }\n };\n const update = debounce(forceUpdate);\n const observe = (observedContainer, userOptions)=>{\n Object.assign(options, userOptions);\n observing = true;\n Object.values(overflowItems).forEach((item)=>visibleItemQueue.enqueue(item.id));\n container = observedContainer;\n disposeResizeObserver = observeResize(container, (entries)=>{\n if (!entries[0] || !container) {\n return;\n }\n update();\n });\n };\n const addItem = (item)=>{\n if (overflowItems[item.id]) {\n return;\n }\n overflowItems[item.id] = item;\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(item.id);\n }\n if (item.groupId) {\n groupManager.addItem(item.id, item.groupId);\n item.element.setAttribute(DATA_OVERFLOW_GROUP, item.groupId);\n }\n update();\n };\n const addOverflowMenu = (el)=>{\n overflowMenu = el;\n };\n const addDivider = (divider)=>{\n if (!divider.groupId || overflowDividers[divider.groupId]) {\n return;\n }\n divider.element.setAttribute(DATA_OVERFLOW_GROUP, divider.groupId);\n overflowDividers[divider.groupId] = divider;\n };\n const removeOverflowMenu = ()=>{\n overflowMenu = undefined;\n };\n const 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 const removeItem = (itemId)=>{\n if (!overflowItems[itemId]) {\n return;\n }\n const item = overflowItems[itemId];\n visibleItemQueue.remove(itemId);\n invisibleItemQueue.remove(itemId);\n if (item.groupId) {\n groupManager.removeItem(item.id, item.groupId);\n item.element.removeAttribute(DATA_OVERFLOW_GROUP);\n }\n sizeCache.delete(item.element);\n delete overflowItems[itemId];\n update();\n };\n const disconnect = ()=>{\n disposeResizeObserver();\n // reset flags\n container = undefined;\n observing = false;\n forceDispatch = true;\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 return {\n addItem,\n disconnect,\n forceUpdate,\n observe,\n removeItem,\n update,\n addOverflowMenu,\n removeOverflowMenu,\n addDivider,\n removeDivider\n };\n}\nconst createGroupManager = ()=>{\n const groupVisibility = {};\n const groups = {};\n function updateGroupVisibility(groupId) {\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) {\n return groupVisibility[groupId] === 'visible' || groupVisibility[groupId] === 'overflow';\n }\n return {\n groupVisibility: ()=>groupVisibility,\n isSingleItemVisible (itemId, groupId) {\n return isGroupVisible(groupId) && groups[groupId].visibleItemIds.has(itemId) && groups[groupId].visibleItemIds.size === 1;\n },\n addItem (itemId, groupId) {\n var _groups, _groupId;\n var _;\n (_ = (_groups = groups)[_groupId = groupId]) !== null && _ !== void 0 ? _ : _groups[_groupId] = {\n visibleItemIds: new Set(),\n invisibleItemIds: new Set()\n };\n groups[groupId].visibleItemIds.add(itemId);\n updateGroupVisibility(groupId);\n },\n removeItem (itemId, groupId) {\n groups[groupId].invisibleItemIds.delete(itemId);\n groups[groupId].visibleItemIds.delete(itemId);\n updateGroupVisibility(groupId);\n },\n showItem (itemId, groupId) {\n groups[groupId].invisibleItemIds.delete(itemId);\n groups[groupId].visibleItemIds.add(itemId);\n updateGroupVisibility(groupId);\n },\n hideItem (itemId, groupId) {\n groups[groupId].invisibleItemIds.add(itemId);\n groups[groupId].visibleItemIds.delete(itemId);\n updateGroupVisibility(groupId);\n }\n };\n};\n"],"names":["createOverflowManager","sizeCache","Map","container","overflowMenu","observing","forceDispatch","options","padding","overflowAxis","overflowDirection","minimumVisible","onUpdateItemVisibility","undefined","onUpdateOverflow","overflowItems","overflowDividers","disposeResizeObserver","getNextItem","queueToDequeue","queueToEnqueue","nextItem","dequeue","enqueue","groupManager","createGroupManager","compareItems","lt","rt","lte","rte","priority","positionStatusBit","Node","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_PRECEDING","element","compareDocumentPosition","getElementAxisSize","horizontal","vertical","el","has","set","get","getOffsetSize","bind","getClientSize","invisibleItemQueue","createPriorityQueue","a","b","visibleItemQueue","occupiedSize","totalItemSize","all","map","id","reduce","prev","current","totalDividerSize","Object","entries","groupVisibility","acc","state","overflowMenuSize","size","showItem","item","visible","groupId","isSingleItemVisible","_overflowDividers_item_groupId","removeAttribute","DATA_OVERFLOWING","hideItem","setAttribute","dispatchOverflowUpdate","visibleItemIds","invisibleItemIds","visibleItems","itemId","invisibleItems","processOverflowItems","clear","availableSize","visibleTop","peek","invisibleTop","i","forceUpdate","update","debounce","observe","observedContainer","userOptions","assign","values","forEach","observeResize","addItem","DATA_OVERFLOW_GROUP","addOverflowMenu","addDivider","divider","removeOverflowMenu","removeDivider","removeItem","remove","delete","disconnect","keys","dividerId","groups","updateGroupVisibility","group","isGroupVisible","_groups","_groupId","_","Set","add"],"mappings":";;;;+BAOoBA;;;eAAAA;;;wBAPkC;sCACxB;0BACL;+BACW;AAIzB,SAASA;IAChB,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,UAAU;QACZC,SAAS;QACTC,cAAc;QACdC,mBAAmB;QACnBC,gBAAgB;QAChBC,wBAAwB,IAAIC;QAC5BC,kBAAkB,IAAID;IAC1B;IACA,MAAME,gBAAgB,CAAC;IACvB,MAAMC,mBAAmB,CAAC;IAC1B,IAAIC,wBAAwB,IAAI;IAChC,MAAMC,cAAc,CAACC,gBAAgBC;QACjC,MAAMC,WAAWF,eAAeG,OAAO;QACvCF,eAAeG,OAAO,CAACF;QACvB,OAAON,aAAa,CAACM,SAAS;IAClC;IACA,MAAMG,eAAeC;IACrB,SAASC,aAAaC,EAAE,EAAEC,EAAE;QACxB,IAAI,CAACD,MAAM,CAACC,IAAI;YACZ,OAAO;QACX;QACA,MAAMC,MAAMd,aAAa,CAACY,GAAG;QAC7B,MAAMG,MAAMf,aAAa,CAACa,GAAG;QAC7B,IA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gB,CAAC0C,GAAG,CAACxC;YACrCgC,MAAM,CAAC3C,QAAQ,CAACQ,cAAc,CAAC+B,MAAM,CAAC5B;YACtCiC,sBAAsB5C;QAC1B;IACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/priority-overflow",
3
- "version": "9.1.8",
3
+ "version": "9.1.10",
4
4
  "description": "Vanilla JS utilities to implement overflow menus",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -45,5 +45,11 @@
45
45
  "require": "./lib-commonjs/index.js"
46
46
  },
47
47
  "./package.json": "./package.json"
48
- }
48
+ },
49
+ "files": [
50
+ "*.md",
51
+ "dist/*.d.ts",
52
+ "lib",
53
+ "lib-commonjs"
54
+ ]
49
55
  }
package/CHANGELOG.json DELETED
@@ -1,471 +0,0 @@
1
- {
2
- "name": "@fluentui/priority-overflow",
3
- "entries": [
4
- {
5
- "date": "Mon, 23 Oct 2023 09:48:54 GMT",
6
- "tag": "@fluentui/priority-overflow_v9.1.8",
7
- "version": "9.1.8",
8
- "comments": {
9
- "patch": [
10
- {
11
- "author": "lingfangao@hotmail.com",
12
- "package": "@fluentui/priority-overflow",
13
- "commit": "17dbeb93ab542e982942aef91ce3747acc8053c4",
14
- "comment": "fix: Use container window's resize observer"
15
- }
16
- ]
17
- }
18
- },
19
- {
20
- "date": "Tue, 26 Sep 2023 17:49:01 GMT",
21
- "tag": "@fluentui/priority-overflow_v9.1.7",
22
- "version": "9.1.7",
23
- "comments": {
24
- "patch": [
25
- {
26
- "author": "yuanboxue@microsoft.com",
27
- "package": "@fluentui/priority-overflow",
28
- "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d",
29
- "comment": "chore: trigger manual version bump after broken release"
30
- }
31
- ]
32
- }
33
- },
34
- {
35
- "date": "Tue, 26 Sep 2023 15:32:06 GMT",
36
- "tag": "@fluentui/priority-overflow_v9.1.6",
37
- "version": "9.1.6",
38
- "comments": {
39
- "patch": [
40
- {
41
- "author": "martinhochel@microsoft.com",
42
- "package": "@fluentui/priority-overflow",
43
- "commit": "e61473fa10195f6ebf2308205c1e72e91b711831",
44
- "comment": "fix: bump swc core to mitigate transpilation memory leaks"
45
- }
46
- ]
47
- }
48
- },
49
- {
50
- "date": "Tue, 05 Sep 2023 13:29:14 GMT",
51
- "tag": "@fluentui/priority-overflow_v9.1.5",
52
- "version": "9.1.5",
53
- "comments": {
54
- "patch": [
55
- {
56
- "author": "bernardo.sunderhus@gmail.com",
57
- "package": "@fluentui/priority-overflow",
58
- "commit": "b93c2ac22355b6cb6f33dd509c6cd9c21f4fffc8",
59
- "comment": "bumps @swc/helpers version to 0.5.1"
60
- }
61
- ]
62
- }
63
- },
64
- {
65
- "date": "Fri, 11 Aug 2023 12:14:24 GMT",
66
- "tag": "@fluentui/priority-overflow_v9.1.4",
67
- "version": "9.1.4",
68
- "comments": {
69
- "patch": [
70
- {
71
- "author": "vkozlova@microsoft.com",
72
- "package": "@fluentui/priority-overflow",
73
- "commit": "b52b54415c4d663885710fc113166be24d810742",
74
- "comment": "fix: flickering in Overflow"
75
- }
76
- ]
77
- }
78
- },
79
- {
80
- "date": "Wed, 09 Aug 2023 13:16:48 GMT",
81
- "tag": "@fluentui/priority-overflow_v9.1.3",
82
- "version": "9.1.3",
83
- "comments": {
84
- "patch": [
85
- {
86
- "author": "vkozlova@microsoft.com",
87
- "package": "@fluentui/priority-overflow",
88
- "commit": "6247214bde5df11e951247f0a6d1278cc98490ea",
89
- "comment": "fix: inaccurate calculation of size"
90
- }
91
- ]
92
- }
93
- },
94
- {
95
- "date": "Tue, 25 Jul 2023 13:29:15 GMT",
96
- "tag": "@fluentui/priority-overflow_v9.1.2",
97
- "version": "9.1.2",
98
- "comments": {
99
- "patch": [
100
- {
101
- "author": "lingfan.gao@microsoft.com",
102
- "package": "@fluentui/priority-overflow",
103
- "commit": "d8493a92520cacac29e9fe341a17d3595bc48343",
104
- "comment": "fix: Overflow update should run show/hide steps twice"
105
- }
106
- ]
107
- }
108
- },
109
- {
110
- "date": "Thu, 20 Jul 2023 18:27:25 GMT",
111
- "tag": "@fluentui/priority-overflow_v9.1.1",
112
- "version": "9.1.1",
113
- "comments": {
114
- "none": [
115
- {
116
- "author": "olfedias@microsoft.com",
117
- "package": "@fluentui/priority-overflow",
118
- "commit": "5a4b16715e8e929f11d8113f710e578ca73acaa6",
119
- "comment": "chore: migrate to monosize"
120
- }
121
- ]
122
- }
123
- },
124
- {
125
- "date": "Wed, 28 Jun 2023 11:12:22 GMT",
126
- "tag": "@fluentui/priority-overflow_v9.1.1",
127
- "version": "9.1.1",
128
- "comments": {
129
- "none": [
130
- {
131
- "author": "martinhochel@microsoft.com",
132
- "package": "@fluentui/priority-overflow",
133
- "commit": "fbe878e9c9785588197481f172c42c2c0a230292",
134
- "comment": "fix: update .npmignore to unify v8 packages and exclude project.json"
135
- }
136
- ]
137
- }
138
- },
139
- {
140
- "date": "Mon, 26 Jun 2023 09:53:53 GMT",
141
- "tag": "@fluentui/priority-overflow_v9.1.1",
142
- "version": "9.1.1",
143
- "comments": {
144
- "patch": [
145
- {
146
- "author": "vkozlova@microsoft.com",
147
- "package": "@fluentui/priority-overflow",
148
- "commit": "d93cb0b8cb80f56e753ad18c645eeb84a9c10256",
149
- "comment": "fix: remove overflow menu if the last overflowed item can take its place"
150
- }
151
- ]
152
- }
153
- },
154
- {
155
- "date": "Tue, 20 Jun 2023 12:38:54 GMT",
156
- "tag": "@fluentui/priority-overflow_v9.1.0",
157
- "version": "9.1.0",
158
- "comments": {
159
- "minor": [
160
- {
161
- "author": "vkozlova@microsoft.com",
162
- "package": "@fluentui/priority-overflow",
163
- "commit": "4dedf40597f3b5cfa63d8f2e28a79276eb816bda",
164
- "comment": "feat: Added support for custom divider"
165
- }
166
- ]
167
- }
168
- },
169
- {
170
- "date": "Wed, 24 May 2023 20:45:22 GMT",
171
- "tag": "@fluentui/priority-overflow_v9.0.3",
172
- "version": "9.0.3",
173
- "comments": {
174
- "none": [
175
- {
176
- "author": "olfedias@microsoft.com",
177
- "package": "@fluentui/priority-overflow",
178
- "commit": "69e0617a93cb44ef42f3bd19284b7dc5fe27fed3",
179
- "comment": "chore: update test-ssr script"
180
- }
181
- ]
182
- }
183
- },
184
- {
185
- "date": "Thu, 18 May 2023 00:39:01 GMT",
186
- "tag": "@fluentui/priority-overflow_v9.0.3",
187
- "version": "9.0.3",
188
- "comments": {
189
- "none": [
190
- {
191
- "author": "olfedias@microsoft.com",
192
- "package": "@fluentui/priority-overflow",
193
- "commit": "06cd515eda59a3078bfe32f9cc7c1f281cd20208",
194
- "comment": "chore: add test-ssr script to v9 packages"
195
- }
196
- ]
197
- }
198
- },
199
- {
200
- "date": "Fri, 12 May 2023 20:28:09 GMT",
201
- "tag": "@fluentui/priority-overflow_v9.0.3",
202
- "version": "9.0.3",
203
- "comments": {
204
- "patch": [
205
- {
206
- "author": "lingfangao@hotmail.com",
207
- "package": "@fluentui/priority-overflow",
208
- "commit": "4e90c5c22a67d62d9da2a9a186ad01051dad7f46",
209
- "comment": "fix: overflowManager should always dispatch initial state"
210
- },
211
- {
212
- "author": "olfedias@microsoft.com",
213
- "package": "@fluentui/priority-overflow",
214
- "commit": "c28decb23d191a0daaaf6d5d1832429715102129",
215
- "comment": "chore: exclude .swcrc from being published"
216
- }
217
- ],
218
- "none": [
219
- {
220
- "author": "martinhochel@microsoft.com",
221
- "package": "@fluentui/priority-overflow",
222
- "commit": "dbda7fa69e3000aaf8dd4a061e254ebd35198b8e",
223
- "comment": "fix: update npmignore files to fix npm8/node16 regression how npm publish works"
224
- }
225
- ]
226
- }
227
- },
228
- {
229
- "date": "Tue, 21 Mar 2023 21:23:19 GMT",
230
- "tag": "@fluentui/priority-overflow_v9.0.2",
231
- "version": "9.0.2",
232
- "comments": {
233
- "patch": [
234
- {
235
- "author": "tristan.watanabe@gmail.com",
236
- "package": "@fluentui/priority-overflow",
237
- "commit": "ead1c6d4c2ac3f3596b62b8cbc07b0a03041f11f",
238
- "comment": "fix: add node field to package.json exports map."
239
- },
240
- {
241
- "author": "tristan.watanabe@gmail.com",
242
- "package": "@fluentui/priority-overflow",
243
- "commit": "2fac1a139149bd13b76b1306207bc988dca9c72c",
244
- "comment": "chore: migrate to swc transpilation approach."
245
- }
246
- ]
247
- }
248
- },
249
- {
250
- "date": "Tue, 07 Feb 2023 14:13:08 GMT",
251
- "tag": "@fluentui/priority-overflow_v9.0.1",
252
- "version": "9.0.1",
253
- "comments": {
254
- "patch": [
255
- {
256
- "author": "lingfangao@hotmail.com",
257
- "package": "@fluentui/priority-overflow",
258
- "commit": "7274228423cc06749b72ab6a8a112db6f18f5378",
259
- "comment": "fix: New overflow items all always dispatch updates to subscriber"
260
- }
261
- ]
262
- }
263
- },
264
- {
265
- "date": "Wed, 18 Jan 2023 16:32:53 GMT",
266
- "tag": "@fluentui/priority-overflow_v9.0.0",
267
- "version": "9.0.0",
268
- "comments": {
269
- "patch": [
270
- {
271
- "author": "lingfangao@hotmail.com",
272
- "package": "@fluentui/priority-overflow",
273
- "commit": "e59f114d3244739a7917813ea02c59d53406d902",
274
- "comment": "Release as stable"
275
- }
276
- ]
277
- }
278
- },
279
- {
280
- "date": "Mon, 16 Jan 2023 08:38:54 GMT",
281
- "tag": "@fluentui/priority-overflow_v9.0.0-rc.2",
282
- "version": "9.0.0-rc.2",
283
- "comments": {
284
- "none": [
285
- {
286
- "author": "martinhochel@microsoft.com",
287
- "package": "@fluentui/priority-overflow",
288
- "commit": "64bb45980d68de1219c6b36a7db5363f0a9cff9f",
289
- "comment": "chore: migrate to packaged scripts"
290
- }
291
- ]
292
- }
293
- },
294
- {
295
- "date": "Mon, 09 Jan 2023 14:34:54 GMT",
296
- "tag": "@fluentui/priority-overflow_v9.0.0-rc.2",
297
- "version": "9.0.0-rc.2",
298
- "comments": {
299
- "prerelease": [
300
- {
301
- "author": "lingfangao@hotmail.com",
302
- "package": "@fluentui/priority-overflow",
303
- "commit": "2611ae5441e4bc702c4ce6404c7186f6c2de7cc3",
304
- "comment": "fix: Minimum visible overflow items should be respected"
305
- }
306
- ]
307
- }
308
- },
309
- {
310
- "date": "Wed, 04 Jan 2023 01:40:47 GMT",
311
- "tag": "@fluentui/priority-overflow_v9.0.0-rc.1",
312
- "version": "9.0.0-rc.1",
313
- "comments": {
314
- "none": [
315
- {
316
- "author": "martinhochel@microsoft.com",
317
- "package": "@fluentui/priority-overflow",
318
- "commit": "4ec2b998b294d6d9c3196d3d82893bdd97d0c105",
319
- "comment": "chore(scripts): move index.ts to to follow sub-folder domain packaging"
320
- },
321
- {
322
- "author": "martinhochel@microsoft.com",
323
- "package": "@fluentui/priority-overflow",
324
- "commit": "194b0cf0cc27c1c1233aa945f09b3ad29778d8ca",
325
- "comment": "chore(scripts): use for @fluentui/scripts version within all package.json"
326
- }
327
- ]
328
- }
329
- },
330
- {
331
- "date": "Thu, 17 Nov 2022 23:05:32 GMT",
332
- "tag": "@fluentui/priority-overflow_v9.0.0-rc.1",
333
- "version": "9.0.0-rc.1",
334
- "comments": {
335
- "prerelease": [
336
- {
337
- "author": "lingfangao@hotmail.com",
338
- "package": "@fluentui/priority-overflow",
339
- "commit": "80075557d5f685b21d145de3b538af5e80534feb",
340
- "comment": "feat: Bump to RC"
341
- }
342
- ],
343
- "none": [
344
- {
345
- "author": "martinhochel@microsoft.com",
346
- "package": "@fluentui/priority-overflow",
347
- "commit": "ea768501802d65d63ddc63fff3816fb6b5008ae4",
348
- "comment": "chore: update package scaffold"
349
- }
350
- ]
351
- }
352
- },
353
- {
354
- "date": "Fri, 11 Nov 2022 14:57:50 GMT",
355
- "tag": "@fluentui/priority-overflow_v9.0.0-beta.4",
356
- "version": "9.0.0-beta.4",
357
- "comments": {
358
- "prerelease": [
359
- {
360
- "author": "martinhochel@microsoft.com",
361
- "package": "@fluentui/priority-overflow",
362
- "commit": "b3907043bd8d7b650c55e8e7c3119b14f2606c38",
363
- "comment": "fix: create valid export maps"
364
- }
365
- ]
366
- }
367
- },
368
- {
369
- "date": "Tue, 25 Oct 2022 22:09:50 GMT",
370
- "tag": "@fluentui/priority-overflow_v9.0.0-beta.3",
371
- "version": "9.0.0-beta.3",
372
- "comments": {
373
- "none": [
374
- {
375
- "author": "tristan.watanabe@gmail.com",
376
- "package": "@fluentui/priority-overflow",
377
- "commit": "2435ea50f924fa6467a07829f3d4715e545d93c0",
378
- "comment": "chore: Migrate to new package structure."
379
- }
380
- ]
381
- }
382
- },
383
- {
384
- "date": "Tue, 25 Oct 2022 00:35:27 GMT",
385
- "tag": "@fluentui/priority-overflow_v9.0.0-beta.3",
386
- "version": "9.0.0-beta.3",
387
- "comments": {
388
- "none": [
389
- {
390
- "author": "miroslav.stastny@microsoft.com",
391
- "package": "@fluentui/priority-overflow",
392
- "commit": "6ced976a8d0e6a0e2e207da8fe0eb810e2bd19bc",
393
- "comment": "Update package readme"
394
- }
395
- ]
396
- }
397
- },
398
- {
399
- "date": "Thu, 13 Oct 2022 11:02:41 GMT",
400
- "tag": "@fluentui/priority-overflow_v9.0.0-beta.3",
401
- "version": "9.0.0-beta.3",
402
- "comments": {
403
- "prerelease": [
404
- {
405
- "author": "lingfangao@hotmail.com",
406
- "package": "@fluentui/priority-overflow",
407
- "commit": "6440417cb5db157acfb33d9f2c93de9bf7493791",
408
- "comment": "feat: Adds API to register overflow menus for better available space calculation"
409
- },
410
- {
411
- "author": "lingfangao@hotmail.com",
412
- "package": "@fluentui/priority-overflow",
413
- "commit": "d59683655d4d2a3775df4a2b41a09504cddd72ad",
414
- "comment": "new overflow items should only be enqueued while observing"
415
- }
416
- ]
417
- }
418
- },
419
- {
420
- "date": "Thu, 15 Sep 2022 09:49:45 GMT",
421
- "tag": "@fluentui/priority-overflow_v9.0.0-beta.2",
422
- "version": "9.0.0-beta.2",
423
- "comments": {
424
- "none": [
425
- {
426
- "author": "martinhochel@microsoft.com",
427
- "package": "@fluentui/priority-overflow",
428
- "commit": "e6cf183695d6d67a24e038c49a876224e5ed35e5",
429
- "comment": "chore: update package scaffold"
430
- },
431
- {
432
- "author": "martinhochel@microsoft.com",
433
- "package": "@fluentui/priority-overflow",
434
- "commit": "16aa65dcae8f75c6a221225fd0eb43800650ac66",
435
- "comment": "chore(priority-flow): re-generate api.md"
436
- }
437
- ]
438
- }
439
- },
440
- {
441
- "date": "Tue, 28 Jun 2022 15:14:10 GMT",
442
- "tag": "@fluentui/priority-overflow_v9.0.0-beta.2",
443
- "version": "9.0.0-beta.2",
444
- "comments": {
445
- "prerelease": [
446
- {
447
- "author": "lingfangao@hotmail.com",
448
- "package": "@fluentui/priority-overflow",
449
- "commit": "2da4428ae7d6e464c538b7ed10e425ce0e531144",
450
- "comment": "chore: Mark internal APIs with @internal"
451
- }
452
- ]
453
- }
454
- },
455
- {
456
- "date": "Mon, 23 May 2022 12:13:58 GMT",
457
- "tag": "@fluentui/priority-overflow_v9.0.0-beta.1",
458
- "version": "9.0.0-beta.1",
459
- "comments": {
460
- "prerelease": [
461
- {
462
- "author": "lingfangao@hotmail.com",
463
- "package": "@fluentui/priority-overflow",
464
- "commit": "4ae08d6ecf85ac29593ddc2abb23f8a073711b38",
465
- "comment": "feat: Initial beta release"
466
- }
467
- ]
468
- }
469
- }
470
- ]
471
- }