@fluentui/react-utilities 9.9.1 → 9.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/CHANGELOG.json +16 -1
  2. package/CHANGELOG.md +11 -2
  3. package/dist/index.d.ts +1 -1
  4. package/lib/compose/constants.js +1 -2
  5. package/lib/compose/constants.js.map +1 -1
  6. package/lib/compose/getSlots.js +40 -36
  7. package/lib/compose/getSlots.js.map +1 -1
  8. package/lib/compose/getSlotsNext.js +30 -28
  9. package/lib/compose/getSlotsNext.js.map +1 -1
  10. package/lib/compose/index.js +0 -1
  11. package/lib/compose/index.js.map +1 -1
  12. package/lib/compose/isResolvedShorthand.js +2 -4
  13. package/lib/compose/isResolvedShorthand.js.map +1 -1
  14. package/lib/compose/resolveShorthand.js +21 -26
  15. package/lib/compose/resolveShorthand.js.map +1 -1
  16. package/lib/compose/types.js +0 -1
  17. package/lib/compose/types.js.map +1 -1
  18. package/lib/events/index.js +0 -1
  19. package/lib/events/index.js.map +1 -1
  20. package/lib/events/mouseTouchHelpers.js +27 -27
  21. package/lib/events/mouseTouchHelpers.js.map +1 -1
  22. package/lib/hooks/index.js +0 -1
  23. package/lib/hooks/index.js.map +1 -1
  24. package/lib/hooks/useControllableState.js +55 -42
  25. package/lib/hooks/useControllableState.js.map +1 -1
  26. package/lib/hooks/useEventCallback.js +15 -13
  27. package/lib/hooks/useEventCallback.js.map +1 -1
  28. package/lib/hooks/useFirstMount.js +7 -9
  29. package/lib/hooks/useFirstMount.js.map +1 -1
  30. package/lib/hooks/useForceUpdate.js +2 -4
  31. package/lib/hooks/useForceUpdate.js.map +1 -1
  32. package/lib/hooks/useId.js +32 -29
  33. package/lib/hooks/useId.js.map +1 -1
  34. package/lib/hooks/useIsomorphicLayoutEffect.js +1 -2
  35. package/lib/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  36. package/lib/hooks/useMergedRefs.js +17 -18
  37. package/lib/hooks/useMergedRefs.js.map +1 -1
  38. package/lib/hooks/useOnClickOutside.js +110 -114
  39. package/lib/hooks/useOnClickOutside.js.map +1 -1
  40. package/lib/hooks/useOnScrollOutside.js +25 -29
  41. package/lib/hooks/useOnScrollOutside.js.map +1 -1
  42. package/lib/hooks/usePrevious.js +8 -8
  43. package/lib/hooks/usePrevious.js.map +1 -1
  44. package/lib/hooks/useScrollbarWidth.js +24 -26
  45. package/lib/hooks/useScrollbarWidth.js.map +1 -1
  46. package/lib/hooks/useTimeout.js +22 -19
  47. package/lib/hooks/useTimeout.js.map +1 -1
  48. package/lib/index.js +0 -1
  49. package/lib/index.js.map +1 -1
  50. package/lib/ssr/SSRContext.js +40 -39
  51. package/lib/ssr/SSRContext.js.map +1 -1
  52. package/lib/ssr/canUseDOM.js +3 -5
  53. package/lib/ssr/canUseDOM.js.map +1 -1
  54. package/lib/ssr/index.js +0 -1
  55. package/lib/ssr/index.js.map +1 -1
  56. package/lib/trigger/applyTriggerPropsToChildren.js +20 -23
  57. package/lib/trigger/applyTriggerPropsToChildren.js.map +1 -1
  58. package/lib/trigger/getTriggerChild.js +7 -10
  59. package/lib/trigger/getTriggerChild.js.map +1 -1
  60. package/lib/trigger/index.js +0 -1
  61. package/lib/trigger/index.js.map +1 -1
  62. package/lib/trigger/isFluentTrigger.js +2 -4
  63. package/lib/trigger/isFluentTrigger.js.map +1 -1
  64. package/lib/trigger/types.js +0 -1
  65. package/lib/trigger/types.js.map +1 -1
  66. package/lib/utils/clamp.js +1 -2
  67. package/lib/utils/clamp.js.map +1 -1
  68. package/lib/utils/getNativeElementProps.js +38 -40
  69. package/lib/utils/getNativeElementProps.js.map +1 -1
  70. package/lib/utils/getRTLSafeKey.js +12 -13
  71. package/lib/utils/getRTLSafeKey.js.map +1 -1
  72. package/lib/utils/getReactCallbackName.js +16 -15
  73. package/lib/utils/getReactCallbackName.js.map +1 -1
  74. package/lib/utils/index.js +0 -1
  75. package/lib/utils/index.js.map +1 -1
  76. package/lib/utils/isHTMLElement.js +5 -6
  77. package/lib/utils/isHTMLElement.js.map +1 -1
  78. package/lib/utils/isInteractiveHTMLElement.js +13 -17
  79. package/lib/utils/isInteractiveHTMLElement.js.map +1 -1
  80. package/lib/utils/mergeCallbacks.js +5 -6
  81. package/lib/utils/mergeCallbacks.js.map +1 -1
  82. package/lib/utils/omit.js +7 -8
  83. package/lib/utils/omit.js.map +1 -1
  84. package/lib/utils/priorityQueue.js +85 -86
  85. package/lib/utils/priorityQueue.js.map +1 -1
  86. package/lib/utils/properties.js +290 -80
  87. package/lib/utils/properties.js.map +1 -1
  88. package/lib-commonjs/compose/constants.js +1 -3
  89. package/lib-commonjs/compose/constants.js.map +1 -1
  90. package/lib-commonjs/compose/getSlots.js +1 -3
  91. package/lib-commonjs/compose/getSlots.js.map +1 -1
  92. package/lib-commonjs/compose/getSlotsNext.js +2 -3
  93. package/lib-commonjs/compose/getSlotsNext.js.map +1 -1
  94. package/lib-commonjs/compose/index.js +0 -3
  95. package/lib-commonjs/compose/index.js.map +1 -1
  96. package/lib-commonjs/compose/isResolvedShorthand.js +1 -3
  97. package/lib-commonjs/compose/isResolvedShorthand.js.map +1 -1
  98. package/lib-commonjs/compose/resolveShorthand.js +1 -3
  99. package/lib-commonjs/compose/resolveShorthand.js.map +1 -1
  100. package/lib-commonjs/compose/types.js +0 -3
  101. package/lib-commonjs/compose/types.js.map +1 -1
  102. package/lib-commonjs/events/index.js +0 -3
  103. package/lib-commonjs/events/index.js.map +1 -1
  104. package/lib-commonjs/events/mouseTouchHelpers.js +1 -3
  105. package/lib-commonjs/events/mouseTouchHelpers.js.map +1 -1
  106. package/lib-commonjs/hooks/index.js +0 -3
  107. package/lib-commonjs/hooks/index.js.map +1 -1
  108. package/lib-commonjs/hooks/useControllableState.js +1 -3
  109. package/lib-commonjs/hooks/useControllableState.js.map +1 -1
  110. package/lib-commonjs/hooks/useEventCallback.js +1 -3
  111. package/lib-commonjs/hooks/useEventCallback.js.map +1 -1
  112. package/lib-commonjs/hooks/useFirstMount.js +1 -3
  113. package/lib-commonjs/hooks/useFirstMount.js.map +1 -1
  114. package/lib-commonjs/hooks/useForceUpdate.js +1 -3
  115. package/lib-commonjs/hooks/useForceUpdate.js.map +1 -1
  116. package/lib-commonjs/hooks/useId.js +1 -3
  117. package/lib-commonjs/hooks/useId.js.map +1 -1
  118. package/lib-commonjs/hooks/useIsomorphicLayoutEffect.js +1 -3
  119. package/lib-commonjs/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  120. package/lib-commonjs/hooks/useMergedRefs.js +2 -5
  121. package/lib-commonjs/hooks/useMergedRefs.js.map +1 -1
  122. package/lib-commonjs/hooks/useOnClickOutside.js +1 -3
  123. package/lib-commonjs/hooks/useOnClickOutside.js.map +1 -1
  124. package/lib-commonjs/hooks/useOnScrollOutside.js +1 -3
  125. package/lib-commonjs/hooks/useOnScrollOutside.js.map +1 -1
  126. package/lib-commonjs/hooks/usePrevious.js +1 -3
  127. package/lib-commonjs/hooks/usePrevious.js.map +1 -1
  128. package/lib-commonjs/hooks/useScrollbarWidth.js +2 -4
  129. package/lib-commonjs/hooks/useScrollbarWidth.js.map +1 -1
  130. package/lib-commonjs/hooks/useTimeout.js +1 -3
  131. package/lib-commonjs/hooks/useTimeout.js.map +1 -1
  132. package/lib-commonjs/index.js +0 -3
  133. package/lib-commonjs/index.js.map +1 -1
  134. package/lib-commonjs/ssr/SSRContext.js +1 -3
  135. package/lib-commonjs/ssr/SSRContext.js.map +1 -1
  136. package/lib-commonjs/ssr/canUseDOM.js +1 -3
  137. package/lib-commonjs/ssr/canUseDOM.js.map +1 -1
  138. package/lib-commonjs/ssr/index.js +0 -3
  139. package/lib-commonjs/ssr/index.js.map +1 -1
  140. package/lib-commonjs/trigger/applyTriggerPropsToChildren.js +1 -3
  141. package/lib-commonjs/trigger/applyTriggerPropsToChildren.js.map +1 -1
  142. package/lib-commonjs/trigger/getTriggerChild.js +2 -5
  143. package/lib-commonjs/trigger/getTriggerChild.js.map +1 -1
  144. package/lib-commonjs/trigger/index.js +0 -3
  145. package/lib-commonjs/trigger/index.js.map +1 -1
  146. package/lib-commonjs/trigger/isFluentTrigger.js +1 -3
  147. package/lib-commonjs/trigger/isFluentTrigger.js.map +1 -1
  148. package/lib-commonjs/trigger/types.js +0 -3
  149. package/lib-commonjs/trigger/types.js.map +1 -1
  150. package/lib-commonjs/utils/clamp.js +1 -3
  151. package/lib-commonjs/utils/clamp.js.map +1 -1
  152. package/lib-commonjs/utils/getNativeElementProps.js +1 -3
  153. package/lib-commonjs/utils/getNativeElementProps.js.map +1 -1
  154. package/lib-commonjs/utils/getRTLSafeKey.js +1 -3
  155. package/lib-commonjs/utils/getRTLSafeKey.js.map +1 -1
  156. package/lib-commonjs/utils/getReactCallbackName.js +1 -3
  157. package/lib-commonjs/utils/getReactCallbackName.js.map +1 -1
  158. package/lib-commonjs/utils/index.js +0 -3
  159. package/lib-commonjs/utils/index.js.map +1 -1
  160. package/lib-commonjs/utils/isHTMLElement.js +1 -3
  161. package/lib-commonjs/utils/isHTMLElement.js.map +1 -1
  162. package/lib-commonjs/utils/isInteractiveHTMLElement.js +1 -3
  163. package/lib-commonjs/utils/isInteractiveHTMLElement.js.map +1 -1
  164. package/lib-commonjs/utils/mergeCallbacks.js +1 -3
  165. package/lib-commonjs/utils/mergeCallbacks.js.map +1 -1
  166. package/lib-commonjs/utils/omit.js +1 -3
  167. package/lib-commonjs/utils/omit.js.map +1 -1
  168. package/lib-commonjs/utils/priorityQueue.js +5 -7
  169. package/lib-commonjs/utils/priorityQueue.js.map +1 -1
  170. package/lib-commonjs/utils/properties.js +28 -31
  171. package/lib-commonjs/utils/properties.js.map +1 -1
  172. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/ssr/canUseDOM.js"],"sourcesContent":["/**\n * Verifies if an application can use DOM.\n */export function canUseDOM() {\n return typeof window !== 'undefined' && !!(window.document &&\n // eslint-disable-next-line deprecation/deprecation\n window.document.createElement);\n}\n//# sourceMappingURL=canUseDOM.js.map"],"names":["canUseDOM","window","document","createElement"],"mappings":"AAAA;;CAEC;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,YAAY;IAC7B,OAAO,OAAOC,WAAW,eAAe,CAAC,CAAEA,CAAAA,OAAOC,QAAQ,IAC1D,mDAAmD;IACnDD,OAAOC,QAAQ,CAACC,aAAa,AAAD;AAC9B,EACA,qCAAqC"}
1
+ {"version":3,"sources":["canUseDOM.js"],"sourcesContent":["/**\n * Verifies if an application can use DOM.\n */ export function canUseDOM() {\n return typeof window !== 'undefined' && !!(window.document && // eslint-disable-next-line deprecation/deprecation\n window.document.createElement);\n}\n"],"names":["canUseDOM","window","document","createElement"],"mappings":"AAAA;;CAEC;;;;+BAAmBA;;aAAAA;;AAAT,SAASA,YAAY;IAC5B,OAAO,OAAOC,WAAW,eAAe,CAAC,CAAEA,CAAAA,OAAOC,QAAQ,IAAI,mDAAmD;IACjHD,OAAOC,QAAQ,CAACC,aAAa,AAAD;AAChC"}
@@ -5,6 +5,3 @@ Object.defineProperty(exports, "__esModule", {
5
5
  const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
6
  _exportStar(require("./canUseDOM"), exports);
7
7
  _exportStar(require("./SSRContext"), exports);
8
- //# sourceMappingURL=index.js.map
9
-
10
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/ssr/index.js"],"sourcesContent":["export * from './canUseDOM';\nexport * from './SSRContext';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;CACd,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './canUseDOM';\nexport * from './SSRContext';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA"}
@@ -33,6 +33,4 @@ function applyTriggerPropsToChildren(children, triggerChildProps) {
33
33
  } else {
34
34
  return /*#__PURE__*/ _react.cloneElement(child, triggerProps);
35
35
  }
36
- } //# sourceMappingURL=applyTriggerPropsToChildren.js.map
37
-
38
- //# sourceMappingURL=applyTriggerPropsToChildren.js.map
36
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/trigger/applyTriggerPropsToChildren.js"],"sourcesContent":["import * as React from 'react';\nimport { isFluentTrigger } from './isFluentTrigger';\n/**\n * @internal\n * resolve the trigger props to the children, either by calling the render function, or cloning with the new props.\n */\nexport function applyTriggerPropsToChildren(children, triggerChildProps) {\n if (typeof children === 'function') {\n return children(triggerChildProps);\n } else if (children) {\n return cloneTriggerTree(children, triggerChildProps);\n }\n // Components in React should return either JSX elements or \"null\", otherwise React will throw:\n // Nothing was returned from render.\n // This usually means a return statement is missing. Or, to render nothing, return null.\n return children || null;\n}\n/**\n * Clones a React element tree, and applies the given props to the first grandchild that is not\n * a FluentTriggerComponent or React Fragment (the same element returned by {@link getTriggerChild}).\n */\nfunction cloneTriggerTree(child, triggerProps) {\n if (! /*#__PURE__*/React.isValidElement(child) || child.type === React.Fragment) {\n throw new Error('A trigger element must be a single element for this component. ' + \"Please ensure that you're not using React Fragments.\");\n }\n if (isFluentTrigger(child)) {\n const grandchild = cloneTriggerTree(child.props.children, triggerProps);\n return /*#__PURE__*/React.cloneElement(child, undefined, grandchild);\n } else {\n return /*#__PURE__*/React.cloneElement(child, triggerProps);\n }\n}\n//# sourceMappingURL=applyTriggerPropsToChildren.js.map"],"names":["applyTriggerPropsToChildren","children","triggerChildProps","cloneTriggerTree","child","triggerProps","React","isValidElement","type","Fragment","Error","isFluentTrigger","grandchild","props","cloneElement","undefined"],"mappings":";;;;+BAMgBA;;aAAAA;;;6DANO;iCACS;AAKzB,SAASA,4BAA4BC,QAAQ,EAAEC,iBAAiB,EAAE;IACvE,IAAI,OAAOD,aAAa,YAAY;QAClC,OAAOA,SAASC;IAClB,OAAO,IAAID,UAAU;QACnB,OAAOE,iBAAiBF,UAAUC;IACpC,CAAC;IACD,+FAA+F;IAC/F,sCAAsC;IACtC,0FAA0F;IAC1F,OAAOD,YAAY,IAAI;AACzB;AACA;;;CAGC,GACD,SAASE,iBAAiBC,KAAK,EAAEC,YAAY,EAAE;IAC7C,IAAI,CAAE,WAAW,GAAEC,OAAMC,cAAc,CAACH,UAAUA,MAAMI,IAAI,KAAKF,OAAMG,QAAQ,EAAE;QAC/E,MAAM,IAAIC,MAAM,oEAAoE,wDAAwD;IAC9I,CAAC;IACD,IAAIC,IAAAA,gCAAe,EAACP,QAAQ;QAC1B,MAAMQ,aAAaT,iBAAiBC,MAAMS,KAAK,CAACZ,QAAQ,EAAEI;QAC1D,OAAO,WAAW,GAAEC,OAAMQ,YAAY,CAACV,OAAOW,WAAWH;IAC3D,OAAO;QACL,OAAO,WAAW,GAAEN,OAAMQ,YAAY,CAACV,OAAOC;IAChD,CAAC;AACH,EACA,uDAAuD"}
1
+ {"version":3,"sources":["applyTriggerPropsToChildren.js"],"sourcesContent":["import * as React from 'react';\nimport { isFluentTrigger } from './isFluentTrigger';\n/**\n * @internal\n * resolve the trigger props to the children, either by calling the render function, or cloning with the new props.\n */ export function applyTriggerPropsToChildren(children, triggerChildProps) {\n if (typeof children === 'function') {\n return children(triggerChildProps);\n } else if (children) {\n return cloneTriggerTree(children, triggerChildProps);\n }\n // Components in React should return either JSX elements or \"null\", otherwise React will throw:\n // Nothing was returned from render.\n // This usually means a return statement is missing. Or, to render nothing, return null.\n return children || null;\n}\n/**\n * Clones a React element tree, and applies the given props to the first grandchild that is not\n * a FluentTriggerComponent or React Fragment (the same element returned by {@link getTriggerChild}).\n */ function cloneTriggerTree(child, triggerProps) {\n if (!React.isValidElement(child) || child.type === React.Fragment) {\n throw new Error('A trigger element must be a single element for this component. ' + \"Please ensure that you're not using React Fragments.\");\n }\n if (isFluentTrigger(child)) {\n const grandchild = cloneTriggerTree(child.props.children, triggerProps);\n return React.cloneElement(child, undefined, grandchild);\n } else {\n return React.cloneElement(child, triggerProps);\n }\n}\n"],"names":["applyTriggerPropsToChildren","children","triggerChildProps","cloneTriggerTree","child","triggerProps","React","isValidElement","type","Fragment","Error","isFluentTrigger","grandchild","props","cloneElement","undefined"],"mappings":";;;;+BAKoBA;;aAAAA;;;6DALG;iCACS;AAIrB,SAASA,4BAA4BC,QAAQ,EAAEC,iBAAiB,EAAE;IACzE,IAAI,OAAOD,aAAa,YAAY;QAChC,OAAOA,SAASC;IACpB,OAAO,IAAID,UAAU;QACjB,OAAOE,iBAAiBF,UAAUC;IACtC,CAAC;IACD,+FAA+F;IAC/F,sCAAsC;IACtC,0FAA0F;IAC1F,OAAOD,YAAY,IAAI;AAC3B;AACA;;;CAGC,GAAG,SAASE,iBAAiBC,KAAK,EAAEC,YAAY,EAAE;IAC/C,IAAI,eAACC,OAAMC,cAAc,CAACH,UAAUA,MAAMI,IAAI,KAAKF,OAAMG,QAAQ,EAAE;QAC/D,MAAM,IAAIC,MAAM,oEAAoE,wDAAwD;IAChJ,CAAC;IACD,IAAIC,IAAAA,gCAAe,EAACP,QAAQ;QACxB,MAAMQ,aAAaT,iBAAiBC,MAAMS,KAAK,CAACZ,QAAQ,EAAEI;QAC1D,qBAAOC,OAAMQ,YAAY,CAACV,OAAOW,WAAWH;IAChD,OAAO;QACH,qBAAON,OAAMQ,YAAY,CAACV,OAAOC;IACrC,CAAC;AACL"}
@@ -13,9 +13,6 @@ function getTriggerChild(children) {
13
13
  if (!/*#__PURE__*/ _react.isValidElement(children)) {
14
14
  return null;
15
15
  }
16
- return (0, _isFluentTrigger.isFluentTrigger)(children) ? getTriggerChild(// FIXME: This casting should be unnecessary as isFluentTrigger is a guard type method,
17
- // but for some reason it's failing on build
16
+ return (0, _isFluentTrigger.isFluentTrigger)(children) ? getTriggerChild(// but for some reason it's failing on build
18
17
  children.props.children) : children;
19
- } //# sourceMappingURL=getTriggerChild.js.map
20
-
21
- //# sourceMappingURL=getTriggerChild.js.map
18
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/trigger/getTriggerChild.js"],"sourcesContent":["import * as React from 'react';\nimport { isFluentTrigger } from './isFluentTrigger';\n/**\n * @internal\n * Gets the trigger element of a FluentTriggerComponent (such as Tooltip or MenuTrigger).\n *\n * In the case where the immediate child is itself a FluentTriggerComponent and/or React Fragment,\n * it returns the first descendant that is _not_ a FluentTriggerComponent or Fragment.\n * This allows multiple triggers to be stacked, and still apply their props to the actual trigger element.\n *\n * For example, the following returns `<div id=\"child\" />`:\n * ```jsx\n * getTriggerChild(\n * <Tooltip>\n * <MenuTrigger>\n * <div id=\"child\" />\n * </MenuTrigger>\n * </Tooltip>\n * );\n * ```\n *\n * In the case where the immediate child is not a valid element,\n * null is returned\n */\nexport function getTriggerChild(children) {\n if (! /*#__PURE__*/React.isValidElement(children)) {\n return null;\n }\n return isFluentTrigger(children) ? getTriggerChild(\n // FIXME: This casting should be unnecessary as isFluentTrigger is a guard type method,\n // but for some reason it's failing on build\n children.props.children) : children;\n}\n//# sourceMappingURL=getTriggerChild.js.map"],"names":["getTriggerChild","children","React","isValidElement","isFluentTrigger","props"],"mappings":";;;;+BAwBgBA;;aAAAA;;;6DAxBO;iCACS;AAuBzB,SAASA,gBAAgBC,QAAQ,EAAE;IACxC,IAAI,CAAE,WAAW,GAAEC,OAAMC,cAAc,CAACF,WAAW;QACjD,OAAO,IAAI;IACb,CAAC;IACD,OAAOG,IAAAA,gCAAe,EAACH,YAAYD,gBACnC,uFAAuF;IACvF,4CAA4C;IAC5CC,SAASI,KAAK,CAACJ,QAAQ,IAAIA,QAAQ;AACrC,EACA,2CAA2C"}
1
+ {"version":3,"sources":["getTriggerChild.js"],"sourcesContent":["import * as React from 'react';\nimport { isFluentTrigger } from './isFluentTrigger';\n/**\n * @internal\n * Gets the trigger element of a FluentTriggerComponent (such as Tooltip or MenuTrigger).\n *\n * In the case where the immediate child is itself a FluentTriggerComponent and/or React Fragment,\n * it returns the first descendant that is _not_ a FluentTriggerComponent or Fragment.\n * This allows multiple triggers to be stacked, and still apply their props to the actual trigger element.\n *\n * For example, the following returns `<div id=\"child\" />`:\n * ```jsx\n * getTriggerChild(\n * <Tooltip>\n * <MenuTrigger>\n * <div id=\"child\" />\n * </MenuTrigger>\n * </Tooltip>\n * );\n * ```\n *\n * In the case where the immediate child is not a valid element,\n * null is returned\n */ export function getTriggerChild(children) {\n if (!React.isValidElement(children)) {\n return null;\n }\n return isFluentTrigger(children) ? getTriggerChild(// FIXME: This casting should be unnecessary as isFluentTrigger is a guard type method,\n // but for some reason it's failing on build\n children.props.children) : children;\n}\n"],"names":["getTriggerChild","children","React","isValidElement","isFluentTrigger","props"],"mappings":";;;;+BAuBoBA;;aAAAA;;;6DAvBG;iCACS;AAsBrB,SAASA,gBAAgBC,QAAQ,EAAE;IAC1C,IAAI,eAACC,OAAMC,cAAc,CAACF,WAAW;QACjC,OAAO,IAAI;IACf,CAAC;IACD,OAAOG,IAAAA,gCAAe,EAACH,YAAYD,gBACnC,4CAA4C;IAC5CC,SAASI,KAAK,CAACJ,QAAQ,IAAIA,QAAQ;AACvC"}
@@ -7,6 +7,3 @@ _exportStar(require("./applyTriggerPropsToChildren"), exports);
7
7
  _exportStar(require("./getTriggerChild"), exports);
8
8
  _exportStar(require("./isFluentTrigger"), exports);
9
9
  _exportStar(require("./types"), exports);
10
- //# sourceMappingURL=index.js.map
11
-
12
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/trigger/index.js"],"sourcesContent":["export * from './applyTriggerPropsToChildren';\nexport * from './getTriggerChild';\nexport * from './isFluentTrigger';\nexport * from './types';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;CACd,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './applyTriggerPropsToChildren';\nexport * from './getTriggerChild';\nexport * from './isFluentTrigger';\nexport * from './types';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA"}
@@ -10,6 +10,4 @@ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildc
10
10
  const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
11
  function isFluentTrigger(element) {
12
12
  return Boolean(element.type.isFluentTriggerComponent);
13
- } //# sourceMappingURL=isFluentTrigger.js.map
14
-
15
- //# sourceMappingURL=isFluentTrigger.js.map
13
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/trigger/isFluentTrigger.js"],"sourcesContent":["import * as React from 'react';\n/**\n * @internal\n * Checks if a given element is a FluentUI trigger (e.g. `MenuTrigger` or `Tooltip`).\n * See the {@link FluentTriggerComponent} type for more info.\n */\nexport function isFluentTrigger(element) {\n return Boolean(element.type.isFluentTriggerComponent);\n}\n//# sourceMappingURL=isFluentTrigger.js.map"],"names":["isFluentTrigger","element","Boolean","type","isFluentTriggerComponent"],"mappings":";;;;+BAMgBA;;aAAAA;;;6DANO;AAMhB,SAASA,gBAAgBC,OAAO,EAAE;IACvC,OAAOC,QAAQD,QAAQE,IAAI,CAACC,wBAAwB;AACtD,EACA,2CAA2C"}
1
+ {"version":3,"sources":["isFluentTrigger.js"],"sourcesContent":["import * as React from 'react';\n/**\n * @internal\n * Checks if a given element is a FluentUI trigger (e.g. `MenuTrigger` or `Tooltip`).\n * See the {@link FluentTriggerComponent} type for more info.\n */ export function isFluentTrigger(element) {\n return Boolean(element.type.isFluentTriggerComponent);\n}\n"],"names":["isFluentTrigger","element","Boolean","type","isFluentTriggerComponent"],"mappings":";;;;+BAKoBA;;aAAAA;;;6DALG;AAKZ,SAASA,gBAAgBC,OAAO,EAAE;IACzC,OAAOC,QAAQD,QAAQE,IAAI,CAACC,wBAAwB;AACxD"}
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
6
6
  const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
7
- //# sourceMappingURL=types.js.map
8
-
9
- //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/trigger/types.js"],"sourcesContent":["import * as React from 'react';\n//# sourceMappingURL=types.js.map"],"names":[],"mappings":";;;;;6DAAuB;CACvB,iCAAiC"}
1
+ {"version":3,"sources":["types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;6DAAuB"}
@@ -13,6 +13,4 @@ Object.defineProperty(exports, "clamp", {
13
13
  enumerable: true,
14
14
  get: ()=>clamp
15
15
  });
16
- const clamp = (value, min, max)=>Math.max(min, Math.min(max, value || 0)); //# sourceMappingURL=clamp.js.map
17
-
18
- //# sourceMappingURL=clamp.js.map
16
+ const clamp = (value, min, max)=>Math.max(min, Math.min(max, value || 0));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/clamp.js"],"sourcesContent":["/**\n * @internal\n * Clamps `value` to a number between the min and max.\n *\n * @param value - the value to be clamped\n * @param min - the lowest valid value\n * @param max - the highest valid value\n */export const clamp = (value, min, max) => Math.max(min, Math.min(max, value || 0));\n//# sourceMappingURL=clamp.js.map"],"names":["clamp","value","min","max","Math"],"mappings":"AAAA;;;;;;;CAOC;;;;+BAAeA;;aAAAA;;AAAN,MAAMA,QAAQ,CAACC,OAAOC,KAAKC,MAAQC,KAAKD,GAAG,CAACD,KAAKE,KAAKF,GAAG,CAACC,KAAKF,SAAS,KAClF,iCAAiC"}
1
+ {"version":3,"sources":["clamp.js"],"sourcesContent":["/**\n * @internal\n * Clamps `value` to a number between the min and max.\n *\n * @param value - the value to be clamped\n * @param min - the lowest valid value\n * @param max - the highest valid value\n */ export const clamp = (value, min, max)=>Math.max(min, Math.min(max, value || 0));\n"],"names":["clamp","value","min","max","Math"],"mappings":"AAAA;;;;;;;CAOC;;;;+BAAgBA;;aAAAA;;AAAN,MAAMA,QAAQ,CAACC,OAAOC,KAAKC,MAAMC,KAAKD,GAAG,CAACD,KAAKE,KAAKF,GAAG,CAACC,KAAKF,SAAS"}
@@ -57,6 +57,4 @@ const getPartitionedNativeProps = ({ primarySlotTagName , props , excludedPropNa
57
57
  'className'
58
58
  ])
59
59
  };
60
- }; //# sourceMappingURL=getNativeElementProps.js.map
61
-
62
- //# sourceMappingURL=getNativeElementProps.js.map
60
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/getNativeElementProps.js"],"sourcesContent":["import * as React from 'react';\nimport { labelProperties, audioProperties, videoProperties, olProperties, liProperties, anchorProperties, buttonProperties, inputProperties, textAreaProperties, selectProperties, optionProperties, tableProperties, trProperties, thProperties, tdProperties, colGroupProperties, colProperties, fieldsetProperties, formProperties, iframeProperties, imgProperties, htmlElementProperties, getNativeProps, timeProperties, dialogProperties } from './properties';\nconst nativeElementMap = {\n label: labelProperties,\n audio: audioProperties,\n video: videoProperties,\n ol: olProperties,\n li: liProperties,\n a: anchorProperties,\n button: buttonProperties,\n input: inputProperties,\n textarea: textAreaProperties,\n select: selectProperties,\n option: optionProperties,\n table: tableProperties,\n tr: trProperties,\n th: thProperties,\n td: tdProperties,\n colGroup: colGroupProperties,\n col: colProperties,\n fieldset: fieldsetProperties,\n form: formProperties,\n iframe: iframeProperties,\n img: imgProperties,\n time: timeProperties,\n dialog: dialogProperties\n};\n/**\n * Given an element tagname and user props, filters the props to only allowed props for the given\n * element type.\n * @param tagName - Tag name (e.g. \"div\")\n * @param props - Props object\n * @param excludedPropNames - List of props to disallow\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeElementProps(tagName, props, excludedPropNames) {\n const allowedPropNames = tagName && nativeElementMap[tagName] || htmlElementProperties;\n allowedPropNames.as = 1;\n return getNativeProps(props, allowedPropNames, excludedPropNames);\n}\n/**\n * Splits the native props into ones that go to the `root` slot, and ones that go to the primary slot.\n *\n * This function is only for use with components that have a primary slot other than `root`.\n * Most components should use {@link getNativeElementProps} for their root slot if it is the primary slot.\n *\n * @returns An object containing the native props for the `root` and primary slots.\n */\nexport const getPartitionedNativeProps = ({\n primarySlotTagName,\n props,\n excludedPropNames\n}) => {\n return {\n root: {\n style: props.style,\n className: props.className\n },\n primary: getNativeElementProps(primarySlotTagName, props, [...(excludedPropNames || []), 'style', 'className'])\n };\n};\n//# sourceMappingURL=getNativeElementProps.js.map"],"names":["getNativeElementProps","getPartitionedNativeProps","nativeElementMap","label","labelProperties","audio","audioProperties","video","videoProperties","ol","olProperties","li","liProperties","a","anchorProperties","button","buttonProperties","input","inputProperties","textarea","textAreaProperties","select","selectProperties","option","optionProperties","table","tableProperties","tr","trProperties","th","thProperties","td","tdProperties","colGroup","colGroupProperties","col","colProperties","fieldset","fieldsetProperties","form","formProperties","iframe","iframeProperties","img","imgProperties","time","timeProperties","dialog","dialogProperties","tagName","props","excludedPropNames","allowedPropNames","htmlElementProperties","as","getNativeProps","primarySlotTagName","root","style","className","primary"],"mappings":";;;;;;;;;;;IAkCgBA,qBAAqB,MAArBA;IAaHC,yBAAyB,MAAzBA;;;6DA/CU;4BACga;AACvb,MAAMC,mBAAmB;IACvBC,OAAOC,2BAAe;IACtBC,OAAOC,2BAAe;IACtBC,OAAOC,2BAAe;IACtBC,IAAIC,wBAAY;IAChBC,IAAIC,wBAAY;IAChBC,GAAGC,4BAAgB;IACnBC,QAAQC,4BAAgB;IACxBC,OAAOC,2BAAe;IACtBC,UAAUC,8BAAkB;IAC5BC,QAAQC,4BAAgB;IACxBC,QAAQC,4BAAgB;IACxBC,OAAOC,2BAAe;IACtBC,IAAIC,wBAAY;IAChBC,IAAIC,wBAAY;IAChBC,IAAIC,wBAAY;IAChBC,UAAUC,8BAAkB;IAC5BC,KAAKC,yBAAa;IAClBC,UAAUC,8BAAkB;IAC5BC,MAAMC,0BAAc;IACpBC,QAAQC,4BAAgB;IACxBC,KAAKC,yBAAa;IAClBC,MAAMC,0BAAc;IACpBC,QAAQC,4BAAgB;AAC1B;AAQO,SAAShD,sBAAsBiD,OAAO,EAAEC,KAAK,EAAEC,iBAAiB,EAAE;IACvE,MAAMC,mBAAmBH,WAAW/C,gBAAgB,CAAC+C,QAAQ,IAAII,iCAAqB;IACtFD,iBAAiBE,EAAE,GAAG;IACtB,OAAOC,IAAAA,0BAAc,EAACL,OAAOE,kBAAkBD;AACjD;AASO,MAAMlD,4BAA4B,CAAC,EACxCuD,mBAAkB,EAClBN,MAAK,EACLC,kBAAiB,EAClB,GAAK;IACJ,OAAO;QACLM,MAAM;YACJC,OAAOR,MAAMQ,KAAK;YAClBC,WAAWT,MAAMS,SAAS;QAC5B;QACAC,SAAS5D,sBAAsBwD,oBAAoBN,OAAO;eAAKC,qBAAqB,EAAE;YAAG;YAAS;SAAY;IAChH;AACF,GACA,iDAAiD"}
1
+ {"version":3,"sources":["getNativeElementProps.js"],"sourcesContent":["import * as React from 'react';\nimport { labelProperties, audioProperties, videoProperties, olProperties, liProperties, anchorProperties, buttonProperties, inputProperties, textAreaProperties, selectProperties, optionProperties, tableProperties, trProperties, thProperties, tdProperties, colGroupProperties, colProperties, fieldsetProperties, formProperties, iframeProperties, imgProperties, htmlElementProperties, getNativeProps, timeProperties, dialogProperties } from './properties';\nconst nativeElementMap = {\n label: labelProperties,\n audio: audioProperties,\n video: videoProperties,\n ol: olProperties,\n li: liProperties,\n a: anchorProperties,\n button: buttonProperties,\n input: inputProperties,\n textarea: textAreaProperties,\n select: selectProperties,\n option: optionProperties,\n table: tableProperties,\n tr: trProperties,\n th: thProperties,\n td: tdProperties,\n colGroup: colGroupProperties,\n col: colProperties,\n fieldset: fieldsetProperties,\n form: formProperties,\n iframe: iframeProperties,\n img: imgProperties,\n time: timeProperties,\n dialog: dialogProperties\n};\n/**\n * Given an element tagname and user props, filters the props to only allowed props for the given\n * element type.\n * @param tagName - Tag name (e.g. \"div\")\n * @param props - Props object\n * @param excludedPropNames - List of props to disallow\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeElementProps(tagName, props, excludedPropNames) {\n const allowedPropNames = tagName && nativeElementMap[tagName] || htmlElementProperties;\n allowedPropNames.as = 1;\n return getNativeProps(props, allowedPropNames, excludedPropNames);\n}\n/**\n * Splits the native props into ones that go to the `root` slot, and ones that go to the primary slot.\n *\n * This function is only for use with components that have a primary slot other than `root`.\n * Most components should use {@link getNativeElementProps} for their root slot if it is the primary slot.\n *\n * @returns An object containing the native props for the `root` and primary slots.\n */ export const getPartitionedNativeProps = ({ primarySlotTagName , props , excludedPropNames })=>{\n return {\n root: {\n style: props.style,\n className: props.className\n },\n primary: getNativeElementProps(primarySlotTagName, props, [\n ...excludedPropNames || [],\n 'style',\n 'className'\n ])\n };\n};\n"],"names":["getNativeElementProps","getPartitionedNativeProps","nativeElementMap","label","labelProperties","audio","audioProperties","video","videoProperties","ol","olProperties","li","liProperties","a","anchorProperties","button","buttonProperties","input","inputProperties","textarea","textAreaProperties","select","selectProperties","option","optionProperties","table","tableProperties","tr","trProperties","th","thProperties","td","tdProperties","colGroup","colGroupProperties","col","colProperties","fieldset","fieldsetProperties","form","formProperties","iframe","iframeProperties","img","imgProperties","time","timeProperties","dialog","dialogProperties","tagName","props","excludedPropNames","allowedPropNames","htmlElementProperties","as","getNativeProps","primarySlotTagName","root","style","className","primary"],"mappings":";;;;;;;;;;;IAkCgBA,qBAAqB,MAArBA;IAYCC,yBAAyB,MAAzBA;;;6DA9CM;4BACga;AACvb,MAAMC,mBAAmB;IACrBC,OAAOC,2BAAe;IACtBC,OAAOC,2BAAe;IACtBC,OAAOC,2BAAe;IACtBC,IAAIC,wBAAY;IAChBC,IAAIC,wBAAY;IAChBC,GAAGC,4BAAgB;IACnBC,QAAQC,4BAAgB;IACxBC,OAAOC,2BAAe;IACtBC,UAAUC,8BAAkB;IAC5BC,QAAQC,4BAAgB;IACxBC,QAAQC,4BAAgB;IACxBC,OAAOC,2BAAe;IACtBC,IAAIC,wBAAY;IAChBC,IAAIC,wBAAY;IAChBC,IAAIC,wBAAY;IAChBC,UAAUC,8BAAkB;IAC5BC,KAAKC,yBAAa;IAClBC,UAAUC,8BAAkB;IAC5BC,MAAMC,0BAAc;IACpBC,QAAQC,4BAAgB;IACxBC,KAAKC,yBAAa;IAClBC,MAAMC,0BAAc;IACpBC,QAAQC,4BAAgB;AAC5B;AAQO,SAAShD,sBAAsBiD,OAAO,EAAEC,KAAK,EAAEC,iBAAiB,EAAE;IACrE,MAAMC,mBAAmBH,WAAW/C,gBAAgB,CAAC+C,QAAQ,IAAII,iCAAqB;IACtFD,iBAAiBE,EAAE,GAAG;IACtB,OAAOC,IAAAA,0BAAc,EAACL,OAAOE,kBAAkBD;AACnD;AAQW,MAAMlD,4BAA4B,CAAC,EAAEuD,mBAAkB,EAAGN,MAAK,EAAGC,kBAAiB,EAAG,GAAG;IAChG,OAAO;QACHM,MAAM;YACFC,OAAOR,MAAMQ,KAAK;YAClBC,WAAWT,MAAMS,SAAS;QAC9B;QACAC,SAAS5D,sBAAsBwD,oBAAoBN,OAAO;eACnDC,qBAAqB,EAAE;YAC1B;YACA;SACH;IACL;AACJ"}
@@ -23,6 +23,4 @@ const getRTLSafeKey = (key, dir)=>{
23
23
  }
24
24
  }
25
25
  return key;
26
- }; //# sourceMappingURL=getRTLSafeKey.js.map
27
-
28
- //# sourceMappingURL=getRTLSafeKey.js.map
26
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/getRTLSafeKey.js"],"sourcesContent":["/**\n * @internal\n * Finds and swaps a provided key for it's right to left format.\n */export const getRTLSafeKey = (key, dir) => {\n if (dir === 'rtl') {\n switch (key) {\n case 'ArrowLeft':\n {\n return 'ArrowRight';\n }\n case 'ArrowRight':\n {\n return 'ArrowLeft';\n }\n }\n }\n return key;\n};\n//# sourceMappingURL=getRTLSafeKey.js.map"],"names":["getRTLSafeKey","key","dir"],"mappings":"AAAA;;;CAGC;;;;+BAAeA;;aAAAA;;AAAN,MAAMA,gBAAgB,CAACC,KAAKC,MAAQ;IAC5C,IAAIA,QAAQ,OAAO;QACjB,OAAQD;YACN,KAAK;gBACH;oBACE,OAAO;gBACT;YACF,KAAK;gBACH;oBACE,OAAO;gBACT;QACJ;IACF,CAAC;IACD,OAAOA;AACT,GACA,yCAAyC"}
1
+ {"version":3,"sources":["getRTLSafeKey.js"],"sourcesContent":["/**\n * @internal\n * Finds and swaps a provided key for it's right to left format.\n */ export const getRTLSafeKey = (key, dir)=>{\n if (dir === 'rtl') {\n switch(key){\n case 'ArrowLeft':\n {\n return 'ArrowRight';\n }\n case 'ArrowRight':\n {\n return 'ArrowLeft';\n }\n }\n }\n return key;\n};\n"],"names":["getRTLSafeKey","key","dir"],"mappings":"AAAA;;;CAGC;;;;+BAAgBA;;aAAAA;;AAAN,MAAMA,gBAAgB,CAACC,KAAKC,MAAM;IACzC,IAAIA,QAAQ,OAAO;QACf,OAAOD;YACH,KAAK;gBACD;oBACI,OAAO;gBACX;YACJ,KAAK;gBACD;oBACI,OAAO;gBACX;QACR;IACJ,CAAC;IACD,OAAOA;AACX"}
@@ -25,6 +25,4 @@ function getReactCallbackName(event) {
25
25
  'This should not happen, please report it to https://github.com/microsoft/fluentui'
26
26
  ]);
27
27
  }
28
- } //# sourceMappingURL=getReactCallbackName.js.map
29
-
30
- //# sourceMappingURL=getReactCallbackName.js.map
28
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/getReactCallbackName.js"],"sourcesContent":["import * as React from 'react';\n/**\n * React.SyntheticEvent contains name of a callback that should be fired, this function returns it.\n *\n * Ideally, it should also distinguish regular and \"capture\" callbacks, but it's possible only with React 17 as\n * \".eventPhase\" there has proper value, see https://github.com/facebook/react/pull/19244. In React 16 all events\n * are handled in bubble phase.\n */\nexport function getReactCallbackName(event) {\n if (event._reactName) {\n return event._reactName;\n }\n if (event.dispatchConfig) {\n if (event.dispatchConfig.registrationName) {\n return event.dispatchConfig.registrationName;\n }\n return event.dispatchConfig.phasedRegistrationNames.bubbled;\n }\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error(['Passed React.SyntheticEvent does not contain \".dispatchConfig\" or \"._reactName\".', 'This should not happen, please report it to https://github.com/microsoft/fluentui']);\n }\n}\n//# sourceMappingURL=getReactCallbackName.js.map"],"names":["getReactCallbackName","event","_reactName","dispatchConfig","registrationName","phasedRegistrationNames","bubbled","process","env","NODE_ENV","console","error"],"mappings":";;;;+BAQgBA;;aAAAA;;;6DARO;AAQhB,SAASA,qBAAqBC,KAAK,EAAE;IAC1C,IAAIA,MAAMC,UAAU,EAAE;QACpB,OAAOD,MAAMC,UAAU;IACzB,CAAC;IACD,IAAID,MAAME,cAAc,EAAE;QACxB,IAAIF,MAAME,cAAc,CAACC,gBAAgB,EAAE;YACzC,OAAOH,MAAME,cAAc,CAACC,gBAAgB;QAC9C,CAAC;QACD,OAAOH,MAAME,cAAc,CAACE,uBAAuB,CAACC,OAAO;IAC7D,CAAC;IACD,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,sCAAsC;QACtCC,QAAQC,KAAK,CAAC;YAAC;YAAoF;SAAoF;IACzL,CAAC;AACH,EACA,gDAAgD"}
1
+ {"version":3,"sources":["getReactCallbackName.js"],"sourcesContent":["import * as React from 'react';\n/**\n * React.SyntheticEvent contains name of a callback that should be fired, this function returns it.\n *\n * Ideally, it should also distinguish regular and \"capture\" callbacks, but it's possible only with React 17 as\n * \".eventPhase\" there has proper value, see https://github.com/facebook/react/pull/19244. In React 16 all events\n * are handled in bubble phase.\n */ export function getReactCallbackName(event) {\n if (event._reactName) {\n return event._reactName;\n }\n if (event.dispatchConfig) {\n if (event.dispatchConfig.registrationName) {\n return event.dispatchConfig.registrationName;\n }\n return event.dispatchConfig.phasedRegistrationNames.bubbled;\n }\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error([\n 'Passed React.SyntheticEvent does not contain \".dispatchConfig\" or \"._reactName\".',\n 'This should not happen, please report it to https://github.com/microsoft/fluentui'\n ]);\n }\n}\n"],"names":["getReactCallbackName","event","_reactName","dispatchConfig","registrationName","phasedRegistrationNames","bubbled","process","env","NODE_ENV","console","error"],"mappings":";;;;+BAOoBA;;aAAAA;;;6DAPG;AAOZ,SAASA,qBAAqBC,KAAK,EAAE;IAC5C,IAAIA,MAAMC,UAAU,EAAE;QAClB,OAAOD,MAAMC,UAAU;IAC3B,CAAC;IACD,IAAID,MAAME,cAAc,EAAE;QACtB,IAAIF,MAAME,cAAc,CAACC,gBAAgB,EAAE;YACvC,OAAOH,MAAME,cAAc,CAACC,gBAAgB;QAChD,CAAC;QACD,OAAOH,MAAME,cAAc,CAACE,uBAAuB,CAACC,OAAO;IAC/D,CAAC;IACD,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACvC,sCAAsC;QACtCC,QAAQC,KAAK,CAAC;YACV;YACA;SACH;IACL,CAAC;AACL"}
@@ -12,6 +12,3 @@ _exportStar(require("./properties"), exports);
12
12
  _exportStar(require("./isHTMLElement"), exports);
