@fluentui/react-utilities 9.18.4 → 9.18.6

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/react-utilities
2
2
 
3
- This log was last generated on Fri, 15 Mar 2024 21:37:57 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 02 Apr 2024 09:41:20 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.18.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.18.6)
8
+
9
+ Tue, 02 Apr 2024 09:41:20 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.18.5..@fluentui/react-utilities_v9.18.6)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-shared-contexts to v9.16.0 ([PR #30926](https://github.com/microsoft/fluentui/pull/30926) by beachball)
15
+
16
+ ## [9.18.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.18.5)
17
+
18
+ Mon, 18 Mar 2024 19:50:46 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.18.4..@fluentui/react-utilities_v9.18.5)
20
+
21
+ ### Patches
22
+
23
+ - Bump @fluentui/react-shared-contexts to v9.15.2 ([PR #30600](https://github.com/microsoft/fluentui/pull/30600) by beachball)
24
+
7
25
  ## [9.18.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.18.4)
8
26
 
9
- Fri, 15 Mar 2024 21:37:57 GMT
27
+ Fri, 15 Mar 2024 21:43:49 GMT
10
28
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.18.3..@fluentui/react-utilities_v9.18.4)
11
29
 
12
30
  ### Patches
@@ -18,7 +18,4 @@
18
18
  // Since every single Omit clause in this case is being applied to a single union member there's no conflicts on keyof evaluation and in the second clause Omit<{ b: string }, 'a'> becomes { b: string },
19
19
  // so the result is {} | { b: string }, as expected.
20
20
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
21
- /**
22
- * @internal
23
- * If type T includes `null`, remove it and add `undefined` instead.
24
- */ export { };
21
+ export { };
@@ -1 +1 @@
1
- {"version":3,"sources":["types.ts"],"sourcesContent":["/**\n * Helper type that works similar to Omit,\n * but when modifying an union type it will distribute the omission to all the union members.\n *\n * See [distributive conditional types](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types) for more information\n */\n// Traditional Omit is basically equivalent to => Pick<T, Exclude<keyof T, K>>\n//\n// let's say we have Omit<{ a: string } | { b: string }, 'a'>\n// equivalent to: Pick<{ a: string } | { b: string }, Exclude<keyof ({ a: string } | { b: string }), 'a'>>\n// The expected result would be {} | { b: string }, the omission of 'a' from all the union members,\n// but keyof ({ a: string } | { b: string }) is never as they don't share common keys\n// so Exclude<never, 'a'> is never,\n// and Pick<{ a: string } | { b: string }, never> is {}.\n//\n// With DistributiveOmit on the other hand it becomes like this:\n// DistributiveOmit<{ a: string } | { b: string }, 'a'>\n// equivalent to: Omit<{ a: string }, 'a'> | Omit<{ b: string }, 'a'>\n// Since every single Omit clause in this case is being applied to a single union member there's no conflicts on keyof evaluation and in the second clause Omit<{ b: string }, 'a'> becomes { b: string },\n// so the result is {} | { b: string }, as expected.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type DistributiveOmit<T, K extends keyof any> = T extends unknown ? Omit<T, K> : T;\n\n/**\n * Converts a union type (`A | B | C`) to an intersection type (`A & B & C`)\n */\nexport type UnionToIntersection<U> = (U extends unknown ? (x: U) => U : never) extends (x: infer I) => U ? I : never;\n\n/**\n * @internal\n * If type T includes `null`, remove it and add `undefined` instead.\n */\nexport type ReplaceNullWithUndefined<T> = T extends null ? Exclude<T, null> | undefined : T;\n"],"names":[],"mappings":"AAAA;;;;;CAKC,GACD,8EAA8E;AAC9E,EAAE;AACF,6DAA6D;AAC7D,0GAA0G;AAC1G,mGAAmG;AACnG,qFAAqF;AACrF,oCAAoC;AACpC,wDAAwD;AACxD,EAAE;AACF,gEAAgE;AAChE,uDAAuD;AACvD,qEAAqE;AACrE,0MAA0M;AAC1M,oDAAoD;AACpD,8DAA8D;AAQ9D;;;CAGC,GACD,WAA4F"}
1
+ {"version":3,"sources":["types.ts"],"sourcesContent":["/**\n * Helper type that works similar to Omit,\n * but when modifying an union type it will distribute the omission to all the union members.\n *\n * See [distributive conditional types](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types) for more information\n */\n// Traditional Omit is basically equivalent to => Pick<T, Exclude<keyof T, K>>\n//\n// let's say we have Omit<{ a: string } | { b: string }, 'a'>\n// equivalent to: Pick<{ a: string } | { b: string }, Exclude<keyof ({ a: string } | { b: string }), 'a'>>\n// The expected result would be {} | { b: string }, the omission of 'a' from all the union members,\n// but keyof ({ a: string } | { b: string }) is never as they don't share common keys\n// so Exclude<never, 'a'> is never,\n// and Pick<{ a: string } | { b: string }, never> is {}.\n//\n// With DistributiveOmit on the other hand it becomes like this:\n// DistributiveOmit<{ a: string } | { b: string }, 'a'>\n// equivalent to: Omit<{ a: string }, 'a'> | Omit<{ b: string }, 'a'>\n// Since every single Omit clause in this case is being applied to a single union member there's no conflicts on keyof evaluation and in the second clause Omit<{ b: string }, 'a'> becomes { b: string },\n// so the result is {} | { b: string }, as expected.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type DistributiveOmit<T, K extends keyof any> = T extends unknown ? Omit<T, K> : T;\n\n/**\n * Converts a union type (`A | B | C`) to an intersection type (`A & B & C`)\n */\nexport type UnionToIntersection<U> = (U extends unknown ? (x: U) => U : never) extends (x: infer I) => U ? I : never;\n\n/**\n * @internal\n * If type T includes `null`, remove it and add `undefined` instead.\n */\nexport type ReplaceNullWithUndefined<T> = T extends null ? Exclude<T, null> | undefined : T;\n"],"names":[],"mappings":"AAAA;;;;;CAKC,GACD,8EAA8E;AAC9E,EAAE;AACF,6DAA6D;AAC7D,0GAA0G;AAC1G,mGAAmG;AACnG,qFAAqF;AACrF,oCAAoC;AACpC,wDAAwD;AACxD,EAAE;AACF,gEAAgE;AAChE,uDAAuD;AACvD,qEAAqE;AACrE,0MAA0M;AAC1M,oDAAoD;AACpD,8DAA8D;AAC9D,WAW4F"}
@@ -12,11 +12,11 @@ function _export(target, all) {
12
12
  });
13
13
  }
14
14
  _export(exports, {
15
- SLOT_ELEMENT_TYPE_SYMBOL: function() {
16
- return SLOT_ELEMENT_TYPE_SYMBOL;
17
- },
18
15
  SLOT_RENDER_FUNCTION_SYMBOL: function() {
19
16
  return SLOT_RENDER_FUNCTION_SYMBOL;
17
+ },
18
+ SLOT_ELEMENT_TYPE_SYMBOL: function() {
19
+ return SLOT_ELEMENT_TYPE_SYMBOL;
20
20
  }
21
21
  });
22
22
  const SLOT_RENDER_FUNCTION_SYMBOL = Symbol.for('fui.slotRenderFunction');
@@ -1 +1 @@
1
- {"version":3,"sources":["constants.js"],"sourcesContent":["/**\n * @internal\n * Internal reference for the render function\n */ export const SLOT_RENDER_FUNCTION_SYMBOL = Symbol.for('fui.slotRenderFunction');\n/**\n * @internal\n * Internal reference for the render function\n */ export const SLOT_ELEMENT_TYPE_SYMBOL = Symbol.for('fui.slotElementType');\n"],"names":["SLOT_ELEMENT_TYPE_SYMBOL","SLOT_RENDER_FUNCTION_SYMBOL","Symbol","for"],"mappings":"AAAA;;;CAGC;;;;;;;;;;;IAIgBA,wBAAwB;eAAxBA;;IAJAC,2BAA2B;eAA3BA;;;AAAN,MAAMA,8BAA8BC,OAAOC,GAAG,CAAC;AAI/C,MAAMH,2BAA2BE,OAAOC,GAAG,CAAC"}
1
+ {"version":3,"sources":["constants.js"],"sourcesContent":["/**\n * @internal\n * Internal reference for the render function\n */ export const SLOT_RENDER_FUNCTION_SYMBOL = Symbol.for('fui.slotRenderFunction');\n/**\n * @internal\n * Internal reference for the render function\n */ export const SLOT_ELEMENT_TYPE_SYMBOL = Symbol.for('fui.slotElementType');\n"],"names":["SLOT_RENDER_FUNCTION_SYMBOL","SLOT_ELEMENT_TYPE_SYMBOL","Symbol","for"],"mappings":"AAAA;;;CAGC;;;;;;;;;;;IAAgBA,2BAA2B;eAA3BA;;IAIAC,wBAAwB;eAAxBA;;;AAJN,MAAMD,8BAA8BE,OAAOC,GAAG,CAAC;AAI/C,MAAMF,2BAA2BC,OAAOC,GAAG,CAAC"}
@@ -9,14 +9,14 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- getEventClientCoords: function() {
13
- return getEventClientCoords;
12
+ isTouchEvent: function() {
13
+ return isTouchEvent;
14
14
  },
15
15
  isMouseEvent: function() {
16
16
  return isMouseEvent;
17
17
  },
18
- isTouchEvent: function() {
19
- return isTouchEvent;
18
+ getEventClientCoords: function() {
19
+ return getEventClientCoords;
20
20
  }
21
21
  });