13
13
  _exportStar(require("./isInteractiveHTMLElement"), exports);
14
14
  _exportStar(require("./priorityQueue"), exports);
15
- //# sourceMappingURL=index.js.map
16
-
17
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/index.js"],"sourcesContent":["export * from './clamp';\nexport * from './getNativeElementProps';\nexport * from './getRTLSafeKey';\nexport * from './mergeCallbacks';\nexport * from './omit';\nexport * from './properties';\nexport * from './isHTMLElement';\nexport * from './isInteractiveHTMLElement';\nexport * from './priorityQueue';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './clamp';\nexport * from './getNativeElementProps';\nexport * from './getRTLSafeKey';\nexport * from './mergeCallbacks';\nexport * from './omit';\nexport * from './properties';\nexport * from './isHTMLElement';\nexport * from './isInteractiveHTMLElement';\nexport * from './priorityQueue';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA"}
@@ -24,6 +24,4 @@ function isHTMLElement(element, options) {
24
24
  const typedElement = element;
25
25
  var _options_constructorName;
26
26
  return Boolean((typedElement === null || typedElement === void 0 ? void 0 : (_typedElement_ownerDocument = typedElement.ownerDocument) === null || _typedElement_ownerDocument === void 0 ? void 0 : _typedElement_ownerDocument.defaultView) && typedElement instanceof typedElement.ownerDocument.defaultView[(_options_constructorName = options === null || options === void 0 ? void 0 : options.constructorName) !== null && _options_constructorName !== void 0 ? _options_constructorName : 'HTMLElement']);
27
- } //# sourceMappingURL=isHTMLElement.js.map
28
-
29
- //# sourceMappingURL=isHTMLElement.js.map
27
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/isHTMLElement.js"],"sourcesContent":["/**\n * Verifies if a given node is an HTMLElement,\n * this method works seamlessly with frames and elements from different documents\n *\n * This is preferred over simply using `instanceof`.\n * Since `instanceof` might be problematic while operating with [multiple realms](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof#instanceof_and_multiple_realms)\n *\n * @example\n * ```ts\n * isHTMLElement(event.target) && event.target.focus()\n * isHTMLElement(event.target, {constructorName: 'HTMLInputElement'}) && event.target.value // some value\n * ```\n *\n */export function isHTMLElement(element, options) {\n var _typedElement_ownerDocument;\n const typedElement = element;\n var _options_constructorName;\n return Boolean((typedElement === null || typedElement === void 0 ? void 0 : (_typedElement_ownerDocument = typedElement.ownerDocument) === null || _typedElement_ownerDocument === void 0 ? void 0 : _typedElement_ownerDocument.defaultView) && typedElement instanceof typedElement.ownerDocument.defaultView[(_options_constructorName = options === null || options === void 0 ? void 0 : options.constructorName) !== null && _options_constructorName !== void 0 ? _options_constructorName : 'HTMLElement']);\n}\n//# sourceMappingURL=isHTMLElement.js.map"],"names":["isHTMLElement","element","options","_typedElement_ownerDocument","typedElement","_options_constructorName","Boolean","ownerDocument","defaultView","constructorName"],"mappings":"AAAA;;;;;;;;;;;;;CAaC;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,cAAcC,OAAO,EAAEC,OAAO,EAAE;IACjD,IAAIC;IACJ,MAAMC,eAAeH;IACrB,IAAII;IACJ,OAAOC,QAAQ,AAACF,CAAAA,iBAAiB,IAAI,IAAIA,iBAAiB,KAAK,IAAI,KAAK,IAAI,AAACD,CAAAA,8BAA8BC,aAAaG,aAAa,AAAD,MAAO,IAAI,IAAIJ,gCAAgC,KAAK,IAAI,KAAK,IAAIA,4BAA4BK,WAAW,AAAD,KAAMJ,wBAAwBA,aAAaG,aAAa,CAACC,WAAW,CAAC,AAACH,CAAAA,2BAA2BH,YAAY,IAAI,IAAIA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQO,eAAe,AAAD,MAAO,IAAI,IAAIJ,6BAA6B,KAAK,IAAIA,2BAA2B,aAAa,CAAC;AACpf,EACA,yCAAyC"}
1
+ {"version":3,"sources":["isHTMLElement.js"],"sourcesContent":["/**\n * Verifies if a given node is an HTMLElement,\n * this method works seamlessly with frames and elements from different documents\n *\n * This is preferred over simply using `instanceof`.\n * Since `instanceof` might be problematic while operating with [multiple realms](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof#instanceof_and_multiple_realms)\n *\n * @example\n * ```ts\n * isHTMLElement(event.target) && event.target.focus()\n * isHTMLElement(event.target, {constructorName: 'HTMLInputElement'}) && event.target.value // some value\n * ```\n *\n */ export function isHTMLElement(element, options) {\n var _typedElement_ownerDocument;\n const typedElement = element;\n var _options_constructorName;\n return Boolean((typedElement === null || typedElement === void 0 ? void 0 : (_typedElement_ownerDocument = typedElement.ownerDocument) === null || _typedElement_ownerDocument === void 0 ? void 0 : _typedElement_ownerDocument.defaultView) && typedElement instanceof typedElement.ownerDocument.defaultView[(_options_constructorName = options === null || options === void 0 ? void 0 : options.constructorName) !== null && _options_constructorName !== void 0 ? _options_constructorName : 'HTMLElement']);\n}\n"],"names":["isHTMLElement","element","options","_typedElement_ownerDocument","typedElement","_options_constructorName","Boolean","ownerDocument","defaultView","constructorName"],"mappings":"AAAA;;;;;;;;;;;;;CAaC;;;;+BAAmBA;;aAAAA;;AAAT,SAASA,cAAcC,OAAO,EAAEC,OAAO,EAAE;IAChD,IAAIC;IACJ,MAAMC,eAAeH;IACrB,IAAII;IACJ,OAAOC,QAAQ,AAACF,CAAAA,iBAAiB,IAAI,IAAIA,iBAAiB,KAAK,IAAI,KAAK,IAAI,AAACD,CAAAA,8BAA8BC,aAAaG,aAAa,AAAD,MAAO,IAAI,IAAIJ,gCAAgC,KAAK,IAAI,KAAK,IAAIA,4BAA4BK,WAAW,AAAD,KAAMJ,wBAAwBA,aAAaG,aAAa,CAACC,WAAW,CAAC,AAACH,CAAAA,2BAA2BH,YAAY,IAAI,IAAIA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQO,eAAe,AAAD,MAAO,IAAI,IAAIJ,6BAA6B,KAAK,IAAIA,2BAA2B,aAAa,CAAC;AACtf"}
@@ -20,6 +20,4 @@ function isInteractiveHTMLElement(element) {
20
20
  return true;
21
21
  }
22
22
  return element.isContentEditable;
23
- } //# sourceMappingURL=isInteractiveHTMLElement.js.map
24
-
25
- //# sourceMappingURL=isInteractiveHTMLElement.js.map
23
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/isInteractiveHTMLElement.js"],"sourcesContent":["import { isHTMLElement } from './isHTMLElement';\n/**\n * @internal\n * Checks that the element has default behaviour from user input on click or 'Enter'/'Space' keys\n */\nexport function isInteractiveHTMLElement(element) {\n if (!isHTMLElement(element)) {\n return false;\n }\n const {\n tagName\n } = element;\n switch (tagName) {\n case 'BUTTON':\n case 'A':\n case 'INPUT':\n case 'TEXTAREA':\n return true;\n }\n return element.isContentEditable;\n}\n//# sourceMappingURL=isInteractiveHTMLElement.js.map"],"names":["isInteractiveHTMLElement","element","isHTMLElement","tagName","isContentEditable"],"mappings":";;;;+BAKgBA;;aAAAA;;+BALc;AAKvB,SAASA,yBAAyBC,OAAO,EAAE;IAChD,IAAI,CAACC,IAAAA,4BAAa,EAACD,UAAU;QAC3B,OAAO,KAAK;IACd,CAAC;IACD,MAAM,EACJE,QAAO,EACR,GAAGF;IACJ,OAAQE;QACN,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAO,IAAI;IACf;IACA,OAAOF,QAAQG,iBAAiB;AAClC,EACA,oDAAoD"}
1
+ {"version":3,"sources":["isInteractiveHTMLElement.js"],"sourcesContent":["import { isHTMLElement } from './isHTMLElement';\n/**\n * @internal\n * Checks that the element has default behaviour from user input on click or 'Enter'/'Space' keys\n */ export function isInteractiveHTMLElement(element) {\n if (!isHTMLElement(element)) {\n return false;\n }\n const { tagName } = element;\n switch(tagName){\n case 'BUTTON':\n case 'A':\n case 'INPUT':\n case 'TEXTAREA':\n return true;\n }\n return element.isContentEditable;\n}\n"],"names":["isInteractiveHTMLElement","element","isHTMLElement","tagName","isContentEditable"],"mappings":";;;;+BAIoBA;;aAAAA;;+BAJU;AAInB,SAASA,yBAAyBC,OAAO,EAAE;IAClD,IAAI,CAACC,IAAAA,4BAAa,EAACD,UAAU;QACzB,OAAO,KAAK;IAChB,CAAC;IACD,MAAM,EAAEE,QAAO,EAAG,GAAGF;IACrB,OAAOE;QACH,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACD,OAAO,IAAI;IACnB;IACA,OAAOF,QAAQG,iBAAiB;AACpC"}
@@ -33,6 +33,4 @@ function mergeCallbacks(callback1, callback2) {
33
33
  callback1 === null || callback1 === void 0 ? void 0 : callback1(...args);
34
34
  callback2 === null || callback2 === void 0 ? void 0 : callback2(...args);
35
35
  };