22
22
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
@@ -1 +1 @@
1
- {"version":3,"sources":["mouseTouchHelpers.js"],"sourcesContent":["import * as React from 'react';\n/**\n * Returns true if event is a touch event. Useful when sharing logic between touch and mouse interactions.\n */ export function isTouchEvent(event) {\n return event.type.startsWith('touch');\n}\n/**\n * Returns true if event is a mouse event. Useful when sharing logic between touch and mouse interactions.\n */ export function isMouseEvent(event) {\n return event.type.startsWith('mouse') || [\n 'click',\n 'contextmenu',\n 'dblclick'\n ].indexOf(event.type) > -1;\n}\n/**\n * Returns an object with clientX, clientY for TouchOrMouseEvent.\n * Returns zeros in case the event is not a mouse or a touch event.\n */ export function getEventClientCoords(event) {\n if (isMouseEvent(event)) {\n return {\n clientX: event.clientX,\n clientY: event.clientY\n };\n } else if (isTouchEvent(event)) {\n return {\n clientX: event.touches[0].clientX,\n clientY: event.touches[0].clientY\n };\n } else {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error('@fluentui/react-utilities]: Unable to get clientX. Unknown event type.');\n }\n return {\n clientX: 0,\n clientY: 0\n };\n }\n}\n"],"names":["getEventClientCoords","isMouseEvent","isTouchEvent","event","type","startsWith","indexOf","clientX","clientY","touches","process","env","NODE_ENV","Error"],"mappings":";;;;;;;;;;;IAkBoBA,oBAAoB;eAApBA;;IAVAC,YAAY;eAAZA;;IALAC,YAAY;eAAZA;;;;iEAHG;AAGZ,SAASA,aAAaC,KAAK;IAClC,OAAOA,MAAMC,IAAI,CAACC,UAAU,CAAC;AACjC;AAGW,SAASJ,aAAaE,KAAK;IAClC,OAAOA,MAAMC,IAAI,CAACC,UAAU,CAAC,YAAY;QACrC;QACA;QACA;KACH,CAACC,OAAO,CAACH,MAAMC,IAAI,IAAI,CAAC;AAC7B;AAIW,SAASJ,qBAAqBG,KAAK;IAC1C,IAAIF,aAAaE,QAAQ;QACrB,OAAO;YACHI,SAASJ,MAAMI,OAAO;YACtBC,SAASL,MAAMK,OAAO;QAC1B;IACJ,OAAO,IAAIN,aAAaC,QAAQ;QAC5B,OAAO;YACHI,SAASJ,MAAMM,OAAO,CAAC,EAAE,CAACF,OAAO;YACjCC,SAASL,MAAMM,OAAO,CAAC,EAAE,CAACD,OAAO;QACrC;IACJ,OAAO;QACH,IAAIE,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;YACvC,MAAM,IAAIC,MAAM;QACpB;QACA,OAAO;YACHN,SAAS;YACTC,SAAS;QACb;IACJ;AACJ"}
1
+ {"version":3,"sources":["mouseTouchHelpers.js"],"sourcesContent":["import * as React from 'react';\n/**\n * Returns true if event is a touch event. Useful when sharing logic between touch and mouse interactions.\n */ export function isTouchEvent(event) {\n return event.type.startsWith('touch');\n}\n/**\n * Returns true if event is a mouse event. Useful when sharing logic between touch and mouse interactions.\n */ export function isMouseEvent(event) {\n return event.type.startsWith('mouse') || [\n 'click',\n 'contextmenu',\n 'dblclick'\n ].indexOf(event.type) > -1;\n}\n/**\n * Returns an object with clientX, clientY for TouchOrMouseEvent.\n * Returns zeros in case the event is not a mouse or a touch event.\n */ export function getEventClientCoords(event) {\n if (isMouseEvent(event)) {\n return {\n clientX: event.clientX,\n clientY: event.clientY\n };\n } else if (isTouchEvent(event)) {\n return {\n clientX: event.touches[0].clientX,\n clientY: event.touches[0].clientY\n };\n } else {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error('@fluentui/react-utilities]: Unable to get clientX. Unknown event type.');\n }\n return {\n clientX: 0,\n clientY: 0\n };\n }\n}\n"],"names":["isTouchEvent","isMouseEvent","getEventClientCoords","event","type","startsWith","indexOf","clientX","clientY","touches","process","env","NODE_ENV","Error"],"mappings":";;;;;;;;;;;IAGoBA,YAAY;eAAZA;;IAKAC,YAAY;eAAZA;;IAUAC,oBAAoB;eAApBA;;;;iEAlBG;AAGZ,SAASF,aAAaG,KAAK;IAClC,OAAOA,MAAMC,IAAI,CAACC,UAAU,CAAC;AACjC;AAGW,SAASJ,aAAaE,KAAK;IAClC,OAAOA,MAAMC,IAAI,CAACC,UAAU,CAAC,YAAY;QACrC;QACA;QACA;KACH,CAACC,OAAO,CAACH,MAAMC,IAAI,IAAI,CAAC;AAC7B;AAIW,SAASF,qBAAqBC,KAAK;IAC1C,IAAIF,aAAaE,QAAQ;QACrB,OAAO;YACHI,SAASJ,MAAMI,OAAO;YACtBC,SAASL,MAAMK,OAAO;QAC1B;IACJ,OAAO,IAAIR,aAAaG,QAAQ;QAC5B,OAAO;YACHI,SAASJ,MAAMM,OAAO,CAAC,EAAE,CAACF,OAAO;YACjCC,SAASL,MAAMM,OAAO,CAAC,EAAE,CAACD,OAAO;QACrC;IACJ,OAAO;QACH,IAAIE,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;YACvC,MAAM,IAAIC,MAAM;QACpB;QACA,OAAO;YACHN,SAAS;YACTC,SAAS;QACb;IACJ;AACJ"}
@@ -9,53 +9,11 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- IdPrefixProvider: function() {
13
- return _index1.IdPrefixProvider;
14
- },
15
- SLOT_ELEMENT_TYPE_SYMBOL: function() {
16
- return _index.SLOT_ELEMENT_TYPE_SYMBOL;
17
- },
18
- SLOT_RENDER_FUNCTION_SYMBOL: function() {
19
- return _index.SLOT_RENDER_FUNCTION_SYMBOL;
20
- },
21
- SSRProvider: function() {
22
- return _index2.SSRProvider;
23
- },
24
- applyTriggerPropsToChildren: function() {
25
- return _index4.applyTriggerPropsToChildren;
26
- },
27
- assertSlots: function() {
28
- return _index.assertSlots;
29
- },
30
- canUseDOM: function() {
31
- return _index2.canUseDOM;
32
- },
33
- clamp: function() {
34
- return _index3.clamp;
35
- },
36
- createPriorityQueue: function() {
37
- return _index3.createPriorityQueue;
38
- },
39
- elementContains: function() {
40
- return _index7.elementContains;
41
- },
42
- getEventClientCoords: function() {
43
- return _index5.getEventClientCoords;
44
- },
45
- getIntrinsicElementProps: function() {
46
- return _index.getIntrinsicElementProps;
47
- },
48
- getNativeElementProps: function() {
49
- return _index3.getNativeElementProps;
50
- },
51
- getParent: function() {
52
- return _index7.getParent;
53
- },
54
- getPartitionedNativeProps: function() {
55
- return _index3.getPartitionedNativeProps;
12
+ slot: function() {
13
+ return _index.slot;
56
14
  },
57
- getRTLSafeKey: function() {
58
- return _index3.getRTLSafeKey;
15
+ isSlot: function() {
16
+ return _index.isSlot;
59
17
  },
60
18
  getSlots: function() {
61
19
  return _index.getSlots;
@@ -63,48 +21,30 @@ _export(exports, {
63
21
  getSlotsNext: function() {
64
22
  return _index.getSlotsNext;
65
23
  },
66
- getTriggerChild: function() {
67
- return _index4.getTriggerChild;
68
- },
69
- isFluentTrigger: function() {
70
- return _index4.isFluentTrigger;
71
- },
72
- isHTMLElement: function() {
73
- return _index3.isHTMLElement;
74
- },
75
- isInteractiveHTMLElement: function() {
76
- return _index3.isInteractiveHTMLElement;
24
+ assertSlots: function() {
25
+ return _index.assertSlots;
77
26
  },
78
- isMouseEvent: function() {
79
- return _index5.isMouseEvent;
27
+ resolveShorthand: function() {
28
+ return _index.resolveShorthand;
80
29
  },
81
30
  isResolvedShorthand: function() {
82
31
  return _index.isResolvedShorthand;
83
32
  },
84
- isSlot: function() {
85
- return _index.isSlot;
33
+ getIntrinsicElementProps: function() {
34
+ return _index.getIntrinsicElementProps;
86
35
  },
87
- isTouchEvent: function() {
88
- return _index5.isTouchEvent;
36
+ SLOT_ELEMENT_TYPE_SYMBOL: function() {
37
+ return _index.SLOT_ELEMENT_TYPE_SYMBOL;
89
38
  },
90
- mergeCallbacks: function() {
91
- return _index3.mergeCallbacks;
39
+ SLOT_RENDER_FUNCTION_SYMBOL: function() {
40
+ return _index.SLOT_RENDER_FUNCTION_SYMBOL;
92
41
  },
93
- omit: function() {
94
- return _index3.omit;
42
+ IdPrefixProvider: function() {
43
+ return _index1.IdPrefixProvider;
95
44
  },
96
45
  resetIdsForTests: function() {
97
46
  return _index1.resetIdsForTests;
98
47
  },
99
- resolveShorthand: function() {
100
- return _index.resolveShorthand;
101
- },
102
- setVirtualParent: function() {
103
- return _index7.setVirtualParent;
104
- },
105
- slot: function() {
106
- return _index.slot;
107
- },
108
48
  useAnimationFrame: function() {
109
49
  return _index1.useAnimationFrame;
110
50
  },
@@ -123,9 +63,6 @@ _export(exports, {
123
63
  useId: function() {
124
64
  return _index1.useId;
125
65
  },
126
- useIsSSR: function() {
127
- return _index2.useIsSSR;
128
- },
129
66
  useIsomorphicLayoutEffect: function() {
130
67
  return _index1.useIsomorphicLayoutEffect;
131
68
  },
@@ -144,11 +81,74 @@ _export(exports, {
144
81
  useScrollbarWidth: function() {
145
82
  return _index1.useScrollbarWidth;
146
83
  },
84
+ useTimeout: function() {
85
+ return _index1.useTimeout;
86
+ },
87
+ canUseDOM: function() {
88
+ return _index2.canUseDOM;
89
+ },
90
+ useIsSSR: function() {
91
+ return _index2.useIsSSR;
92
+ },
93
+ SSRProvider: function() {
94
+ return _index2.SSRProvider;
95
+ },
96
+ clamp: function() {
97
+ return _index3.clamp;
98
+ },
99
+ getNativeElementProps: function() {
100
+ return _index3.getNativeElementProps;
101
+ },
102
+ getPartitionedNativeProps: function() {
103
+ return _index3.getPartitionedNativeProps;
104
+ },
105
+ getRTLSafeKey: function() {
106
+ return _index3.getRTLSafeKey;
107
+ },
108
+ mergeCallbacks: function() {
109
+ return _index3.mergeCallbacks;
110
+ },
111
+ isHTMLElement: function() {
112
+ return _index3.isHTMLElement;
113
+ },
114
+ isInteractiveHTMLElement: function() {
115
+ return _index3.isInteractiveHTMLElement;
116
+ },
117
+ omit: function() {
118
+ return _index3.omit;
119
+ },
120
+ createPriorityQueue: function() {
121
+ return _index3.createPriorityQueue;
122
+ },
123
+ applyTriggerPropsToChildren: function() {
124
+ return _index4.applyTriggerPropsToChildren;
125
+ },
126
+ getTriggerChild: function() {
127
+ return _index4.getTriggerChild;
128
+ },
129
+ isFluentTrigger: function() {
130
+ return _index4.isFluentTrigger;
131
+ },
132
+ isTouchEvent: function() {
133
+ return _index5.isTouchEvent;
134
+ },
135
+ isMouseEvent: function() {
136
+ return _index5.isMouseEvent;
137
+ },
138
+ getEventClientCoords: function() {
139
+ return _index5.getEventClientCoords;
140
+ },
147
141
  useSelection: function() {
148
142
  return _index6.useSelection;
149
143
  },
150
- useTimeout: function() {
151
- return _index1.useTimeout;
144
+ elementContains: function() {
145
+ return _index7.elementContains;
146
+ },
147
+ setVirtualParent: function() {
148
+ return _index7.setVirtualParent;
149
+ },
150
+ getParent: function() {
151
+ return _index7.getParent;
152
152
  }
153
153
  });
154
154
  const _index = require("./compose/index");
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export { slot, isSlot, // eslint-disable-next-line deprecation/deprecation\ngetSlots, // eslint-disable-next-line deprecation/deprecation\ngetSlotsNext, assertSlots, // eslint-disable-next-line deprecation/deprecation\nresolveShorthand, isResolvedShorthand, getIntrinsicElementProps, SLOT_ELEMENT_TYPE_SYMBOL, SLOT_RENDER_FUNCTION_SYMBOL } from './compose/index';\nexport { IdPrefixProvider, resetIdsForTests, useAnimationFrame, useControllableState, useEventCallback, useFirstMount, useForceUpdate, useId, useIsomorphicLayoutEffect, useMergedRefs, useOnClickOutside, useOnScrollOutside, usePrevious, useScrollbarWidth, useTimeout } from './hooks/index';\nexport { canUseDOM, useIsSSR, SSRProvider } from './ssr/index';\nexport { clamp, // eslint-disable-next-line deprecation/deprecation\ngetNativeElementProps, getPartitionedNativeProps, getRTLSafeKey, mergeCallbacks, isHTMLElement, isInteractiveHTMLElement, omit, createPriorityQueue } from './utils/index';\nexport { applyTriggerPropsToChildren, getTriggerChild, isFluentTrigger } from './trigger/index';\nexport { isTouchEvent, isMouseEvent, getEventClientCoords } from './events/index';\nexport { useSelection } from './selection/index';\nexport { elementContains, setVirtualParent, getParent } from './virtualParent/index';\n"],"names":["IdPrefixProvider","SLOT_ELEMENT_TYPE_SYMBOL","SLOT_RENDER_FUNCTION_SYMBOL","SSRProvider","applyTriggerPropsToChildren","assertSlots","canUseDOM","clamp","createPriorityQueue","elementContains","getEventClientCoords","getIntrinsicElementProps","getNativeElementProps","getParent","getPartitionedNativeProps","getRTLSafeKey","getSlots","getSlotsNext","getTriggerChild","isFluentTrigger","isHTMLElement","isInteractiveHTMLElement","isMouseEvent","isResolvedShorthand","isSlot","isTouchEvent","mergeCallbacks","omit","resetIdsForTests","resolveShorthand","setVirtualParent","slot","useAnimationFrame","useControllableState","useEventCallback","useFirstMount","useForceUpdate","useId","useIsSSR","useIsomorphicLayoutEffect","useMergedRefs","useOnClickOutside","useOnScrollOutside","usePrevious","useScrollbarWidth","useSelection","useTimeout"],"mappings":";;;;;;;;;;;IAISA,gBAAgB;eAAhBA,wBAAgB;;IADwCC,wBAAwB;eAAxBA,+BAAwB;;IAAEC,2BAA2B;eAA3BA,kCAA2B;;IAExFC,WAAW;eAAXA,mBAAW;;IAGhCC,2BAA2B;eAA3BA,mCAA2B;;IANtBC,WAAW;eAAXA,kBAAW;;IAGhBC,SAAS;eAATA,iBAAS;;IACTC,KAAK;eAALA,aAAK;;IACkHC,mBAAmB;eAAnBA,2BAAmB;;IAI1IC,eAAe;eAAfA,uBA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"sources":["index.js"],"sourcesContent":["export { slot, isSlot, // eslint-disable-next-line deprecation/deprecation\ngetSlots, // eslint-disable-next-line deprecation/deprecation\ngetSlotsNext, assertSlots, // eslint-disable-next-line deprecation/deprecation\nresolveShorthand, isResolvedShorthand, getIntrinsicElementProps, SLOT_ELEMENT_TYPE_SYMBOL, SLOT_RENDER_FUNCTION_SYMBOL } from './compose/index';\nexport { IdPrefixProvider, resetIdsForTests, useAnimationFrame, useControllableState, useEventCallback, useFirstMount, useForceUpdate, useId, useIsomorphicLayoutEffect, useMergedRefs, useOnClickOutside, useOnScrollOutside, usePrevious, useScrollbarWidth, useTimeout } from './hooks/index';\nexport { canUseDOM, useIsSSR, SSRProvider } from './ssr/index';\nexport { clamp, // eslint-disable-next-line deprecation/deprecation\ngetNativeElementProps, getPartitionedNativeProps, getRTLSafeKey, mergeCallbacks, isHTMLElement, isInteractiveHTMLElement, omit, createPriorityQueue } from './utils/index';\nexport { applyTriggerPropsToChildren, getTriggerChild, isFluentTrigger } from './trigger/index';\nexport { isTouchEvent, isMouseEvent, getEventClientCoords } from './events/index';\nexport { useSelection } from './selection/index';\nexport { elementContains, setVirtualParent, getParent } from './virtualParent/index';\n"],"names":["slot","isSlot","getSlots","getSlotsNext","assertSlots","resolveShorthand","isResolvedShorthand","getIntrinsicElementProps","SLOT_ELEMENT_TYPE_SYMBOL","SLOT_RENDER_FUNCTION_SYMBOL","IdPrefixProvider","resetIdsForTests","useAnimationFrame","useControllableState","useEventCallback","useFirstMount","useForceUpdate","useId","useIsomorphicLayoutEffect","useMergedRefs","useOnClickOutside","useOnScrollOutside","usePrevious","useScrollbarWidth","useTimeout","canUseDOM","useIsSSR","SSRProvider","clamp","getNativeElementProps","getPartitionedNativeProps","getRTLSafeKey","mergeCallbacks","isHTMLElement","isInteractiveHTMLElement","omit","createPriorityQueue","applyTriggerPropsToChildren","getTriggerChild","isFluentTrigger","isTouchEvent","isMouseEvent","getEventClientCoords","useSelection","elementContains","setVirtualParent","getParent"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eAAe;eAAfA,uBAAe;;IAC7DC,YAAY;eAAZA,oBAAY;;IAAEC,YAAY;eAAZA,oBAAY;;IAAEC,oBAAoB;eAApBA,4BAAoB;;IAChDC,YAAY;eAAZA,oBAAY;;IACZC,eAAe;eAAfA,uBAAe;;IAAEC,gBAAgB;eAAhBA,wBAAgB;;IAAEC,SAAS;eAATA,iBAAS;;;uBARyE;wBACmJ;wBAChO;wBAE0G;wBAC7E;wBACb;wBACpC;wBACgC"}
@@ -9,20 +9,20 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
+ defaultSSRContextValue: function() {
13
+ return defaultSSRContextValue;
14
+ },
12
15
  SSRContext: function() {
13
16
  return SSRContext;
14
17
  },
18
+ useSSRContext: function() {
19
+ return useSSRContext;
20
+ },
15
21
  SSRProvider: function() {
16
22
  return SSRProvider;
17
23
  },
18
- defaultSSRContextValue: function() {
19
- return defaultSSRContextValue;
20
- },
21
24
  useIsSSR: function() {
22
25
  return useIsSSR;
23
- },
24
- useSSRContext: function() {
25
- return useSSRContext;
26
26
  }
27
27
  });
28
28
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
@@ -1 +1 @@
1
- {"version":3,"sources":["SSRContext.js"],"sourcesContent":["import * as React from 'react';\nimport { canUseDOM } from './canUseDOM';\n/**\n * Default context value to use in case there is no SSRProvider. This is fine for client-only apps.\n *\n * @internal\n */ export const defaultSSRContextValue = {\n current: 0\n};\nexport const SSRContext = /*#__PURE__*/ React.createContext(undefined);\n/**\n * @internal\n */ export function useSSRContext() {\n var _React_useContext;\n return (_React_useContext = React.useContext(SSRContext)) !== null && _React_useContext !== void 0 ? _React_useContext : defaultSSRContextValue;\n}\n/**\n * When using SSR with Fluent UI, applications must be wrapped in an SSRProvider. This ensures that auto generated ids\n * are consistent between the client and server.\n *\n * @public\n */ export const SSRProvider = (props)=>{\n const [value] = React.useState(()=>({\n current: 0\n }));\n return /*#__PURE__*/ React.createElement(SSRContext.Provider, {\n value: value\n }, props.children);\n};\n/**\n * Returns whether the component is currently being server side rendered or hydrated on the client. Can be used to delay\n * browser-specific rendering until after hydration. May cause re-renders on a client when is used within SSRProvider.\n */ export function useIsSSR() {\n const isInSSRContext = useSSRContext() !== defaultSSRContextValue;\n const [isSSR, setIsSSR] = React.useState(isInSSRContext);\n // If we are rendering in a non-DOM environment, and there's no SSRProvider, provide a warning to hint to the\n // developer to add one.\n if (process.env.NODE_ENV !== 'production') {\n if (!isInSSRContext && !canUseDOM()) {\n // eslint-disable-next-line no-console\n console.error(`@fluentui/react-components [${useIsSSR.name}]:\nWhen server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.\n\n\nCheck documentation at https://aka.ms/fluentui-ssr.`);\n }\n }\n // If on the client, and the component was initially server rendered, then schedule a layout effect to update the\n // component after hydration.\n if (canUseDOM() && isInSSRContext) {\n // This if statement technically breaks the rules of hooks, but is safe because the condition never changes after\n // mounting.\n // eslint-disable-next-line\n React.useLayoutEffect(()=>{\n setIsSSR(false);\n }, []);\n }\n return isSSR;\n}\n"],"names":["SSRContext","SSRProvider","defaultSSRContextValue","useIsSSR","useSSRContext","current","React","createContext","undefined","_React_useContext","useContext","props","value","useState","createElement","Provider","children","isInSSRContext","isSSR","setIsSSR","process","env","NODE_ENV","canUseDOM","console","error","name","useLayoutEffect"],"mappings":";;;;;;;;;;;IASaA,UAAU;eAAVA;;IAYIC,WAAW;eAAXA;;IAfAC,sBAAsB;eAAtBA;;IA0BGC,QAAQ;eAARA;;IApBAC,aAAa;eAAbA;;;;iEAZG;2BACG;AAKf,MAAMF,yBAAyB;IACtCG,SAAS;AACb;AACO,MAAML,aAAa,WAAW,GAAGM,OAAMC,aAAa,CAACC;AAGjD,SAASJ;IAChB,IAAIK;IACJ,OAAO,AAACA,CAAAA,oBAAoBH,OAAMI,UAAU,CAACV,WAAU,MAAO,QAAQS,sBAAsB,KAAK,IAAIA,oBAAoBP;AAC7H;AAMW,MAAMD,cAAc,CAACU;IAC5B,MAAM,CAACC,MAAM,GAAGN,OAAMO,QAAQ,CAAC,IAAK,CAAA;YAC5BR,SAAS;QACb,CAAA;IACJ,OAAO,WAAW,GAAGC,OAAMQ,aAAa,CAACd,WAAWe,QAAQ,EAAE;QAC1DH,OAAOA;IACX,GAAGD,MAAMK,QAAQ;AACrB;AAIW,SAASb;IAChB,MAAMc,iBAAiBb,oBAAoBF;IAC3C,MAAM,CAACgB,OAAOC,SAAS,GAAGb,OAAMO,QAAQ,CAACI;IACzC,6GAA6G;IAC7G,wBAAwB;IACxB,IAAIG,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACvC,IAAI,CAACL,kBAAkB,CAACM,IAAAA,oBAAS,KAAI;YACjC,sCAAsC;YACtCC,QAAQC,KAAK,CAAC,CAAC,4BAA4B,EAAEtB,SAASuB,IAAI,CAAC;;;;mDAIpB,CAAC;QAC5C;IACJ;IACA,iHAAiH;IACjH,6BAA6B;IAC7B,IAAIH,IAAAA,oBAAS,OAAMN,gBAAgB;QAC/B,iHAAiH;QACjH,YAAY;QACZ,2BAA2B;QAC3BX,OAAMqB,eAAe,CAAC;YAClBR,SAAS;QACb,GAAG,EAAE;IACT;IACA,OAAOD;AACX"}
1
+ {"version":3,"sources":["SSRContext.js"],"sourcesContent":["import * as React from 'react';\nimport { canUseDOM } from './canUseDOM';\n/**\n * Default context value to use in case there is no SSRProvider. This is fine for client-only apps.\n *\n * @internal\n */ export const defaultSSRContextValue = {\n current: 0\n};\nexport const SSRContext = /*#__PURE__*/ React.createContext(undefined);\n/**\n * @internal\n */ export function useSSRContext() {\n var _React_useContext;\n return (_React_useContext = React.useContext(SSRContext)) !== null && _React_useContext !== void 0 ? _React_useContext : defaultSSRContextValue;\n}\n/**\n * When using SSR with Fluent UI, applications must be wrapped in an SSRProvider. This ensures that auto generated ids\n * are consistent between the client and server.\n *\n * @public\n */ export const SSRProvider = (props)=>{\n const [value] = React.useState(()=>({\n current: 0\n }));\n return /*#__PURE__*/ React.createElement(SSRContext.Provider, {\n value: value\n }, props.children);\n};\n/**\n * Returns whether the component is currently being server side rendered or hydrated on the client. Can be used to delay\n * browser-specific rendering until after hydration. May cause re-renders on a client when is used within SSRProvider.\n */ export function useIsSSR() {\n const isInSSRContext = useSSRContext() !== defaultSSRContextValue;\n const [isSSR, setIsSSR] = React.useState(isInSSRContext);\n // If we are rendering in a non-DOM environment, and there's no SSRProvider, provide a warning to hint to the\n // developer to add one.\n if (process.env.NODE_ENV !== 'production') {\n if (!isInSSRContext && !canUseDOM()) {\n // eslint-disable-next-line no-console\n console.error(`@fluentui/react-components [${useIsSSR.name}]:\nWhen server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.\n\n\nCheck documentation at https://aka.ms/fluentui-ssr.`);\n }\n }\n // If on the client, and the component was initially server rendered, then schedule a layout effect to update the\n // component after hydration.\n if (canUseDOM() && isInSSRContext) {\n // This if statement technically breaks the rules of hooks, but is safe because the condition never changes after\n // mounting.\n // eslint-disable-next-line\n React.useLayoutEffect(()=>{\n setIsSSR(false);\n }, []);\n }\n return isSSR;\n}\n"],"names":["defaultSSRContextValue","SSRContext","useSSRContext","SSRProvider","useIsSSR","current","React","createContext","undefined","_React_useContext","useContext","props","value","useState","createElement","Provider","children","isInSSRContext","isSSR","setIsSSR","process","env","NODE_ENV","canUseDOM","console","error","name","useLayoutEffect"],"mappings":";;;;;;;;;;;IAMiBA,sBAAsB;eAAtBA;;IAGJC,UAAU;eAAVA;;IAGOC,aAAa;eAAbA;;IASHC,WAAW;eAAXA;;IAWGC,QAAQ;eAARA;;;;iEAhCG;2BACG;AAKf,MAAMJ,yBAAyB;IACtCK,SAAS;AACb;AACO,MAAMJ,aAAa,WAAW,GAAGK,OAAMC,aAAa,CAACC;AAGjD,SAASN;IAChB,IAAIO;IACJ,OAAO,AAACA,CAAAA,oBAAoBH,OAAMI,UAAU,CAACT,WAAU,MAAO,QAAQQ,sBAAsB,KAAK,IAAIA,oBAAoBT;AAC7H;AAMW,MAAMG,cAAc,CAACQ;IAC5B,MAAM,CAACC,MAAM,GAAGN,OAAMO,QAAQ,CAAC,IAAK,CAAA;YAC5BR,SAAS;QACb,CAAA;IACJ,OAAO,WAAW,GAAGC,OAAMQ,aAAa,CAACb,WAAWc,QAAQ,EAAE;QAC1DH,OAAOA;IACX,GAAGD,MAAMK,QAAQ;AACrB;AAIW,SAASZ;IAChB,MAAMa,iBAAiBf,oBAAoBF;IAC3C,MAAM,CAACkB,OAAOC,SAAS,GAAGb,OAAMO,QAAQ,CAACI;IACzC,6GAA6G;IAC7G,wBAAwB;IACxB,IAAIG,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACvC,IAAI,CAACL,kBAAkB,CAACM,IAAAA,oBAAS,KAAI;YACjC,sCAAsC;YACtCC,QAAQC,KAAK,CAAC,CAAC,4BAA4B,EAAErB,SAASsB,IAAI,CAAC;;;;mDAIpB,CAAC;QAC5C;IACJ;IACA,iHAAiH;IACjH,6BAA6B;IAC7B,IAAIH,IAAAA,oBAAS,OAAMN,gBAAgB;QAC/B,iHAAiH;QACjH,YAAY;QACZ,2BAA2B;QAC3BX,OAAMqB,eAAe,CAAC;YAClBR,SAAS;QACb,GAAG,EAAE;IACT;IACA,OAAOD;AACX"}
@@ -9,92 +9,92 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- anchorProperties: function() {
13
- return anchorProperties;
14
- },
15
- audioProperties: function() {
16
- return audioProperties;
17
- },
18
12
  baseElementEvents: function() {
19
13
  return baseElementEvents;
20
14
  },
21
15
  baseElementProperties: function() {
22
16
  return baseElementProperties;
23
17
  },
24
- buttonProperties: function() {
25
- return buttonProperties;
26
- },
27
- colGroupProperties: function() {
28
- return colGroupProperties;
18
+ microdataProperties: function() {
19
+ return microdataProperties;
29
20
  },
30
- colProperties: function() {
31
- return colProperties;
21
+ htmlElementProperties: function() {
22
+ return htmlElementProperties;
32
23
  },
33
- dialogProperties: function() {
34
- return dialogProperties;
24
+ labelProperties: function() {
25
+ return labelProperties;
35
26
  },
36
- divProperties: function() {
37
- return divProperties;
27
+ audioProperties: function() {
28
+ return audioProperties;
38
29
  },
39
- fieldsetProperties: function() {
40
- return fieldsetProperties;
30
+ videoProperties: function() {
31
+ return videoProperties;
41
32
  },
42
- formProperties: function() {
43
- return formProperties;
33
+ olProperties: function() {
34
+ return olProperties;
44
35
  },
45
- getNativeProps: function() {
46
- return getNativeProps;
36
+ liProperties: function() {
37
+ return liProperties;
47
38
  },
48
- htmlElementProperties: function() {
49
- return htmlElementProperties;
39
+ anchorProperties: function() {
40
+ return anchorProperties;
50
41
  },
51
- iframeProperties: function() {
52
- return iframeProperties;
42
+ timeProperties: function() {
43
+ return timeProperties;
53
44
  },
54
- imgProperties: function() {
55
- return imgProperties;
45
+ buttonProperties: function() {
46
+ return buttonProperties;
56
47
  },
57
48
  inputProperties: function() {
58
49
  return inputProperties;
59
50
  },
60
- labelProperties: function() {
61
- return labelProperties;
62
- },
63
- liProperties: function() {
64
- return liProperties;
65
- },
66
- microdataProperties: function() {
67
- return microdataProperties;
51
+ textAreaProperties: function() {
52
+ return textAreaProperties;
68
53
  },
69
- olProperties: function() {
70
- return olProperties;
54
+ selectProperties: function() {
55
+ return selectProperties;
71
56
  },
72
57
  optionProperties: function() {
73
58
  return optionProperties;
74
59
  },
75
- selectProperties: function() {
76
- return selectProperties;
77
- },
78
60
  tableProperties: function() {
79
61
  return tableProperties;
80
62
  },
63
+ trProperties: function() {
64
+ return trProperties;
65
+ },
66
+ thProperties: function() {
67
+ return thProperties;
68
+ },
81
69
  tdProperties: function() {
82
70
  return tdProperties;
83
71
  },
84
- textAreaProperties: function() {
85
- return textAreaProperties;
72
+ colGroupProperties: function() {
73
+ return colGroupProperties;
86
74
  },
87
- thProperties: function() {
88
- return thProperties;
75
+ colProperties: function() {
76
+ return colProperties;
89
77
  },
90
- timeProperties: function() {
91
- return timeProperties;
78
+ fieldsetProperties: function() {
79
+ return fieldsetProperties;
92
80
  },
93
- trProperties: function() {
94
- return trProperties;
81
+ formProperties: function() {
82
+ return formProperties;
95
83
  },
96
- videoProperties: function() {
97
- return videoProperties;
84
+ iframeProperties: function() {
85
+ return iframeProperties;
86
+ },
87
+ imgProperties: function() {
88
+ return imgProperties;
89
+ },
90
+ dialogProperties: function() {
91
+ return dialogProperties;
92
+ },
93
+ divProperties: function() {
94
+ return divProperties;
95
+ },
96
+ getNativeProps: function() {
97
+ return getNativeProps;
98
98
  }
99
99
  });
100
100
  const toObjectMap = (...items)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["properties.js"],"sourcesContent":["const toObjectMap = (...items)=>{\n const result = {};\n for (const item of items){\n const keys = Array.isArray(item) ? item : Object.keys(item);\n for (const key of keys){\n result[key] = 1;\n }\n }\n return result;\n};\n/**\n * An array of events that are allowed on every html element type.\n *\n * @public\n */ export const baseElementEvents = toObjectMap([\n 'onAuxClick',\n 'onAnimationEnd',\n 'onAnimationStart',\n 'onCopy',\n 'onCut',\n 'onPaste',\n 'onCompositionEnd',\n 'onCompositionStart',\n 'onCompositionUpdate',\n 'onFocus',\n 'onFocusCapture',\n 'onBlur',\n 'onBlurCapture',\n 'onChange',\n 'onInput',\n 'onSubmit',\n 'onLoad',\n 'onError',\n 'onKeyDown',\n 'onKeyDownCapture',\n 'onKeyPress',\n 'onKeyUp',\n 'onAbort',\n 'onCanPlay',\n 'onCanPlayThrough',\n 'onDurationChange',\n 'onEmptied',\n 'onEncrypted',\n 'onEnded',\n 'onLoadedData',\n 'onLoadedMetadata',\n 'onLoadStart',\n 'onPause',\n 'onPlay',\n 'onPlaying',\n 'onProgress',\n 'onRateChange',\n 'onSeeked',\n 'onSeeking',\n 'onStalled',\n 'onSuspend',\n 'onTimeUpdate',\n 'onVolumeChange',\n 'onWaiting',\n 'onClick',\n 'onClickCapture',\n 'onContextMenu',\n 'onDoubleClick',\n 'onDrag',\n 'onDragEnd',\n 'onDragEnter',\n 'onDragExit',\n 'onDragLeave',\n 'onDragOver',\n 'onDragStart',\n 'onDrop',\n 'onMouseDown',\n 'onMouseDownCapture',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n 'onMouseUpCapture',\n 'onSelect',\n 'onTouchCancel',\n 'onTouchEnd',\n 'onTouchMove',\n 'onTouchStart',\n 'onScroll',\n 'onWheel',\n 'onPointerCancel',\n 'onPointerDown',\n 'onPointerEnter',\n 'onPointerLeave',\n 'onPointerMove',\n 'onPointerOut',\n 'onPointerOver',\n 'onPointerUp',\n 'onGotPointerCapture',\n 'onLostPointerCapture'\n]);\n/**\n * An array of element attributes which are allowed on every html element type.\n *\n * @public\n */ export const baseElementProperties = toObjectMap([\n 'accessKey',\n 'children',\n 'className',\n 'contentEditable',\n 'dir',\n 'draggable',\n 'hidden',\n 'htmlFor',\n 'id',\n 'lang',\n 'ref',\n 'role',\n 'style',\n 'tabIndex',\n 'title',\n 'translate',\n 'spellCheck',\n 'name'\n]);\n/**\n * An array of microdata attributes that are allowed on every html element type.\n *\n * @public\n */ export const microdataProperties = toObjectMap([\n 'itemID',\n 'itemProp',\n 'itemRef',\n 'itemScope',\n 'itemType'\n]);\n/**\n * An array of HTML element properties and events.\n *\n * @public\n */ export const htmlElementProperties = toObjectMap(baseElementProperties, baseElementEvents, microdataProperties);\n/**\n * An array of LABEL tag properties and events.\n *\n * @public\n */ export const labelProperties = toObjectMap(htmlElementProperties, [\n 'form'\n]);\n/**\n * An array of AUDIO tag properties and events.\n\n * @public\n */ export const audioProperties = toObjectMap(htmlElementProperties, [\n 'height',\n 'loop',\n 'muted',\n 'preload',\n 'src',\n 'width'\n]);\n/**\n * An array of VIDEO tag properties and events.\n *\n * @public\n */ export const videoProperties = toObjectMap(audioProperties, [\n 'poster'\n]);\n/**\n * An array of OL tag properties and events.\n *\n * @public\n */ export const olProperties = toObjectMap(htmlElementProperties, [\n 'start'\n]);\n/**\n * An array of LI tag properties and events.\n *\n * @public\n */ export const liProperties = toObjectMap(htmlElementProperties, [\n 'value'\n]);\n/**\n * An array of A tag properties and events.\n *\n * @public\n */ export const anchorProperties = toObjectMap(htmlElementProperties, [\n 'download',\n 'href',\n 'hrefLang',\n 'media',\n 'rel',\n 'target',\n 'type'\n]);\n/**\n * An array of TIME tag properties and events.\n *\n * @public\n */ export const timeProperties = toObjectMap(htmlElementProperties, [\n 'dateTime'\n]);\n/**\n * An array of BUTTON tag properties and events.\n *\n * @public\n */ export const buttonProperties = toObjectMap(htmlElementProperties, [\n 'autoFocus',\n 'disabled',\n 'form',\n 'formAction',\n 'formEncType',\n 'formMethod',\n 'formNoValidate',\n 'formTarget',\n 'type',\n 'value'\n]);\n/**\n * An array of INPUT tag properties and events.\n *\n * @public\n */ export const inputProperties = toObjectMap(buttonProperties, [\n 'accept',\n 'alt',\n 'autoCapitalize',\n 'autoComplete',\n 'checked',\n 'dirname',\n 'form',\n 'height',\n 'inputMode',\n 'list',\n 'max',\n 'maxLength',\n 'min',\n 'multiple',\n 'pattern',\n 'placeholder',\n 'readOnly',\n 'required',\n 'src',\n 'step',\n 'size',\n 'type',\n 'value',\n 'width'\n]);\n/**\n * An array of TEXTAREA tag properties and events.\n *\n * @public\n */ export const textAreaProperties = toObjectMap(buttonProperties, [\n 'autoCapitalize',\n 'cols',\n 'dirname',\n 'form',\n 'maxLength',\n 'placeholder',\n 'readOnly',\n 'required',\n 'rows',\n 'wrap'\n]);\n/**\n * An array of SELECT tag properties and events.\n *\n * @public\n */ export const selectProperties = toObjectMap(buttonProperties, [\n 'form',\n 'multiple',\n 'required'\n]);\nexport const optionProperties = toObjectMap(htmlElementProperties, [\n 'selected',\n 'value'\n]);\n/**\n * An array of TABLE tag properties and events.\n *\n * @public\n */ export const tableProperties = toObjectMap(htmlElementProperties, [\n 'cellPadding',\n 'cellSpacing'\n]);\n/**\n * An array of TR tag properties and events.\n *\n * @public\n */ export const trProperties = htmlElementProperties;\n/**\n * An array of TH tag properties and events.\n *\n * @public\n */ export const thProperties = toObjectMap(htmlElementProperties, [\n 'colSpan',\n 'rowSpan',\n 'scope'\n]);\n/**\n * An array of TD tag properties and events.\n *\n * @public\n */ export const tdProperties = toObjectMap(htmlElementProperties, [\n 'colSpan',\n 'headers',\n 'rowSpan',\n 'scope'\n]);\nexport const colGroupProperties = toObjectMap(htmlElementProperties, [\n 'span'\n]);\nexport const colProperties = toObjectMap(htmlElementProperties, [\n 'span'\n]);\n/**\n * An array of FIELDSET tag properties and events.\n *\n * @public\n */ export const fieldsetProperties = toObjectMap(htmlElementProperties, [\n 'disabled',\n 'form'\n]);\n/**\n * An array of FORM tag properties and events.\n *\n * @public\n */ export const formProperties = toObjectMap(htmlElementProperties, [\n 'acceptCharset',\n 'action',\n 'encType',\n 'encType',\n 'method',\n 'noValidate',\n 'target'\n]);\n/**\n * An array of IFRAME tag properties and events.\n *\n * @public\n */ export const iframeProperties = toObjectMap(htmlElementProperties, [\n 'allow',\n 'allowFullScreen',\n 'allowPaymentRequest',\n 'allowTransparency',\n 'csp',\n 'height',\n 'importance',\n 'referrerPolicy',\n 'sandbox',\n 'src',\n 'srcDoc',\n 'width'\n]);\n/**\n * An array of IMAGE tag properties and events.\n *\n * @public\n */ export const imgProperties = toObjectMap(htmlElementProperties, [\n 'alt',\n 'crossOrigin',\n 'height',\n 'src',\n 'srcSet',\n 'useMap',\n 'width'\n]);\n/**\n * An array of DIALOG tag properties and events.\n *\n * @public\n */ export const dialogProperties = toObjectMap(htmlElementProperties, [\n 'open',\n 'onCancel',\n 'onClose'\n]);\n/**\n * An array of DIV tag properties and events.\n *\n * @public\n */ export const divProperties = htmlElementProperties;\n/**\n * Gets native supported props for an html element provided the allowance set. Use one of the property\n * sets defined (divProperties, buttonPropertes, etc) to filter out supported properties from a given\n * props set. Note that all data- and aria- prefixed attributes will be allowed.\n * NOTE: getNativeProps should always be applied first when adding props to a react component. The\n * non-native props should be applied second. This will prevent getNativeProps from overriding your custom props.\n * For example, if props passed to getNativeProps has an onClick function and getNativeProps is added to\n * the component after an onClick function is added, then the getNativeProps onClick will override it.\n *\n * @public\n * @param props - The unfiltered input props\n * @param allowedPropNames - The array or record of allowed prop names.\n * @param excludedPropNames\n * @returns The filtered props\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeProps(// eslint-disable-next-line @typescript-eslint/no-explicit-any\nprops, allowedPropNames, excludedPropNames) {\n // It'd be great to properly type this while allowing 'aria-` and 'data-' attributes like TypeScript does for\n // JSX attributes, but that ability is hardcoded into the TS compiler with no analog in TypeScript typings.\n // Then we'd be able to enforce props extends native props (including aria- and data- attributes), and then\n // return native props.\n // We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797\n const isArray = Array.isArray(allowedPropNames);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result = {};\n const keys = Object.keys(props);\n for (const key of keys){\n const isNativeProp = !isArray && allowedPropNames[key] || isArray && allowedPropNames.indexOf(key) >= 0 || key.indexOf('data-') === 0 || key.indexOf('aria-') === 0;\n if (isNativeProp && (!excludedPropNames || (excludedPropNames === null || excludedPropNames === void 0 ? void 0 : excludedPropNames.indexOf(key)) === -1)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result[key] = props[key];\n }\n }\n return result;\n}\n"],"names":["anchorProperties","audioProperties","baseElementEvents","baseElementProperties","buttonProperties","colGroupProperties","colProperties","dialogProperties","divProperties","fieldsetProperties","formProperties","getNativeProps","htmlElementProperties","iframeProperties","imgProperties","inputProperties","labelProperties","liProperties","microdataProperties","olProperties","optionProperties","selectProperties","tableProperties","tdProperties","textAreaProperties","thProperties","timeProperties","trProperties","videoProperties","toObjectMap","items","result","item","keys","Array","isArray","Object","key","props","allowedPropNames","excludedPropNames","isNativeProp","indexOf"],"mappings":";;;;;;;;;;;IAsLiBA,gBAAgB;eAAhBA;;IAjCAC,eAAe;eAAfA;;IAvIAC,iBAAiB;eAAjBA;;IAwFAC,qBAAqB;eAArBA;;IAoGAC,gBAAgB;eAAhBA;;IAuGJ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A;IACA;IACA;IACA;IACA;CACH;AAKU,MAAM1B,wBAAwB0B,YAAY;IACjD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMX,sBAAsBW,YAAY;IAC/C;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMjB,wBAAwBiB,YAAY1B,uBAAuBD,mBAAmBgB;AAKpF,MAAMF,kBAAkBa,YAAYjB,uBAAuB;IAClE;CACH;AAKU,MAAMX,kBAAkB4B,YAAYjB,uBAAuB;IAClE;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMgB,kBAAkBC,YAAY5B,iBAAiB;IAC5D;CACH;AAKU,MAAMkB,eAAeU,YAAYjB,uBAAuB;IAC/D;CACH;AAKU,MAAMK,eAAeY,YAAYjB,uBAAuB;IAC/D;CACH;AAKU,MAAMZ,mBAAmB6B,YAAYjB,uBAAuB;IACnE;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMc,iBAAiBG,YAAYjB,uBAAuB;IACjE;CACH;AAKU,MAAMR,mBAAmByB,YAAYjB,uBAAuB;IACnE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMG,kBAAkBc,YAAYzB,kBAAkB;IAC7D;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMoB,qBAAqBK,YAAYzB,kBAAkB;IAChE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMiB,mBAAmBQ,YAAYzB,kBAAkB;IAC9D;IACA;IACA;CACH;AACM,MAAMgB,mBAAmBS,YAAYjB,uBAAuB;IAC/D;IACA;CACH;AAKU,MAAMU,kBAAkBO,YAAYjB,uBAAuB;IAClE;IACA;CACH;AAKU,MAAMe,eAAef;AAKrB,M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vJ,8DAA8D;YAC9DN,MAAM,CAACM,IAAI,GAAGC,KAAK,CAACD,IAAI;QAC5B;IACJ;IACA,OAAON;AACX"}
1
+ {"version":3,"sources":["properties.js"],"sourcesContent":["const toObjectMap = (...items)=>{\n const result = {};\n for (const item of items){\n const keys = Array.isArray(item) ? item : Object.keys(item);\n for (const key of keys){\n result[key] = 1;\n }\n }\n return result;\n};\n/**\n * An array of events that are allowed on every html element type.\n *\n * @public\n */ export const baseElementEvents = toObjectMap([\n 'onAuxClick',\n 'onAnimationEnd',\n 'onAnimationStart',\n 'onCopy',\n 'onCut',\n 'onPaste',\n 'onCompositionEnd',\n 'onCompositionStart',\n 'onCompositionUpdate',\n 'onFocus',\n 'onFocusCapture',\n 'onBlur',\n 'onBlurCapture',\n 'onChange',\n 'onInput',\n 'onSubmit',\n 'onLoad',\n 'onError',\n 'onKeyDown',\n 'onKeyDownCapture',\n 'onKeyPress',\n 'onKeyUp',\n 'onAbort',\n 'onCanPlay',\n 'onCanPlayThrough',\n 'onDurationChange',\n 'onEmptied',\n 'onEncrypted',\n 'onEnded',\n 'onLoadedData',\n 'onLoadedMetadata',\n 'onLoadStart',\n 'onPause',\n 'onPlay',\n 'onPlaying',\n 'onProgress',\n 'onRateChange',\n 'onSeeked',\n 'onSeeking',\n 'onStalled',\n 'onSuspend',\n 'onTimeUpdate',\n 'onVolumeChange',\n 'onWaiting',\n 'onClick',\n 'onClickCapture',\n 'onContextMenu',\n 'onDoubleClick',\n 'onDrag',\n 'onDragEnd',\n 'onDragEnter',\n 'onDragExit',\n 'onDragLeave',\n 'onDragOver',\n 'onDragStart',\n 'onDrop',\n 'onMouseDown',\n 'onMouseDownCapture',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n 'onMouseUpCapture',\n 'onSelect',\n 'onTouchCancel',\n 'onTouchEnd',\n 'onTouchMove',\n 'onTouchStart',\n 'onScroll',\n 'onWheel',\n 'onPointerCancel',\n 'onPointerDown',\n 'onPointerEnter',\n 'onPointerLeave',\n 'onPointerMove',\n 'onPointerOut',\n 'onPointerOver',\n 'onPointerUp',\n 'onGotPointerCapture',\n 'onLostPointerCapture'\n]);\n/**\n * An array of element attributes which are allowed on every html element type.\n *\n * @public\n */ export const baseElementProperties = toObjectMap([\n 'accessKey',\n 'children',\n 'className',\n 'contentEditable',\n 'dir',\n 'draggable',\n 'hidden',\n 'htmlFor',\n 'id',\n 'lang',\n 'ref',\n 'role',\n 'style',\n 'tabIndex',\n 'title',\n 'translate',\n 'spellCheck',\n 'name'\n]);\n/**\n * An array of microdata attributes that are allowed on every html element type.\n *\n * @public\n */ export const microdataProperties = toObjectMap([\n 'itemID',\n 'itemProp',\n 'itemRef',\n 'itemScope',\n 'itemType'\n]);\n/**\n * An array of HTML element properties and events.\n *\n * @public\n */ export const htmlElementProperties = toObjectMap(baseElementProperties, baseElementEvents, microdataProperties);\n/**\n * An array of LABEL tag properties and events.\n *\n * @public\n */ export const labelProperties = toObjectMap(htmlElementProperties, [\n 'form'\n]);\n/**\n * An array of AUDIO tag properties and events.\n\n * @public\n */ export const audioProperties = toObjectMap(htmlElementProperties, [\n 'height',\n 'loop',\n 'muted',\n 'preload',\n 'src',\n 'width'\n]);\n/**\n * An array of VIDEO tag properties and events.\n *\n * @public\n */ export const videoProperties = toObjectMap(audioProperties, [\n 'poster'\n]);\n/**\n * An array of OL tag properties and events.\n *\n * @public\n */ export const olProperties = toObjectMap(htmlElementProperties, [\n 'start'\n]);\n/**\n * An array of LI tag properties and events.\n *\n * @public\n */ export const liProperties = toObjectMap(htmlElementProperties, [\n 'value'\n]);\n/**\n * An array of A tag properties and events.\n *\n * @public\n */ export const anchorProperties = toObjectMap(htmlElementProperties, [\n 'download',\n 'href',\n 'hrefLang',\n 'media',\n 'rel',\n 'target',\n 'type'\n]);\n/**\n * An array of TIME tag properties and events.\n *\n * @public\n */ export const timeProperties = toObjectMap(htmlElementProperties, [\n 'dateTime'\n]);\n/**\n * An array of BUTTON tag properties and events.\n *\n * @public\n */ export const buttonProperties = toObjectMap(htmlElementProperties, [\n 'autoFocus',\n 'disabled',\n 'form',\n 'formAction',\n 'formEncType',\n 'formMethod',\n 'formNoValidate',\n 'formTarget',\n 'type',\n 'value'\n]);\n/**\n * An array of INPUT tag properties and events.\n *\n * @public\n */ export const inputProperties = toObjectMap(buttonProperties, [\n 'accept',\n 'alt',\n 'autoCapitalize',\n 'autoComplete',\n 'checked',\n 'dirname',\n 'form',\n 'height',\n 'inputMode',\n 'list',\n 'max',\n 'maxLength',\n 'min',\n 'multiple',\n 'pattern',\n 'placeholder',\n 'readOnly',\n 'required',\n 'src',\n 'step',\n 'size',\n 'type',\n 'value',\n 'width'\n]);\n/**\n * An array of TEXTAREA tag properties and events.\n *\n * @public\n */ export const textAreaProperties = toObjectMap(buttonProperties, [\n 'autoCapitalize',\n 'cols',\n 'dirname',\n 'form',\n 'maxLength',\n 'placeholder',\n 'readOnly',\n 'required',\n 'rows',\n 'wrap'\n]);\n/**\n * An array of SELECT tag properties and events.\n *\n * @public\n */ export const selectProperties = toObjectMap(buttonProperties, [\n 'form',\n 'multiple',\n 'required'\n]);\nexport const optionProperties = toObjectMap(htmlElementProperties, [\n 'selected',\n 'value'\n]);\n/**\n * An array of TABLE tag properties and events.\n *\n * @public\n */ export const tableProperties = toObjectMap(htmlElementProperties, [\n 'cellPadding',\n 'cellSpacing'\n]);\n/**\n * An array of TR tag properties and events.\n *\n * @public\n */ export const trProperties = htmlElementProperties;\n/**\n * An array of TH tag properties and events.\n *\n * @public\n */ export const thProperties = toObjectMap(htmlElementProperties, [\n 'colSpan',\n 'rowSpan',\n 'scope'\n]);\n/**\n * An array of TD tag properties and events.\n *\n * @public\n */ export const tdProperties = toObjectMap(htmlElementProperties, [\n 'colSpan',\n 'headers',\n 'rowSpan',\n 'scope'\n]);\nexport const colGroupProperties = toObjectMap(htmlElementProperties, [\n 'span'\n]);\nexport const colProperties = toObjectMap(htmlElementProperties, [\n 'span'\n]);\n/**\n * An array of FIELDSET tag properties and events.\n *\n * @public\n */ export const fieldsetProperties = toObjectMap(htmlElementProperties, [\n 'disabled',\n 'form'\n]);\n/**\n * An array of FORM tag properties and events.\n *\n * @public\n */ export const formProperties = toObjectMap(htmlElementProperties, [\n 'acceptCharset',\n 'action',\n 'encType',\n 'encType',\n 'method',\n 'noValidate',\n 'target'\n]);\n/**\n * An array of IFRAME tag properties and events.\n *\n * @public\n */ export const iframeProperties = toObjectMap(htmlElementProperties, [\n 'allow',\n 'allowFullScreen',\n 'allowPaymentRequest',\n 'allowTransparency',\n 'csp',\n 'height',\n 'importance',\n 'referrerPolicy',\n 'sandbox',\n 'src',\n 'srcDoc',\n 'width'\n]);\n/**\n * An array of IMAGE tag properties and events.\n *\n * @public\n */ export const imgProperties = toObjectMap(htmlElementProperties, [\n 'alt',\n 'crossOrigin',\n 'height',\n 'src',\n 'srcSet',\n 'useMap',\n 'width'\n]);\n/**\n * An array of DIALOG tag properties and events.\n *\n * @public\n */ export const dialogProperties = toObjectMap(htmlElementProperties, [\n 'open',\n 'onCancel',\n 'onClose'\n]);\n/**\n * An array of DIV tag properties and events.\n *\n * @public\n */ export const divProperties = htmlElementProperties;\n/**\n * Gets native supported props for an html element provided the allowance set. Use one of the property\n * sets defined (divProperties, buttonPropertes, etc) to filter out supported properties from a given\n * props set. Note that all data- and aria- prefixed attributes will be allowed.\n * NOTE: getNativeProps should always be applied first when adding props to a react component. The\n * non-native props should be applied second. This will prevent getNativeProps from overriding your custom props.\n * For example, if props passed to getNativeProps has an onClick function and getNativeProps is added to\n * the component after an onClick function is added, then the getNativeProps onClick will override it.\n *\n * @public\n * @param props - The unfiltered input props\n * @param allowedPropNames - The array or record of allowed prop names.\n * @param excludedPropNames\n * @returns The filtered props\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeProps(// eslint-disable-next-line @typescript-eslint/no-explicit-any\nprops, allowedPropNames, excludedPropNames) {\n // It'd be great to properly type this while allowing 'aria-` and 'data-' attributes like TypeScript does for\n // JSX attributes, but that ability is hardcoded into the TS compiler with no analog in TypeScript typings.\n // Then we'd be able to enforce props extends native props (including aria- and data- attributes), and then\n // return native props.\n // We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797\n const isArray = Array.isArray(allowedPropNames);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result = {};\n const keys = Object.keys(props);\n for (const key of keys){\n const isNativeProp = !isArray && allowedPropNames[key] || isArray && allowedPropNames.indexOf(key) >= 0 || key.indexOf('data-') === 0 || key.indexOf('aria-') === 0;\n if (isNativeProp && (!excludedPropNames || (excludedPropNames === null || excludedPropNames === void 0 ? void 0 : excludedPropNames.indexOf(key)) === -1)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result[key] = props[key];\n }\n }\n return result;\n}\n"],"names":["baseElementEvents","baseElementProperties","microdataProperties","htmlElementProperties","labelProperties","audioProperties","videoProperties","olProperties","liProperties","anchorProperties","timeProperties","buttonProperties","inputProperties","textAreaProperties","selectProperties","optionProperties","tableProperties","trProperties","thProperties","tdProperties","colGroupProperties","colProperties","fieldsetProperties","formProperties","iframeProperties","imgProperties","dialogProperties","divProperties","getNativeProps","toObjectMap","items","result","item","keys","Array","isArray","Object","key","props","allowedPropNames","excludedPropNames","isNativeProp","indexOf"],"mappings":";;;;;;;;;;;IAciBA,iBAAiB;eAAjBA;;IAwFAC,qBAAqB;eAArBA;;IAwBAC,mBAAmB;eAAnBA;;IAWAC,qBAAqB;eAArBA;;IAKAC,eAAe;eAAfA;;IAOAC,eAAe;eAAfA;;IAYAC,eAAe;eAAfA;;IAOAC,YAAY;eAAZA;;IAOAC,YAAY;eAAZA;;IAOAC,gBAAgB;eAAhBA;;IAaAC,cAAc;eAAdA;;IAOAC,gBAAgB;eAAhBA;;IAgBAC,eAAe;eAAfA;;IA8BAC,kBAAkB;eAAlBA;;IAgBAC,gBAAgB;eAAhBA;;IAKJC,gBAAgB;eAAhBA;;IAQIC,eAAe;eAAfA;;IAQAC,YAAY;eAAZA;;IAKAC,YAAY;eAAZA;;IASAC,YAAY;eAAZA;;IAMJC,kBAAkB;eAAlBA;;IAGAC,aAAa;eAAbA;;IAOIC,kBAAkB;eAAlBA;;IAQAC,cAAc;eAAdA;;IAaAC,gBAAgB;eAAhBA;;IAkBAC,aAAa;eAAbA;;IAaAC,gBAAgB;eAAhBA;;IASAC,aAAa;eAAbA;;IAgBDC,cAAc;eAAdA;;;AAxYhB,MAAMC,cAAc,CAAC,GAAGC;IACpB,MAAMC,SAAS,CAAC;IAChB,KAAK,MAAMC,QAAQF,MAAM;QACrB,MAAMG,OAAOC,MAAMC,OAAO,CAACH,QAAQA,OAAOI,OAAOH,IAAI,CAACD;QACtD,KAAK,MAAMK,OAAOJ,KAAK;YACnBF,MAAM,CAACM,IAAI,GAAG;QAClB;IACJ;IACA,OAAON;AACX;AAKW,MAAM/B,oBAAoB6B,YAAY;IAC7C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAM5B,wBAAwB4B,YAAY;IACjD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAM3B,sBAAsB2B,YAAY;IAC/C;IACA;IACA;IACA;IACA;CACH;AAKU,MAAM1B,wBAAwB0B,YAAY5B,uBAAuBD,mBAAm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;IACA;CACH;AAKU,MAAMoB,iBAAiBM,YAAY1B,uBAAuB;IACjE;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMqB,mBAAmBK,YAAY1B,uBAAuB;IACnE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMsB,gBAAgBI,YAAY1B,uBAAuB;IAChE;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMuB,mBAAmBG,YAAY1B,uBAAuB;IACnE;IACA;IACA;CACH;AAKU,MAAMwB,gBAAgBxB;AAgB1B,SAASyB,eAChBU,KAAK,EAAEC,gBAAgB,EAAEC,iBAAiB;IACtC,6GAA6G;IAC7G,2GAA2G;IAC3G,2GAA2G;IAC3G,uBAAuB;IACvB,0GAA0G;IAC1G,MAAML,UAAUD,MAAMC,OAAO,CAACI;IAC9B,8DAA8D;IAC9D,MAAMR,SAAS,CAAC;IAChB,MAAME,OAAOG,OAAOH,IAAI,CAACK;IACzB,KAAK,MAAMD,OAAOJ,KAAK;QACnB,MAAMQ,eAAe,CAACN,WAAWI,gBAAgB,CAACF,IAAI,IAAIF,WAAWI,iBAAiBG,OAAO,CAACL,QAAQ,KAAKA,IAAIK,OAAO,CAAC,aAAa,KAAKL,IAAIK,OAAO,CAAC,aAAa;QAClK,IAAID,gBAAiB,CAAA,CAACD,qBAAqB,AAACA,CAAAA,sBAAsB,QAAQA,sBAAsB,KAAK,IAAI,KAAK,IAAIA,kBAAkBE,OAAO,CAACL,IAAG,MAAO,CAAC,CAAA,GAAI;YACvJ,8DAA8D;YAC9DN,MAAM,CAACM,IAAI,GAAGC,KAAK,CAACD,IAAI;QAC5B;IACJ;IACA,OAAON;AACX"}
@@ -18,10 +18,7 @@
18
18
  // Since every single Omit clause in this case is being applied to a single union member there's no conflicts on keyof evaluation and in the second clause Omit<{ b: string }, 'a'> becomes { b: string },
19
19
  // so the result is {} | { b: string }, as expected.
20
20
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
21
- /**
22
- * @internal
23
- * If type T includes `null`, remove it and add `undefined` instead.
24
- */ "use strict";
21
+ "use strict";
25
22
  Object.defineProperty(exports, "__esModule", {
26
23
  value: true
27
24
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["types.js"],"sourcesContent":["/**\n * Helper type that works similar to Omit,\n * but when modifying an union type it will distribute the omission to all the union members.\n *\n * See [distributive conditional types](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types) for more information\n */ // Traditional Omit is basically equivalent to => Pick<T, Exclude<keyof T, K>>\n//\n// let's say we have Omit<{ a: string } | { b: string }, 'a'>\n// equivalent to: Pick<{ a: string } | { b: string }, Exclude<keyof ({ a: string } | { b: string }), 'a'>>\n// The expected result would be {} | { b: string }, the omission of 'a' from all the union members,\n// but keyof ({ a: string } | { b: string }) is never as they don't share common keys\n// so Exclude<never, 'a'> is never,\n// and Pick<{ a: string } | { b: string }, never> is {}.\n//\n// With DistributiveOmit on the other hand it becomes like this:\n// DistributiveOmit<{ a: string } | { b: string }, 'a'>\n// equivalent to: Omit<{ a: string }, 'a'> | Omit<{ b: string }, 'a'>\n// Since every single Omit clause in this case is being applied to a single union member there's no conflicts on keyof evaluation and in the second clause Omit<{ b: string }, 'a'> becomes { b: string },\n// so the result is {} | { b: string }, as expected.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n/**\n * @internal\n * If type T includes `null`, remove it and add `undefined` instead.\n */ export { };\n"],"names":[],"mappings":"AAAA;;;;;CAKC,GAAG,8EAA8E;AAClF,EAAE;AACF,6DAA6D;AAC7D,0GAA0G;AAC1G,mGAAmG;AACnG,qFAAqF;AACrF,oCAAoC;AACpC,wDAAwD;AACxD,EAAE;AACF,gEAAgE;AAChE,uDAAuD;AACvD,qEAAqE;AACrE,0MAA0M;AAC1M,oDAAoD;AACpD,8DAA8D;AAC9D;;;CAGC"}
1
+ {"version":3,"sources":["types.js"],"sourcesContent":["/**\n * Helper type that works similar to Omit,\n * but when modifying an union type it will distribute the omission to all the union members.\n *\n * See [distributive conditional types](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types) for more information\n */ // Traditional Omit is basically equivalent to => Pick<T, Exclude<keyof T, K>>\n//\n// let's say we have Omit<{ a: string } | { b: string }, 'a'>\n// equivalent to: Pick<{ a: string } | { b: string }, Exclude<keyof ({ a: string } | { b: string }), 'a'>>\n// The expected result would be {} | { b: string }, the omission of 'a' from all the union members,\n// but keyof ({ a: string } | { b: string }) is never as they don't share common keys\n// so Exclude<never, 'a'> is never,\n// and Pick<{ a: string } | { b: string }, never> is {}.\n//\n// With DistributiveOmit on the other hand it becomes like this:\n// DistributiveOmit<{ a: string } | { b: string }, 'a'>\n// equivalent to: Omit<{ a: string }, 'a'> | Omit<{ b: string }, 'a'>\n// Since every single Omit clause in this case is being applied to a single union member there's no conflicts on keyof evaluation and in the second clause Omit<{ b: string }, 'a'> becomes { b: string },\n// so the result is {} | { b: string }, as expected.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport { };\n"],"names":[],"mappings":"AAAA;;;;;CAKC,GAAG,8EAA8E;AAClF,EAAE;AACF,6DAA6D;AAC7D,0GAA0G;AAC1G,mGAAmG;AACnG,qFAAqF;AACrF,oCAAoC;AACpC,wDAAwD;AACxD,EAAE;AACF,gEAAgE;AAChE,uDAAuD;AACvD,qEAAqE;AACrE,0MAA0M;AAC1M,oDAAoD;AACpD,8DAA8D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-utilities",
3
- "version": "9.18.4",
3
+ "version": "9.18.6",
4
4
  "description": "A set of general React-specific utilities.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@fluentui/keyboard-keys": "^9.0.7",
35
- "@fluentui/react-shared-contexts": "^9.15.1",
35
+ "@fluentui/react-shared-contexts": "^9.16.0",
36
36
  "@swc/helpers": "^0.5.1"
37
37
  },
38
38
  "peerDependencies": {