36
- } //# sourceMappingURL=mergeCallbacks.js.map
37
-
38
- //# sourceMappingURL=mergeCallbacks.js.map
36
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/mergeCallbacks.js"],"sourcesContent":["/**\n * @internal\n * Combine two event callbacks into a single callback function that calls each one in order.\n *\n * Usage example:\n * ```ts\n * state.slot.onChange = mergeCallbacks(state.slot.onChange, ev => {\n * // Handle onChange\n * });\n * ```\n *\n * The primary use is to avoid the need to capture an existing callback (`state.slot.onChange` in the example) to a\n * local variable before replacing with a new listener that calls the existing one. This helps avoid bugs like:\n * * Infinite recursion by calling the re-assigned state.slot.onChange if it's not captured to a local variable.\n * * Missing a call to the original onChange due to an early return or other conditional.\n *\n * If you need a callback that is stable between renders, wrap the result in {@link useEventCallback}.\n *\n * @param callback1 - The first callback to be called, or undefined\n * @param callback2 - The second callback to be called, or undefined\n *\n * @returns A function that that calls the provided functions in order\n */export function mergeCallbacks(callback1, callback2) {\n return (...args) => {\n callback1 === null || callback1 === void 0 ? void 0 : callback1(...args);\n callback2 === null || callback2 === void 0 ? void 0 : callback2(...args);\n };\n}\n//# sourceMappingURL=mergeCallbacks.js.map"],"names":["mergeCallbacks","callback1","callback2","args"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;CAsBC;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,eAAeC,SAAS,EAAEC,SAAS,EAAE;IACtD,OAAO,CAAC,GAAGC,OAAS;QAClBF,cAAc,IAAI,IAAIA,cAAc,KAAK,IAAI,KAAK,IAAIA,aAAaE,KAAK;QACxED,cAAc,IAAI,IAAIA,cAAc,KAAK,IAAI,KAAK,IAAIA,aAAaC,KAAK;IAC1E;AACF,EACA,0CAA0C"}
1
+ {"version":3,"sources":["mergeCallbacks.js"],"sourcesContent":["/**\n * @internal\n * Combine two event callbacks into a single callback function that calls each one in order.\n *\n * Usage example:\n * ```ts\n * state.slot.onChange = mergeCallbacks(state.slot.onChange, ev => {\n * // Handle onChange\n * });\n * ```\n *\n * The primary use is to avoid the need to capture an existing callback (`state.slot.onChange` in the example) to a\n * local variable before replacing with a new listener that calls the existing one. This helps avoid bugs like:\n * * Infinite recursion by calling the re-assigned state.slot.onChange if it's not captured to a local variable.\n * * Missing a call to the original onChange due to an early return or other conditional.\n *\n * If you need a callback that is stable between renders, wrap the result in {@link useEventCallback}.\n *\n * @param callback1 - The first callback to be called, or undefined\n * @param callback2 - The second callback to be called, or undefined\n *\n * @returns A function that that calls the provided functions in order\n */ export function mergeCallbacks(callback1, callback2) {\n return (...args)=>{\n callback1 === null || callback1 === void 0 ? void 0 : callback1(...args);\n callback2 === null || callback2 === void 0 ? void 0 : callback2(...args);\n };\n}\n"],"names":["mergeCallbacks","callback1","callback2","args"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;CAsBC;;;;+BAAmBA;;aAAAA;;AAAT,SAASA,eAAeC,SAAS,EAAEC,SAAS,EAAE;IACrD,OAAO,CAAC,GAAGC,OAAO;QACdF,cAAc,IAAI,IAAIA,cAAc,KAAK,IAAI,KAAK,IAAIA,aAAaE,KAAK;QACxED,cAAc,IAAI,IAAIA,cAAc,KAAK,IAAI,KAAK,IAAIA,aAAaC,KAAK;IAC5E;AACJ"}
@@ -28,6 +28,4 @@ function omit(obj, exclusions) {
28
28
  }
29
29
  }
30
30
  return result;
31
- } //# sourceMappingURL=omit.js.map
32
-
33
- //# sourceMappingURL=omit.js.map
31
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/omit.js"],"sourcesContent":["/**\n * Tiny helper to do the minimal amount of work in duplicating an object but omitting some\n * props. This ends up faster than using object ...rest or reduce to filter.\n *\n * This behaves very much like filteredAssign, but does not merge many objects together,\n * uses an exclusion object map, and avoids spreads all for optimal performance.\n *\n * See perf test for background:\n * https://jsperf.com/omit-vs-rest-vs-reduce/1\n *\n * @param obj - The object to clone\n * @param exclusions - The array of keys to exclude\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function omit(obj, exclusions) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result = {};\n for (const key in obj) {\n if (exclusions.indexOf(key) === -1 && obj.hasOwnProperty(key)) {\n result[key] = obj[key];\n }\n }\n return result;\n}\n//# sourceMappingURL=omit.js.map"],"names":["omit","obj","exclusions","result","key","indexOf","hasOwnProperty"],"mappings":"AAAA;;;;;;;;;;;;CAYC,GAAG,8DAA8D;;;;;+BAClDA;;aAAAA;;AAAT,SAASA,KAAKC,GAAG,EAAEC,UAAU,EAAE;IACpC,8DAA8D;IAC9D,MAAMC,SAAS,CAAC;IAChB,IAAK,MAAMC,OAAOH,IAAK;QACrB,IAAIC,WAAWG,OAAO,CAACD,SAAS,CAAC,KAAKH,IAAIK,cAAc,CAACF,MAAM;YAC7DD,MAAM,CAACC,IAAI,GAAGH,GAAG,CAACG,IAAI;QACxB,CAAC;IACH;IACA,OAAOD;AACT,EACA,gCAAgC"}
1
+ {"version":3,"sources":["omit.js"],"sourcesContent":["/**\n * Tiny helper to do the minimal amount of work in duplicating an object but omitting some\n * props. This ends up faster than using object ...rest or reduce to filter.\n *\n * This behaves very much like filteredAssign, but does not merge many objects together,\n * uses an exclusion object map, and avoids spreads all for optimal performance.\n *\n * See perf test for background:\n * https://jsperf.com/omit-vs-rest-vs-reduce/1\n *\n * @param obj - The object to clone\n * @param exclusions - The array of keys to exclude\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function omit(obj, exclusions) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result = {};\n for(const key in obj){\n if (exclusions.indexOf(key) === -1 && obj.hasOwnProperty(key)) {\n result[key] = obj[key];\n }\n }\n return result;\n}\n"],"names":["omit","obj","exclusions","result","key","indexOf","hasOwnProperty"],"mappings":"AAAA;;;;;;;;;;;;CAYC,GAAG,8DAA8D;;;;;+BAClDA;;aAAAA;;AAAT,SAASA,KAAKC,GAAG,EAAEC,UAAU,EAAE;IAClC,8DAA8D;IAC9D,MAAMC,SAAS,CAAC;IAChB,IAAI,MAAMC,OAAOH,IAAI;QACjB,IAAIC,WAAWG,OAAO,CAACD,SAAS,CAAC,KAAKH,IAAIK,cAAc,CAACF,MAAM;YAC3DD,MAAM,CAACC,IAAI,GAAGH,GAAG,CAACG,IAAI;QAC1B,CAAC;IACL;IACA,OAAOD;AACX"}
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @internal
3
3
  */ /**
4
- * @internal
5
- * @param compare - comparison function for items
6
- * @returns Priority queue implemented with a min heap
7
- */ "use strict";
4
+ * @internal
5
+ * @param compare - comparison function for items
6
+ * @returns Priority queue implemented with a min heap
7
+ */ "use strict";
8
8
  Object.defineProperty(exports, "__esModule", {
9
9
  value: true
10
10
  });
@@ -97,6 +97,4 @@ const right = (i)=>{
97
97
  };
98
98
  const parent = (i)=>{
99
99
  return Math.floor((i - 1) / 2);
100
- }; //# sourceMappingURL=priorityQueue.js.map
101
-
102
- //# sourceMappingURL=priorityQueue.js.map
100
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/priorityQueue.js"],"sourcesContent":["/**\n * @internal\n */ /**\n * @internal\n * @param compare - comparison function for items\n * @returns Priority queue implemented with a min heap\n */export function createPriorityQueue(compare) {\n const arr = [];\n let size = 0;\n const swap = (a, b) => {\n const tmp = arr[a];\n arr[a] = arr[b];\n arr[b] = tmp;\n };\n const heapify = i => {\n let smallest = i;\n const l = left(i);\n const r = right(i);\n if (l < size && compare(arr[l], arr[smallest]) < 0) {\n smallest = l;\n }\n if (r < size && compare(arr[r], arr[smallest]) < 0) {\n smallest = r;\n }\n if (smallest !== i) {\n swap(smallest, i);\n heapify(smallest);\n }\n };\n const dequeue = () => {\n if (size === 0) {\n throw new Error('Priority queue empty');\n }\n const res = arr[0];\n arr[0] = arr[--size];\n heapify(0);\n return res;\n };\n const peek = () => {\n if (size === 0) {\n return null;\n }\n return arr[0];\n };\n const enqueue = item => {\n arr[size++] = item;\n let i = size - 1;\n let p = parent(i);\n while (i > 0 && compare(arr[p], arr[i]) > 0) {\n swap(p, i);\n i = p;\n p = parent(i);\n }\n };\n const contains = item => {\n const index = arr.indexOf(item);\n return index >= 0 && index < size;\n };\n const remove = item => {\n const i = arr.indexOf(item);\n if (i === -1 || i >= size) {\n return;\n }\n arr[i] = arr[--size];\n heapify(i);\n };\n const clear = () => {\n size = 0;\n };\n const all = () => {\n return arr.slice(0, size);\n };\n return {\n all,\n clear,\n contains,\n dequeue,\n enqueue,\n peek,\n remove,\n size: () => size\n };\n}\nconst left = i => {\n return 2 * i + 1;\n};\nconst right = i => {\n return 2 * i + 2;\n};\nconst parent = i => {\n return Math.floor((i - 1) / 2);\n};\n//# sourceMappingURL=priorityQueue.js.map"],"names":["createPriorityQueue","compare","arr","size","swap","a","b","tmp","heapify","i","smallest","l","left","r","right","dequeue","Error","res","peek","enqueue","item","p","parent","contains","index","indexOf","remove","clear","all","slice","Math","floor"],"mappings":"AAAA;;CAEC,GAAG;;;;IAIA;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,oBAAoBC,OAAO,EAAE;IACjD,MAAMC,MAAM,EAAE;IACd,IAAIC,OAAO;IACX,MAAMC,OAAO,CAACC,GAAGC,IAAM;QACrB,MAAMC,MAAML,GAAG,CAACG,EAAE;QAClBH,GAAG,CAACG,EAAE,GAAGH,GAAG,CAACI,EAAE;QACfJ,GAAG,CAACI,EAAE,GAAGC;IACX;IACA,MAAMC,UAAUC,CAAAA,IAAK;QACnB,IAAIC,WAAWD;QACf,MAAME,IAAIC,KAAKH;QACf,MAAMI,IAAIC,MAAML;QAChB,IAAIE,IAAIR,QAAQF,QAAQC,GAAG,CAACS,EAAE,EAAET,GAAG,CAACQ,SAAS,IAAI,GAAG;YAClDA,WAAWC;QACb,CAAC;QACD,IAAIE,IAAIV,QAAQF,QAAQC,GAAG,CAACW,EAAE,EAAEX,GAAG,CAACQ,SAAS,IAAI,GAAG;YAClDA,WAAWG;QACb,CAAC;QACD,IAAIH,aAAaD,GAAG;YAClBL,KAAKM,UAAUD;YACfD,QAAQE;QACV,CAAC;IACH;IACA,MAAMK,UAAU,IAAM;QACpB,IAAIZ,SAAS,GAAG;YACd,MAAM,IAAIa,MAAM,wBAAwB;QAC1C,CAAC;QACD,MAAMC,MAAMf,GAAG,CAAC,EAAE;QAClBA,GAAG,CAAC,EAAE,GAAGA,GAAG,CAAC,EAAEC,KAAK;QACpBK,QAAQ;QACR,OAAOS;IACT;IACA,MAAMC,OAAO,IAAM;QACjB,IAAIf,SAAS,GAAG;YACd,OAAO,IAAI;QACb,CAAC;QACD,OAAOD,GAAG,CAAC,EAAE;IACf;IACA,MAAMiB,UAAUC,CAAAA,OAAQ;QACtBlB,GAAG,CAACC,OAAO,GAAGiB;QACd,IAAIX,IAAIN,OAAO;QACf,IAAIkB,IAAIC,OAAOb;QACf,MAAOA,IAAI,KAAKR,QAAQC,GAAG,CAACmB,EAAE,EAAEnB,GAAG,CAACO,EAAE,IAAI,EAAG;YAC3CL,KAAKiB,GAAGZ;YACRA,IAAIY;YACJA,IAAIC,OAAOb;QACb;IACF;IACA,MAAMc,WAAWH,CAAAA,OAAQ;QACvB,MAAMI,QAAQtB,IAAIuB,OAAO,CAACL;QAC1B,OAAOI,SAAS,KAAKA,QAAQrB;IAC/B;IACA,MAAMuB,SAASN,CAAAA,OAAQ;QACrB,MAAMX,IAAIP,IAAIuB,OAAO,CAACL;QACtB,IAAIX,MAAM,CAAC,KAAKA,KAAKN,MAAM;YACzB;QACF,CAAC;QACDD,GAAG,CAACO,EAAE,GAAGP,GAAG,CAAC,EAAEC,KAAK;QACpBK,QAAQC;IACV;IACA,MAAMkB,QAAQ,IAAM;QAClBxB,OAAO;IACT;IACA,MAAMyB,MAAM,IAAM;QAChB,OAAO1B,IAAI2B,KAAK,CAAC,GAAG1B;IACtB;IACA,OAAO;QACLyB;QACAD;QACAJ;QACAR;QACAI;QACAD;QACAQ;QACAvB,MAAM,IAAMA;IACd;AACF;AACA,MAAMS,OAAOH,CAAAA,IAAK;IAChB,OAAO,IAAIA,IAAI;AACjB;AACA,MAAMK,QAAQL,CAAAA,IAAK;IACjB,OAAO,IAAIA,IAAI;AACjB;AACA,MAAMa,SAASb,CAAAA,IAAK;IAClB,OAAOqB,KAAKC,KAAK,CAAC,AAACtB,CAAAA,IAAI,CAAA,IAAK;AAC9B,GACA,yCAAyC"}
1
+ {"version":3,"sources":["priorityQueue.js"],"sourcesContent":["/**\n * @internal\n */ /**\n * @internal\n * @param compare - comparison function for items\n * @returns Priority queue implemented with a min heap\n */ export function createPriorityQueue(compare) {\n const arr = [];\n let size = 0;\n const swap = (a, b)=>{\n const tmp = arr[a];\n arr[a] = arr[b];\n arr[b] = tmp;\n };\n const heapify = (i)=>{\n let smallest = i;\n const l = left(i);\n const r = right(i);\n if (l < size && compare(arr[l], arr[smallest]) < 0) {\n smallest = l;\n }\n if (r < size && compare(arr[r], arr[smallest]) < 0) {\n smallest = r;\n }\n if (smallest !== i) {\n swap(smallest, i);\n heapify(smallest);\n }\n };\n const dequeue = ()=>{\n if (size === 0) {\n throw new Error('Priority queue empty');\n }\n const res = arr[0];\n arr[0] = arr[--size];\n heapify(0);\n return res;\n };\n const peek = ()=>{\n if (size === 0) {\n return null;\n }\n return arr[0];\n };\n const enqueue = (item)=>{\n arr[size++] = item;\n let i = size - 1;\n let p = parent(i);\n while(i > 0 && compare(arr[p], arr[i]) > 0){\n swap(p, i);\n i = p;\n p = parent(i);\n }\n };\n const contains = (item)=>{\n const index = arr.indexOf(item);\n return index >= 0 && index < size;\n };\n const remove = (item)=>{\n const i = arr.indexOf(item);\n if (i === -1 || i >= size) {\n return;\n }\n arr[i] = arr[--size];\n heapify(i);\n };\n const clear = ()=>{\n size = 0;\n };\n const all = ()=>{\n return arr.slice(0, size);\n };\n return {\n all,\n clear,\n contains,\n dequeue,\n enqueue,\n peek,\n remove,\n size: ()=>size\n };\n}\nconst left = (i)=>{\n return 2 * i + 1;\n};\nconst right = (i)=>{\n return 2 * i + 2;\n};\nconst parent = (i)=>{\n return Math.floor((i - 1) / 2);\n};\n"],"names":["createPriorityQueue","compare","arr","size","swap","a","b","tmp","heapify","i","smallest","l","left","r","right","dequeue","Error","res","peek","enqueue","item","p","parent","contains","index","indexOf","remove","clear","all","slice","Math","floor"],"mappings":"AAAA;;CAEC,GAAG;;;;CAIH;;;;+BAAmBA;;aAAAA;;AAAT,SAASA,oBAAoBC,OAAO,EAAE;IAC7C,MAAMC,MAAM,EAAE;IACd,IAAIC,OAAO;IACX,MAAMC,OAAO,CAACC,GAAGC,IAAI;QACjB,MAAMC,MAAML,GAAG,CAACG,EAAE;QAClBH,GAAG,CAACG,EAAE,GAAGH,GAAG,CAACI,EAAE;QACfJ,GAAG,CAACI,EAAE,GAAGC;IACb;IACA,MAAMC,UAAU,CAACC,IAAI;QACjB,IAAIC,WAAWD;QACf,MAAME,IAAIC,KAAKH;QACf,MAAMI,IAAIC,MAAML;QAChB,IAAIE,IAAIR,QAAQF,QAAQC,GAAG,CAACS,EAAE,EAAET,GAAG,CAACQ,SAAS,IAAI,GAAG;YAChDA,WAAWC;QACf,CAAC;QACD,IAAIE,IAAIV,QAAQF,QAAQC,GAAG,CAACW,EAAE,EAAEX,GAAG,CAACQ,SAAS,IAAI,GAAG;YAChDA,WAAWG;QACf,CAAC;QACD,IAAIH,aAAaD,GAAG;YAChBL,KAAKM,UAAUD;YACfD,QAAQE;QACZ,CAAC;IACL;IACA,MAAMK,UAAU,IAAI;QAChB,IAAIZ,SAAS,GAAG;YACZ,MAAM,IAAIa,MAAM,wBAAwB;QAC5C,CAAC;QACD,MAAMC,MAAMf,GAAG,CAAC,EAAE;QAClBA,GAAG,CAAC,EAAE,GAAGA,GAAG,CAAC,EAAEC,KAAK;QACpBK,QAAQ;QACR,OAAOS;IACX;IACA,MAAMC,OAAO,IAAI;QACb,IAAIf,SAAS,GAAG;YACZ,OAAO,IAAI;QACf,CAAC;QACD,OAAOD,GAAG,CAAC,EAAE;IACjB;IACA,MAAMiB,UAAU,CAACC,OAAO;QACpBlB,GAAG,CAACC,OAAO,GAAGiB;QACd,IAAIX,IAAIN,OAAO;QACf,IAAIkB,IAAIC,OAAOb;QACf,MAAMA,IAAI,KAAKR,QAAQC,GAAG,CAACmB,EAAE,EAAEnB,GAAG,CAACO,EAAE,IAAI,EAAE;YACvCL,KAAKiB,GAAGZ;YACRA,IAAIY;YACJA,IAAIC,OAAOb;QACf;IACJ;IACA,MAAMc,WAAW,CAACH,OAAO;QACrB,MAAMI,QAAQtB,IAAIuB,OAAO,CAACL;QAC1B,OAAOI,SAAS,KAAKA,QAAQrB;IACjC;IACA,MAAMuB,SAAS,CAACN,OAAO;QACnB,MAAMX,IAAIP,IAAIuB,OAAO,CAACL;QACtB,IAAIX,MAAM,CAAC,KAAKA,KAAKN,MAAM;YACvB;QACJ,CAAC;QACDD,GAAG,CAACO,EAAE,GAAGP,GAAG,CAAC,EAAEC,KAAK;QACpBK,QAAQC;IACZ;IACA,MAAMkB,QAAQ,IAAI;QACdxB,OAAO;IACX;IACA,MAAMyB,MAAM,IAAI;QACZ,OAAO1B,IAAI2B,KAAK,CAAC,GAAG1B;IACxB;IACA,OAAO;QACHyB;QACAD;QACAJ;QACAR;QACAI;QACAD;QACAQ;QACAvB,MAAM,IAAIA;IACd;AACJ;AACA,MAAMS,OAAO,CAACH,IAAI;IACd,OAAO,IAAIA,IAAI;AACnB;AACA,MAAMK,QAAQ,CAACL,IAAI;IACf,OAAO,IAAIA,IAAI;AACnB;AACA,MAAMa,SAAS,CAACb,IAAI;IAChB,OAAOqB,KAAKC,KAAK,CAAC,AAACtB,CAAAA,IAAI,CAAA,IAAK;AAChC"}
@@ -49,7 +49,7 @@ const toObjectMap = (...items)=>{
49
49
  }
50
50
  return result;
51
51
  };
52
- const baseElementEvents = /*#__PURE__*/ toObjectMap([
52
+ const baseElementEvents = toObjectMap([
53
53
  'onAuxClick',
54
54
  'onCopy',
55
55
  'onCut',
@@ -131,7 +131,7 @@ const baseElementEvents = /*#__PURE__*/ toObjectMap([
131
131
  'onGotPointerCapture',
132
132
  'onLostPointerCapture'
133
133
  ]);
134
- const baseElementProperties = /*#__PURE__*/ toObjectMap([
134
+ const baseElementProperties = toObjectMap([
135
135
  'accessKey',
136
136
  'children',
137
137
  'className',
@@ -151,18 +151,18 @@ const baseElementProperties = /*#__PURE__*/ toObjectMap([
151
151
  'spellCheck',
152
152
  'name'
153
153
  ]);
154
- const microdataProperties = /*#__PURE__*/ toObjectMap([
154
+ const microdataProperties = toObjectMap([
155
155
  'itemID',
156
156
  'itemProp',
157
157
  'itemRef',
158
158
  'itemScope',
159
159
  'itemType'
160
160
  ]);
161
- const htmlElementProperties = /*#__PURE__*/ toObjectMap(baseElementProperties, baseElementEvents, microdataProperties);
162
- const labelProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
161
+ const htmlElementProperties = toObjectMap(baseElementProperties, baseElementEvents, microdataProperties);
162
+ const labelProperties = toObjectMap(htmlElementProperties, [
163
163
  'form'
164
164
  ]);
165
- const audioProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
165
+ const audioProperties = toObjectMap(htmlElementProperties, [
166
166
  'height',
167
167
  'loop',
168
168
  'muted',
@@ -170,16 +170,16 @@ const audioProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
170
170
  'src',
171
171
  'width'
172
172
  ]);
173
- const videoProperties = /*#__PURE__*/ toObjectMap(audioProperties, [
173
+ const videoProperties = toObjectMap(audioProperties, [
174
174
  'poster'
175
175
  ]);
176
- const olProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
176
+ const olProperties = toObjectMap(htmlElementProperties, [
177
177
  'start'
178
178
  ]);
179
- const liProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
179
+ const liProperties = toObjectMap(htmlElementProperties, [
180
180
  'value'
181
181
  ]);
182
- const anchorProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
182
+ const anchorProperties = toObjectMap(htmlElementProperties, [
183
183
  'download',
184
184
  'href',
185
185
  'hrefLang',
@@ -188,10 +188,10 @@ const anchorProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
188
188
  'target',
189
189
  'type'
190
190
  ]);
191
- const timeProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
191
+ const timeProperties = toObjectMap(htmlElementProperties, [
192
192
  'dateTime'
193
193
  ]);
194
- const buttonProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
194
+ const buttonProperties = toObjectMap(htmlElementProperties, [
195
195
  'autoFocus',
196
196
  'disabled',
197
197
  'form',
@@ -203,7 +203,7 @@ const buttonProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
203
203
  'type',
204
204
  'value'
205
205
  ]);
206
- const inputProperties = /*#__PURE__*/ toObjectMap(buttonProperties, [
206
+ const inputProperties = toObjectMap(buttonProperties, [
207
207
  'accept',
208
208
  'alt',
209
209
  'autoCapitalize',
@@ -229,7 +229,7 @@ const inputProperties = /*#__PURE__*/ toObjectMap(buttonProperties, [
229
229
  'value',
230
230
  'width'
231
231
  ]);
232
- const textAreaProperties = /*#__PURE__*/ toObjectMap(buttonProperties, [
232
+ const textAreaProperties = toObjectMap(buttonProperties, [
233
233
  'autoCapitalize',
234
234
  'cols',
235
235
  'dirname',
@@ -241,42 +241,42 @@ const textAreaProperties = /*#__PURE__*/ toObjectMap(buttonProperties, [
241
241
  'rows',
242
242
  'wrap'
243
243
  ]);
244
- const selectProperties = /*#__PURE__*/ toObjectMap(buttonProperties, [
244
+ const selectProperties = toObjectMap(buttonProperties, [
245
245
  'form',
246
246
  'multiple',
247
247
  'required'
248
248
  ]);
249
- const optionProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
249
+ const optionProperties = toObjectMap(htmlElementProperties, [
250
250
  'selected',
251
251
  'value'
252
252
  ]);
253
- const tableProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
253
+ const tableProperties = toObjectMap(htmlElementProperties, [
254
254
  'cellPadding',
255
255
  'cellSpacing'
256
256
  ]);
257
257
  const trProperties = htmlElementProperties;
258
- const thProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
258
+ const thProperties = toObjectMap(htmlElementProperties, [
259
259
  'colSpan',
260
260
  'rowSpan',
261
261
  'scope'
262
262
  ]);
263
- const tdProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
263
+ const tdProperties = toObjectMap(htmlElementProperties, [
264
264
  'colSpan',
265
265
  'headers',
266
266
  'rowSpan',
267
267
  'scope'
268
268
  ]);
269
- const colGroupProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
269
+ const colGroupProperties = toObjectMap(htmlElementProperties, [
270
270
  'span'
271
271
  ]);
272
- const colProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
272
+ const colProperties = toObjectMap(htmlElementProperties, [
273
273
  'span'
274
274
  ]);
275
- const fieldsetProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
275
+ const fieldsetProperties = toObjectMap(htmlElementProperties, [
276
276
  'disabled',
277
277
  'form'
278
278
  ]);
279
- const formProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
279
+ const formProperties = toObjectMap(htmlElementProperties, [
280
280
  'acceptCharset',
281
281
  'action',
282
282
  'encType',
@@ -285,7 +285,7 @@ const formProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
285
285
  'noValidate',
286
286
  'target'
287
287
  ]);
288
- const iframeProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
288
+ const iframeProperties = toObjectMap(htmlElementProperties, [
289
289
  'allow',
290
290
  'allowFullScreen',
291
291
  'allowPaymentRequest',
@@ -299,7 +299,7 @@ const iframeProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
299
299
  'srcDoc',
300
300
  'width'
301
301
  ]);
302
- const imgProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
302
+ const imgProperties = toObjectMap(htmlElementProperties, [
303
303
  'alt',
304
304
  'crossOrigin',
305
305
  'height',
@@ -308,14 +308,13 @@ const imgProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
308
308
  'useMap',
309
309
  'width'
310
310
  ]);
311
- const dialogProperties = /*#__PURE__*/ toObjectMap(htmlElementProperties, [
311
+ const dialogProperties = toObjectMap(htmlElementProperties, [
312
312
  'open',
313
313
  'onCancel',
314
314
  'onClose'
315
315
  ]);
316
316
  const divProperties = htmlElementProperties;
317
- function getNativeProps(// eslint-disable-next-line @typescript-eslint/no-explicit-any
318
- props, allowedPropNames, excludedPropNames) {
317
+ function getNativeProps(props, allowedPropNames, excludedPropNames) {
319
318
  // It'd be great to properly type this while allowing 'aria-` and 'data-' attributes like TypeScript does for
320
319
  // JSX attributes, but that ability is hardcoded into the TS compiler with no analog in TypeScript typings.
321
320
  // Then we'd be able to enforce props extends native props (including aria- and data- attributes), and then
@@ -333,6 +332,4 @@ props, allowedPropNames, excludedPropNames) {
333
332
  }
334
333
  }
335
334
  return result;
336
- } //# sourceMappingURL=properties.js.map
337
-
338
- //# sourceMappingURL=properties.js.map
335
+ }