@fluentui/react-positioning 9.3.1 → 9.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. package/CHANGELOG.json +24 -1
  2. package/CHANGELOG.md +11 -2
  3. package/lib/constants.js.map +1 -1
  4. package/lib/createArrowStyles.js.map +1 -1
  5. package/lib/createPositionManager.js.map +1 -1
  6. package/lib/createVirtualElementFromClick.js.map +1 -1
  7. package/lib/index.js.map +1 -1
  8. package/lib/middleware/coverTarget.js.map +1 -1
  9. package/lib/middleware/flip.js.map +1 -1
  10. package/lib/middleware/index.js.map +1 -1
  11. package/lib/middleware/intersecting.js.map +1 -1
  12. package/lib/middleware/maxSize.js.map +1 -1
  13. package/lib/middleware/offset.js.map +1 -1
  14. package/lib/middleware/shift.js.map +1 -1
  15. package/lib/types.js.map +1 -1
  16. package/lib/usePositioning.js.map +1 -1
  17. package/lib/usePositioningMouseTarget.js.map +1 -1
  18. package/lib/utils/debounce.js.map +1 -1
  19. package/lib/utils/fromFloatingUIPlacement.js.map +1 -1
  20. package/lib/utils/getBoundary.js.map +1 -1
  21. package/lib/utils/getFloatingUIOffset.js.map +1 -1
  22. package/lib/utils/getReactFiberFromNode.js.map +1 -1
  23. package/lib/utils/getScrollParent.js.map +1 -1
  24. package/lib/utils/hasAutoFocusFilter.js.map +1 -1
  25. package/lib/utils/index.js.map +1 -1
  26. package/lib/utils/mergeArrowOffset.js.map +1 -1
  27. package/lib/utils/parseFloatingUIPlacement.js.map +1 -1
  28. package/lib/utils/resolvePositioningShorthand.js.map +1 -1
  29. package/lib/utils/toFloatingUIPlacement.js.map +1 -1
  30. package/lib/utils/toggleScrollListener.js.map +1 -1
  31. package/lib/utils/useCallbackRef.js.map +1 -1
  32. package/lib/utils/writeArrowUpdates.js.map +1 -1
  33. package/lib/utils/writeContainerupdates.js.map +1 -1
  34. package/lib-amd/constants.js +10 -0
  35. package/lib-amd/constants.js.map +1 -0
  36. package/lib-amd/createArrowStyles.js +62 -0
  37. package/lib-amd/createArrowStyles.js.map +1 -0
  38. package/lib-amd/createPositionManager.js +85 -0
  39. package/lib-amd/createPositionManager.js.map +1 -0
  40. package/lib-amd/createVirtualElementFromClick.js +32 -0
  41. package/lib-amd/createVirtualElementFromClick.js.map +1 -0
  42. package/lib-amd/index.js +13 -0
  43. package/lib-amd/index.js.map +1 -0
  44. package/lib-amd/middleware/coverTarget.js +32 -0
  45. package/lib-amd/middleware/coverTarget.js.map +1 -0
  46. package/lib-amd/middleware/flip.js +11 -0
  47. package/lib-amd/middleware/flip.js.map +1 -0
  48. package/lib-amd/middleware/index.js +11 -0
  49. package/lib-amd/middleware/index.js.map +1 -0
  50. package/lib-amd/middleware/intersecting.js +33 -0
  51. package/lib-amd/middleware/intersecting.js.map +1 -0
  52. package/lib-amd/middleware/maxSize.js +43 -0
  53. package/lib-amd/middleware/maxSize.js.map +1 -0
  54. package/lib-amd/middleware/offset.js +14 -0
  55. package/lib-amd/middleware/offset.js.map +1 -0
  56. package/lib-amd/middleware/shift.js +17 -0
  57. package/lib-amd/middleware/shift.js.map +1 -0
  58. package/lib-amd/types.js +5 -0
  59. package/lib-amd/types.js.map +1 -0
  60. package/lib-amd/usePositioning.js +152 -0
  61. package/lib-amd/usePositioning.js.map +1 -0
  62. package/lib-amd/usePositioningMouseTarget.js +39 -0
  63. package/lib-amd/usePositioningMouseTarget.js.map +1 -0
  64. package/lib-amd/utils/debounce.js +27 -0
  65. package/lib-amd/utils/debounce.js.map +1 -0
  66. package/lib-amd/utils/fromFloatingUIPlacement.js +37 -0
  67. package/lib-amd/utils/fromFloatingUIPlacement.js.map +1 -0
  68. package/lib-amd/utils/getBoundary.js +26 -0
  69. package/lib-amd/utils/getBoundary.js.map +1 -0
  70. package/lib-amd/utils/getFloatingUIOffset.js +25 -0
  71. package/lib-amd/utils/getFloatingUIOffset.js.map +1 -0
  72. package/lib-amd/utils/getReactFiberFromNode.js +48 -0
  73. package/lib-amd/utils/getReactFiberFromNode.js.map +1 -0
  74. package/lib-amd/utils/getScrollParent.js +64 -0
  75. package/lib-amd/utils/getScrollParent.js.map +1 -0
  76. package/lib-amd/utils/hasAutoFocusFilter.js +31 -0
  77. package/lib-amd/utils/hasAutoFocusFilter.js.map +1 -0
  78. package/lib-amd/utils/index.js +19 -0
  79. package/lib-amd/utils/index.js.map +1 -0
  80. package/lib-amd/utils/mergeArrowOffset.js +38 -0
  81. package/lib-amd/utils/mergeArrowOffset.js.map +1 -0
  82. package/lib-amd/utils/parseFloatingUIPlacement.js +20 -0
  83. package/lib-amd/utils/parseFloatingUIPlacement.js.map +1 -0
  84. package/lib-amd/utils/resolvePositioningShorthand.js +31 -0
  85. package/lib-amd/utils/resolvePositioningShorthand.js.map +1 -0
  86. package/lib-amd/utils/toFloatingUIPlacement.js +40 -0
  87. package/lib-amd/utils/toFloatingUIPlacement.js.map +1 -0
  88. package/lib-amd/utils/toggleScrollListener.js +26 -0
  89. package/lib-amd/utils/toggleScrollListener.js.map +1 -0
  90. package/lib-amd/utils/useCallbackRef.js +55 -0
  91. package/lib-amd/utils/useCallbackRef.js.map +1 -0
  92. package/lib-amd/utils/writeArrowUpdates.js +21 -0
  93. package/lib-amd/utils/writeArrowUpdates.js.map +1 -0
  94. package/lib-amd/utils/writeContainerupdates.js +34 -0
  95. package/lib-amd/utils/writeContainerupdates.js.map +1 -0
  96. package/lib-commonjs/constants.js.map +1 -1
  97. package/lib-commonjs/createArrowStyles.js.map +1 -1
  98. package/lib-commonjs/createPositionManager.js.map +1 -1
  99. package/lib-commonjs/createVirtualElementFromClick.js.map +1 -1
  100. package/lib-commonjs/index.js.map +1 -1
  101. package/lib-commonjs/middleware/coverTarget.js.map +1 -1
  102. package/lib-commonjs/middleware/flip.js.map +1 -1
  103. package/lib-commonjs/middleware/index.js.map +1 -1
  104. package/lib-commonjs/middleware/intersecting.js.map +1 -1
  105. package/lib-commonjs/middleware/maxSize.js.map +1 -1
  106. package/lib-commonjs/middleware/offset.js.map +1 -1
  107. package/lib-commonjs/middleware/shift.js.map +1 -1
  108. package/lib-commonjs/usePositioning.js.map +1 -1
  109. package/lib-commonjs/usePositioningMouseTarget.js.map +1 -1
  110. package/lib-commonjs/utils/debounce.js.map +1 -1
  111. package/lib-commonjs/utils/fromFloatingUIPlacement.js.map +1 -1
  112. package/lib-commonjs/utils/getBoundary.js.map +1 -1
  113. package/lib-commonjs/utils/getFloatingUIOffset.js.map +1 -1
  114. package/lib-commonjs/utils/getReactFiberFromNode.js.map +1 -1
  115. package/lib-commonjs/utils/getScrollParent.js.map +1 -1
  116. package/lib-commonjs/utils/hasAutoFocusFilter.js.map +1 -1
  117. package/lib-commonjs/utils/index.js.map +1 -1
  118. package/lib-commonjs/utils/mergeArrowOffset.js.map +1 -1
  119. package/lib-commonjs/utils/parseFloatingUIPlacement.js.map +1 -1
  120. package/lib-commonjs/utils/resolvePositioningShorthand.js.map +1 -1
  121. package/lib-commonjs/utils/toFloatingUIPlacement.js.map +1 -1
  122. package/lib-commonjs/utils/toggleScrollListener.js.map +1 -1
  123. package/lib-commonjs/utils/useCallbackRef.js.map +1 -1
  124. package/lib-commonjs/utils/writeArrowUpdates.js.map +1 -1
  125. package/lib-commonjs/utils/writeContainerupdates.js.map +1 -1
  126. package/package.json +4 -5
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/debounce.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;;AACH,SAAgB,QAAhB,CAA4B,EAA5B,EAAwC;EACtC,IAAI,OAAJ;EACA,OAAO,MAAK;IACV,IAAI,CAAC,OAAL,EAAc;MACZ,OAAO,GAAG,IAAI,OAAJ,CAAe,OAAO,IAAG;QACjC,OAAO,CAAC,OAAR,GAAkB,IAAlB,CAAuB,MAAK;UAC1B,OAAO,GAAG,SAAV;UACA,OAAO,CAAC,EAAE,EAAH,CAAP;QACD,CAHD;MAID,CALS,CAAV;IAMD;;IAED,OAAO,OAAP;EACD,CAXD;AAYD;;AAdD,OAAA,CAAA,QAAA,GAAA,QAAA","sourcesContent":["/**\n * Promise microtask debouncer used by Popper.js v2\n * This is no longer exported in Floating UI (Popper.js v3)\n * https://github.com/floating-ui/floating-ui/blob/v2.x/src/utils/debounce.js\n * @param fn function that will be debounced\n */\nexport function debounce<T>(fn: Function): () => Promise<T> {\n let pending: Promise<T> | undefined;\n return () => {\n if (!pending) {\n pending = new Promise<T>(resolve => {\n Promise.resolve().then(() => {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-positioning/src/utils/debounce.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;;AACH,SAAgB,QAAhB,CAA4B,EAA5B,EAAwC;EACtC,IAAI,OAAJ;EACA,OAAO,MAAK;IACV,IAAI,CAAC,OAAL,EAAc;MACZ,OAAO,GAAG,IAAI,OAAJ,CAAe,OAAO,IAAG;QACjC,OAAO,CAAC,OAAR,GAAkB,IAAlB,CAAuB,MAAK;UAC1B,OAAO,GAAG,SAAV;UACA,OAAO,CAAC,EAAE,EAAH,CAAP;QACD,CAHD;MAID,CALS,CAAV;IAMD;;IAED,OAAO,OAAP;EACD,CAXD;AAYD;;AAdD,OAAA,CAAA,QAAA,GAAA,QAAA","sourcesContent":["/**\n * Promise microtask debouncer used by Popper.js v2\n * This is no longer exported in Floating UI (Popper.js v3)\n * https://github.com/floating-ui/floating-ui/blob/v2.x/src/utils/debounce.js\n * @param fn function that will be debounced\n */\nexport function debounce<T>(fn: Function): () => Promise<T> {\n let pending: Promise<T> | undefined;\n return () => {\n if (!pending) {\n pending = new Promise<T>(resolve => {\n Promise.resolve().then(() => {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/fromFloatingUIPlacement.ts"],"names":[],"mappings":";;;;;;;AAEA,MAAA,0BAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;;AAEA,MAAM,cAAc,GAAG,OAA+B;EACpD,GAAG,EAAE,OAD+C;EAEpD,MAAM,EAAE,OAF4C;EAGpD,KAAK,EAAE,OAH6C;EAIpD,IAAI,EAAE;AAJ8C,CAA/B,CAAvB,C,CAOA;AACA;;;AACA,MAAM,eAAe,GAAI,QAAD,IAA+D;EACrF,IAAI,QAAQ,KAAK,OAAb,IAAwB,QAAQ,KAAK,OAAzC,EAAkD;IAChD,OAAO;MACL,KAAK,EAAE,OADF;MAEL,GAAG,EAAE;IAFA,CAAP;EAID;;EAED,OAAO;IACL,KAAK,EAAE,KADF;IAEL,GAAG,EAAE;EAFA,CAAP;AAID,CAZD;AAcA;;;AAGG;;;AACI,MAAM,uBAAuB,GAAI,SAAD,IAAwE;EAC7G,MAAM;IAAE,IAAF;IAAQ,SAAS,EAAE;EAAnB,IAA2C,0BAAA,CAAA,wBAAA,CAAyB,SAAzB,CAAjD;EACA,MAAM,QAAQ,GAAG,cAAc,GAAG,IAAH,CAA/B;EACA,MAAM,SAAS,GAAG,mBAAmB,IAAI,eAAe,CAAC,QAAD,CAAf,CAA0B,mBAA1B,CAAzC;EAEA,OAAO;IAAE,QAAF;IAAY;EAAZ,CAAP;AACD,CANM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import type { Side, Alignment as FloatingUIAlignment, Placement } from '@floating-ui/dom';\nimport type { Alignment, Position } from '../types';\nimport { parseFloatingUIPlacement } from './parseFloatingUIPlacement';\n\nconst getPositionMap = (): Record<Side, Position> => ({\n top: 'above',\n bottom: 'below',\n right: 'after',\n left: 'before',\n});\n\n// Floating UI automatically flips alignment\n// https://github.com/floating-ui/floating-ui/issues/1563\nconst getAlignmentMap = (position: Position): Record<FloatingUIAlignment, Alignment> => {\n if (position === 'above' || position === 'below') {\n return {\n start: 'start',\n end: 'end',\n };\n }\n\n return {\n start: 'top',\n end: 'bottom',\n };\n};\n\n/**\n * Maps Floating UI placement to positioning values\n * @see positioningHelper.test.ts for expected placement values\n */\nexport const fromFloatingUIPlacement = (placement: Placement): { position: Position; alignment?: Alignment } => {\n const { side, alignment: floatingUIAlignment } = parseFloatingUIPlacement(placement);\n const position = getPositionMap()[side];\n const alignment = floatingUIAlignment && getAlignmentMap(position)[floatingUIAlignment];\n\n return { position, alignment };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-positioning/src/utils/fromFloatingUIPlacement.ts"],"names":[],"mappings":";;;;;;;AAEA,MAAA,0BAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;;AAEA,MAAM,cAAc,GAAG,OAA+B;EACpD,GAAG,EAAE,OAD+C;EAEpD,MAAM,EAAE,OAF4C;EAGpD,KAAK,EAAE,OAH6C;EAIpD,IAAI,EAAE;AAJ8C,CAA/B,CAAvB,C,CAOA;AACA;;;AACA,MAAM,eAAe,GAAI,QAAD,IAA+D;EACrF,IAAI,QAAQ,KAAK,OAAb,IAAwB,QAAQ,KAAK,OAAzC,EAAkD;IAChD,OAAO;MACL,KAAK,EAAE,OADF;MAEL,GAAG,EAAE;IAFA,CAAP;EAID;;EAED,OAAO;IACL,KAAK,EAAE,KADF;IAEL,GAAG,EAAE;EAFA,CAAP;AAID,CAZD;AAcA;;;AAGG;;;AACI,MAAM,uBAAuB,GAAI,SAAD,IAAwE;EAC7G,MAAM;IAAE,IAAF;IAAQ,SAAS,EAAE;EAAnB,IAA2C,0BAAA,CAAA,wBAAA,CAAyB,SAAzB,CAAjD;EACA,MAAM,QAAQ,GAAG,cAAc,GAAG,IAAH,CAA/B;EACA,MAAM,SAAS,GAAG,mBAAmB,IAAI,eAAe,CAAC,QAAD,CAAf,CAA0B,mBAA1B,CAAzC;EAEA,OAAO;IAAE,QAAF;IAAY;EAAZ,CAAP;AACD,CANM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import type { Side, Alignment as FloatingUIAlignment, Placement } from '@floating-ui/dom';\nimport type { Alignment, Position } from '../types';\nimport { parseFloatingUIPlacement } from './parseFloatingUIPlacement';\n\nconst getPositionMap = (): Record<Side, Position> => ({\n top: 'above',\n bottom: 'below',\n right: 'after',\n left: 'before',\n});\n\n// Floating UI automatically flips alignment\n// https://github.com/floating-ui/floating-ui/issues/1563\nconst getAlignmentMap = (position: Position): Record<FloatingUIAlignment, Alignment> => {\n if (position === 'above' || position === 'below') {\n return {\n start: 'start',\n end: 'end',\n };\n }\n\n return {\n start: 'top',\n end: 'bottom',\n };\n};\n\n/**\n * Maps Floating UI placement to positioning values\n * @see positioningHelper.test.ts for expected placement values\n */\nexport const fromFloatingUIPlacement = (placement: Placement): { position: Position; alignment?: Alignment } => {\n const { side, alignment: floatingUIAlignment } = parseFloatingUIPlacement(placement);\n const position = getPositionMap()[side];\n const alignment = floatingUIAlignment && getAlignmentMap(position)[floatingUIAlignment];\n\n return { position, alignment };\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/getBoundary.ts"],"names":[],"mappings":";;;;;;;AAEA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;AAGA;;AAEG;;;AACH,SAAgB,WAAhB,CAA4B,OAA5B,EAAyD,QAAzD,EAA4E;EAC1E,IAAI,QAAQ,KAAK,QAAjB,EAA2B;IACzB,OAAO,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,aAAT,CAAwB,eAA/B;EACD;;EAED,IAAI,QAAQ,KAAK,iBAAjB,EAAoC;IAClC,OAAO,mBAAP;EACD;;EAED,IAAI,QAAQ,KAAK,cAAjB,EAAiC;IAC/B,IAAI,cAAc,GAA4B,iBAAA,CAAA,eAAA,CAAgB,OAAhB,CAA9C;;IAEA,IAAI,cAAc,CAAC,QAAf,KAA4B,MAAhC,EAAwC;MACtC,cAAc,GAAG,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,aAAT,CAAwB,eAAzC;IACD;;IAED,OAAO,cAAP;EACD;;EAED,OAAO,QAAP;AACD;;AApBD,OAAA,CAAA,WAAA,GAAA,WAAA","sourcesContent":["import type { Boundary as FloatingUIBoundary } from '@floating-ui/dom';\n\nimport { getScrollParent } from './getScrollParent';\nimport type { Boundary } from '../types';\n\n/**\n * Allows to mimic a behavior from V1 of Popper and accept `window` and `scrollParent` as strings.\n */\nexport function getBoundary(element: HTMLElement | null, boundary?: Boundary): FloatingUIBoundary | undefined {\n if (boundary === 'window') {\n return element?.ownerDocument!.documentElement;\n }\n\n if (boundary === 'clippingParents') {\n return 'clippingAncestors';\n }\n\n if (boundary === 'scrollParent') {\n let boundariesNode: HTMLElement | undefined = getScrollParent(element);\n\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = element?.ownerDocument!.documentElement;\n }\n\n return boundariesNode;\n }\n\n return boundary;\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-positioning/src/utils/getBoundary.ts"],"names":[],"mappings":";;;;;;;AAEA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;AAGA;;AAEG;;;AACH,SAAgB,WAAhB,CAA4B,OAA5B,EAAyD,QAAzD,EAA4E;EAC1E,IAAI,QAAQ,KAAK,QAAjB,EAA2B;IACzB,OAAO,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,aAAT,CAAwB,eAA/B;EACD;;EAED,IAAI,QAAQ,KAAK,iBAAjB,EAAoC;IAClC,OAAO,mBAAP;EACD;;EAED,IAAI,QAAQ,KAAK,cAAjB,EAAiC;IAC/B,IAAI,cAAc,GAA4B,iBAAA,CAAA,eAAA,CAAgB,OAAhB,CAA9C;;IAEA,IAAI,cAAc,CAAC,QAAf,KAA4B,MAAhC,EAAwC;MACtC,cAAc,GAAG,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,aAAT,CAAwB,eAAzC;IACD;;IAED,OAAO,cAAP;EACD;;EAED,OAAO,QAAP;AACD;;AApBD,OAAA,CAAA,WAAA,GAAA,WAAA","sourcesContent":["import type { Boundary as FloatingUIBoundary } from '@floating-ui/dom';\n\nimport { getScrollParent } from './getScrollParent';\nimport type { Boundary } from '../types';\n\n/**\n * Allows to mimic a behavior from V1 of Popper and accept `window` and `scrollParent` as strings.\n */\nexport function getBoundary(element: HTMLElement | null, boundary?: Boundary): FloatingUIBoundary | undefined {\n if (boundary === 'window') {\n return element?.ownerDocument!.documentElement;\n }\n\n if (boundary === 'clippingParents') {\n return 'clippingAncestors';\n }\n\n if (boundary === 'scrollParent') {\n let boundariesNode: HTMLElement | undefined = getScrollParent(element);\n\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = element?.ownerDocument!.documentElement;\n }\n\n return boundariesNode;\n }\n\n return boundary;\n}\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/getFloatingUIOffset.ts"],"names":[],"mappings":";;;;;;;AAEA,MAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAgCA;;;;AAIG;;;AACH,SAAgB,mBAAhB,CACE,SADF,EAC+B;EAE7B,IAAI,CAAC,SAAL,EAAgB;IACd,OAAO,SAAP;EACD;;EAED,IAAI,OAAO,SAAP,KAAqB,QAArB,IAAiC,OAAO,SAAP,KAAqB,QAA1D,EAAoE;IAClE,OAAO,SAAP;EACD;;EAED,OAAO,CAAC;IAAE,KAAK,EAAE;MAAE,QAAF;MAAY;IAAZ,CAAT;IAAkC;EAAlC,CAAD,KAAkD;IACvD,MAAM;MAAE,QAAF;MAAY;IAAZ,IAA0B,yBAAA,CAAA,uBAAA,CAAwB,SAAxB,CAAhC;IACA,OAAO,SAAS,CAAC;MAAE,cAAc,EAAE,QAAlB;MAA4B,UAAU,EAAE,SAAxC;MAAmD,QAAnD;MAA6D;IAA7D,CAAD,CAAhB;EACD,CAHD;AAID;;AAfD,OAAA,CAAA,mBAAA,GAAA,mBAAA","sourcesContent":["import type { Offset } from '../types';\nimport type { MiddlewareArguments } from '@floating-ui/dom';\nimport { fromFloatingUIPlacement } from './fromFloatingUIPlacement';\n/**\n * Type taken from Floating UI since they are not exported\n */\nexport type FloatingUIOffsetValue =\n | number\n | {\n /**\n * The axis that runs along the side of the floating element.\n * @default 0\n */\n mainAxis?: number;\n /**\n * The axis that runs along the alignment of the floating element.\n * @default 0\n */\n crossAxis?: number;\n /**\n * When set to a number, overrides the `crossAxis` value for aligned\n * (non-centered/base) placements and works logically. A positive number\n * will move the floating element in the direction of the opposite edge\n * to the one that is aligned, while a negative number the reverse.\n * @default null\n */\n alignmentAxis?: number | null;\n };\n\n/**\n * Type taken from Floating UI since they are not exported\n */\nexport type FloatingUIOffsetFunction = (args: MiddlewareArguments) => FloatingUIOffsetValue;\n\n/**\n * Shim to transform offset values from this library to Floating UI\n * @param rawOffset Offset from this library\n * @returns An offset value compatible with Floating UI\n */\nexport function getFloatingUIOffset(\n rawOffset: Offset | undefined,\n): FloatingUIOffsetValue | FloatingUIOffsetFunction | undefined {\n if (!rawOffset) {\n return rawOffset;\n }\n\n if (typeof rawOffset === 'number' || typeof rawOffset === 'object') {\n return rawOffset;\n }\n\n return ({ rects: { floating, reference }, placement }) => {\n const { position, alignment } = fromFloatingUIPlacement(placement);\n return rawOffset({ positionedRect: floating, targetRect: reference, position, alignment });\n };\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-positioning/src/utils/getFloatingUIOffset.ts"],"names":[],"mappings":";;;;;;;AAEA,MAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAgCA;;;;AAIG;;;AACH,SAAgB,mBAAhB,CACE,SADF,EAC+B;EAE7B,IAAI,CAAC,SAAL,EAAgB;IACd,OAAO,SAAP;EACD;;EAED,IAAI,OAAO,SAAP,KAAqB,QAArB,IAAiC,OAAO,SAAP,KAAqB,QAA1D,EAAoE;IAClE,OAAO,SAAP;EACD;;EAED,OAAO,CAAC;IAAE,KAAK,EAAE;MAAE,QAAF;MAAY;IAAZ,CAAT;IAAkC;EAAlC,CAAD,KAAkD;IACvD,MAAM;MAAE,QAAF;MAAY;IAAZ,IAA0B,yBAAA,CAAA,uBAAA,CAAwB,SAAxB,CAAhC;IACA,OAAO,SAAS,CAAC;MAAE,cAAc,EAAE,QAAlB;MAA4B,UAAU,EAAE,SAAxC;MAAmD,QAAnD;MAA6D;IAA7D,CAAD,CAAhB;EACD,CAHD;AAID;;AAfD,OAAA,CAAA,mBAAA,GAAA,mBAAA","sourcesContent":["import type { Offset } from '../types';\nimport type { MiddlewareArguments } from '@floating-ui/dom';\nimport { fromFloatingUIPlacement } from './fromFloatingUIPlacement';\n/**\n * Type taken from Floating UI since they are not exported\n */\nexport type FloatingUIOffsetValue =\n | number\n | {\n /**\n * The axis that runs along the side of the floating element.\n * @default 0\n */\n mainAxis?: number;\n /**\n * The axis that runs along the alignment of the floating element.\n * @default 0\n */\n crossAxis?: number;\n /**\n * When set to a number, overrides the `crossAxis` value for aligned\n * (non-centered/base) placements and works logically. A positive number\n * will move the floating element in the direction of the opposite edge\n * to the one that is aligned, while a negative number the reverse.\n * @default null\n */\n alignmentAxis?: number | null;\n };\n\n/**\n * Type taken from Floating UI since they are not exported\n */\nexport type FloatingUIOffsetFunction = (args: MiddlewareArguments) => FloatingUIOffsetValue;\n\n/**\n * Shim to transform offset values from this library to Floating UI\n * @param rawOffset Offset from this library\n * @returns An offset value compatible with Floating UI\n */\nexport function getFloatingUIOffset(\n rawOffset: Offset | undefined,\n): FloatingUIOffsetValue | FloatingUIOffsetFunction | undefined {\n if (!rawOffset) {\n return rawOffset;\n }\n\n if (typeof rawOffset === 'number' || typeof rawOffset === 'object') {\n return rawOffset;\n }\n\n return ({ rects: { floating, reference }, placement }) => {\n const { position, alignment } = fromFloatingUIPlacement(placement);\n return rawOffset({ positionedRect: floating, targetRect: reference, position, alignment });\n };\n}\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/getReactFiberFromNode.ts"],"names":[],"mappings":";;;;;;AAuEA,IAAK,OAAL;;AAAA,CAAA,UAAK,OAAL,EAAY;EACV,OAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,mBAAA;EACA,OAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,gBAAA;EACA,OAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,wBAAA;EACA,OAAA,CAAA,OAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAA;EACA,OAAA,CAAA,OAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAA;EACA,OAAA,CAAA,OAAA,CAAA,eAAA,CAAA,GAAA,CAAA,CAAA,GAAA,eAAA;EACA,OAAA,CAAA,OAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAA;EACA,OAAA,CAAA,OAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAA;EACA,OAAA,CAAA,OAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAA;EACA,OAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,iBAAA;EACA,OAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,iBAAA;EACA,OAAA,CAAA,OAAA,CAAA,YAAA,CAAA,GAAA,EAAA,CAAA,GAAA,YAAA;EACA,OAAA,CAAA,OAAA,CAAA,UAAA,CAAA,GAAA,EAAA,CAAA,GAAA,UAAA;EACA,OAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,mBAAA;EACA,OAAA,CAAA,OAAA,CAAA,eAAA,CAAA,GAAA,EAAA,CAAA,GAAA,eAAA;EACA,OAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,qBAAA;EACA,OAAA,CAAA,OAAA,CAAA,eAAA,CAAA,GAAA,EAAA,CAAA,GAAA,eAAA;EACA,OAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,GAAA,EAAA,CAAA,GAAA,0BAAA;EACA,OAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,oBAAA;EACA,OAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,uBAAA;EACA,OAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,sBAAA;EACA,OAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,gBAAA;AACD,CAvBD,EAAK,OAAO,KAAP,OAAO,GAAA,EAAA,CAAZ;;AAsLA,SAAgB,qBAAhB,CAAsC,GAAtC,EAA2D;EACzD,IAAI,CAAC,GAAL,EAAU;IACR,OAAO,IAAP;EACD;;EAED,KAAK,MAAM,CAAX,IAAgB,GAAhB,EAAqB;IACnB;IACA;IACA;IACA,IAAI,CAAC,CAAC,OAAF,CAAU,0BAAV,MAA0C,CAA1C,IAA+C,CAAC,CAAC,OAAF,CAAU,eAAV,MAA+B,CAAlF,EAAqF;MACnF;MACA;MACA,OAAO,GAAG,CAAC,CAAD,CAAV;IACD;EACF;;EAED,MAAM,IAAI,KAAJ,CAAU,yDAAV,CAAN;AACD;;AAjBD,OAAA,CAAA,qBAAA,GAAA,qBAAA","sourcesContent":["import * as React from 'react';\n\n// ========================================================\n// react/packages/shared/ReactTypes.js\n// ========================================================\n\ntype ReactEventResponder<E, C> = {\n $$typeof: Symbol | number;\n displayName: string;\n targetEventTypes: null | string[];\n rootEventTypes: null | string[];\n getInitialState: null | ((props: Object) => Object);\n onEvent: null | ((event: E, context: C, props: Object, state: Object) => void);\n onRootEvent: null | ((event: E, context: C, props: Object, state: Object) => void);\n onMount: null | ((context: C, props: Object, state: Object) => void);\n onUnmount: null | ((context: C, props: Object, state: Object) => void);\n};\n\ntype ReactEventResponderInstance<E, C> = {\n fiber: Object;\n props: Object;\n responder: ReactEventResponder<E, C>;\n rootEventTypes: null | Set<string>;\n state: Object;\n};\n\n// ========================================================\n// react/packages/react-reconciler/src/ReactFiberHooks.js\n// ========================================================\n\nexport type HookType =\n | 'useState'\n | 'useReducer'\n | 'useContext'\n | 'useRef'\n | 'useEffect'\n | 'useLayoutEffect'\n | 'useCallback'\n | 'useMemo'\n | 'useImperativeHandle'\n | 'useDebugValue'\n | 'useResponder';\n\ntype ReactProviderType<T> = {\n $$typeof: Symbol | number;\n _context: ReactContext<T>;\n};\n\ntype ReactContext<T> = {\n $$typeof: Symbol | number;\n Consumer: ReactContext<T>;\n Provider: ReactProviderType<T>;\n\n _calculateChangedBits: ((a: T, b: T) => number) | null;\n\n _currentValue: T;\n _currentValue2: T;\n _threadCount: number;\n\n // DEV only\n _currentRenderer?: Object | null;\n _currentRenderer2?: Object | null;\n};\n\ntype ContextDependency<T> = {\n context: ReactContext<T>;\n observedBits: number;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n next: ContextDependency<any> | null;\n};\n\nenum WorkTag {\n FunctionComponent = 0,\n ClassComponent = 1,\n IndeterminateComponent = 2, // Before we know whether it is function or class\n HostRoot = 3, // Root of a host tree. Could be nested inside another node.\n HostPortal = 4, // A subtree. Could be an entry point to a different renderer.\n HostComponent = 5,\n HostText = 6,\n Fragment = 7,\n Mode = 8,\n ContextConsumer = 9,\n ContextProvider = 10,\n ForwardRef = 11,\n Profiler = 12,\n SuspenseComponent = 13,\n MemoComponent = 14,\n SimpleMemoComponent = 15,\n LazyComponent = 16,\n IncompleteClassComponent = 17,\n DehydratedFragment = 18,\n SuspenseListComponent = 19,\n FundamentalComponent = 20,\n ScopeComponent = 21,\n}\n\ntype Source = {\n fileName: string;\n lineNumber: number;\n};\n\ntype ExpirationTime = number;\n\ntype Dependencies = {\n expirationTime: ExpirationTime;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n firstContext: ContextDependency<any> | null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n responders: Map<ReactEventResponder<any, any>, ReactEventResponderInstance<any, any>> | null;\n};\n\n// ========================================================\n// react/packages/react-reconciler/src/ReactFiber.js\n// ========================================================\n\n// A Fiber is work on a Component that needs to be done or was done. There can\n// be more than one per component.\n\nexport type Fiber = {\n // These first fields are conceptually members of an Instance. This used to\n // be split into a separate type and intersected with the other Fiber fields,\n // but until Flow fixes its intersection bugs, we've merged them into a\n // single type.\n\n // An Instance is shared between all versions of a component. We can easily\n // break this out into a separate object to avoid copying so much to the\n // alternate versions of the tree. We put this on a single object for now to\n // minimize the number of objects created during the initial render.\n\n // Tag identifying the type of fiber.\n tag: WorkTag;\n\n // Unique identifier of this child.\n key: null | string;\n\n // The value of element.type which is used to preserve the identity during\n // reconciliation of this child.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n elementType: any;\n\n // The resolved function/class/ associated with this fiber.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type: any;\n\n // The local state associated with this fiber.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n stateNode: any;\n\n // Conceptual aliases\n // parent : Instance -> return The parent happens to be the same as the\n // return fiber since we've merged the fiber and instance.\n\n // Remaining fields belong to Fiber\n\n // The Fiber to return to after finishing processing this one.\n // This is effectively the parent, but there can be multiple parents (two)\n // so this is only the parent of the thing we're currently processing.\n // It is conceptually the same as the return address of a stack frame.\n return: Fiber | null;\n\n // Singly Linked List Tree Structure.\n child: Fiber | null;\n sibling: Fiber | null;\n index: number;\n\n // The ref last used to attach this node.\n // I'll avoid adding an owner field for prod and model that as functions.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref: React.Ref<any>;\n\n // Input is the data coming into process this fiber. Arguments. Props.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n pendingProps: any; // This type will be more specific once we overload the tag.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n memoizedProps: any; // The props used to create the output.\n\n // A queue of state updates and callbacks.\n // updateQueue: UpdateQueue<any> | null,\n\n // The state used to create the output\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n memoizedState: any;\n\n // Dependencies (contexts, events) for this fiber, if it has any\n dependencies: Dependencies | null;\n\n // // Bitfield that describes properties about the fiber and its subtree. E.g.\n // // the ConcurrentMode flag indicates whether the subtree should be async-by-\n // // default. When a fiber is created, it inherits the mode of its\n // // parent. Additional flags can be set at creation time, but after that the\n // // value should remain unchanged throughout the fiber's lifetime, particularly\n // // before its child fibers are created.\n // mode: TypeOfMode\n //\n // // Effect\n // effectTag: SideEffectTag\n\n // Singly linked list fast path to the next fiber with side-effects.\n nextEffect: Fiber | null;\n\n // The first and last fiber with side-effect within this subtree. This allows\n // us to reuse a slice of the linked list when we reuse the work done within\n // this fiber.\n firstEffect: Fiber | null;\n lastEffect: Fiber | null;\n\n // Represents a time in the future by which this work should be completed.\n // Does not include work found in its subtree.\n expirationTime: ExpirationTime;\n\n // This is used to quickly determine if a subtree has no pending changes.\n childExpirationTime: ExpirationTime;\n\n // This is a pooled version of a Fiber. Every fiber that gets updated will\n // eventually have a pair. There are cases when we can clean up pairs to save\n // memory if we need to.\n alternate: Fiber | null;\n\n // Time spent rendering this Fiber and its descendants for the current update.\n // This tells us how well the tree makes use of sCU for memoization.\n // It is reset to 0 each time we render and only updated when we don't bailout.\n // This field is only set when the enableProfilerTimer flag is enabled.\n actualDuration?: number;\n\n // If the Fiber is currently active in the \"render\" phase,\n // This marks the time at which the work began.\n // This field is only set when the enableProfilerTimer flag is enabled.\n actualStartTime?: number;\n\n // Duration of the most recent render time for this Fiber.\n // This value is not updated when we bailout for memoization purposes.\n // This field is only set when the enableProfilerTimer flag is enabled.\n selfBaseDuration?: number;\n\n // Sum of base times for all descendants of this Fiber.\n // This value bubbles up during the \"complete\" phase.\n // This field is only set when the enableProfilerTimer flag is enabled.\n treeBaseDuration?: number;\n\n // Conceptual aliases\n // workInProgress : Fiber -> alternate The alternate used for reuse happens\n // to be the same as work in progress.\n // __DEV__ only\n _debugID?: number;\n _debugSource?: Source | null;\n _debugOwner?: Fiber | null;\n _debugIsCurrentlyTiming?: boolean;\n _debugNeedsRemount?: boolean;\n\n // Used to verify that the order of hooks does not change between renders.\n _debugHookTypes?: HookType[] | null;\n};\n\nexport function getReactFiberFromNode(elm: Node | undefined): Fiber | null {\n if (!elm) {\n return null;\n }\n\n for (const k in elm) {\n // React 16 uses \"__reactInternalInstance$\" prefix\n // React 17 uses \"__reactFiber$\" prefix\n // https://github.com/facebook/react/pull/18377\n if (k.indexOf('__reactInternalInstance$') === 0 || k.indexOf('__reactFiber$') === 0) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return elm[k];\n }\n }\n\n throw new Error('getReactFiber(): Failed to find a React Fiber on a node');\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-positioning/src/utils/getReactFiberFromNode.ts"],"names":[],"mappings":";;;;;;AAuEA,IAAK,OAAL;;AAAA,CAAA,UAAK,OAAL,EAAY;EACV,OAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,mBAAA;EACA,OAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,gBAAA;EACA,OAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,wBAAA;EACA,OAAA,CAAA,OAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAA;EACA,OAAA,CAAA,OAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAA;EACA,OAAA,CAAA,OAAA,CAAA,eAAA,CAAA,GAAA,CAAA,CAAA,GAAA,eAAA;EACA,OAAA,CAAA,OAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAA;EACA,OAAA,CAAA,OAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAA;EACA,OAAA,CAAA,OAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAA;EACA,OAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,iBAAA;EACA,OAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,iBAAA;EACA,OAAA,CAAA,OAAA,CAAA,YAAA,CAAA,GAAA,EAAA,CAAA,GAAA,YAAA;EACA,OAAA,CAAA,OAAA,CAAA,UAAA,CAAA,GAAA,EAAA,CAAA,GAAA,UAAA;EACA,OAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,mBAAA;EACA,OAAA,CAAA,OAAA,CAAA,eAAA,CAAA,GAAA,EAAA,CAAA,GAAA,eAAA;EACA,OAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,qBAAA;EACA,OAAA,CAAA,OAAA,CAAA,eAAA,CAAA,GAAA,EAAA,CAAA,GAAA,eAAA;EACA,OAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,GAAA,EAAA,CAAA,GAAA,0BAAA;EACA,OAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,oBAAA;EACA,OAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,uBAAA;EACA,OAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,sBAAA;EACA,OAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,gBAAA;AACD,CAvBD,EAAK,OAAO,KAAP,OAAO,GAAA,EAAA,CAAZ;;AAsLA,SAAgB,qBAAhB,CAAsC,GAAtC,EAA2D;EACzD,IAAI,CAAC,GAAL,EAAU;IACR,OAAO,IAAP;EACD;;EAED,KAAK,MAAM,CAAX,IAAgB,GAAhB,EAAqB;IACnB;IACA;IACA;IACA,IAAI,CAAC,CAAC,OAAF,CAAU,0BAAV,MAA0C,CAA1C,IAA+C,CAAC,CAAC,OAAF,CAAU,eAAV,MAA+B,CAAlF,EAAqF;MACnF;MACA;MACA,OAAO,GAAG,CAAC,CAAD,CAAV;IACD;EACF;;EAED,MAAM,IAAI,KAAJ,CAAU,yDAAV,CAAN;AACD;;AAjBD,OAAA,CAAA,qBAAA,GAAA,qBAAA","sourcesContent":["import * as React from 'react';\n\n// ========================================================\n// react/packages/shared/ReactTypes.js\n// ========================================================\n\ntype ReactEventResponder<E, C> = {\n $$typeof: Symbol | number;\n displayName: string;\n targetEventTypes: null | string[];\n rootEventTypes: null | string[];\n getInitialState: null | ((props: Object) => Object);\n onEvent: null | ((event: E, context: C, props: Object, state: Object) => void);\n onRootEvent: null | ((event: E, context: C, props: Object, state: Object) => void);\n onMount: null | ((context: C, props: Object, state: Object) => void);\n onUnmount: null | ((context: C, props: Object, state: Object) => void);\n};\n\ntype ReactEventResponderInstance<E, C> = {\n fiber: Object;\n props: Object;\n responder: ReactEventResponder<E, C>;\n rootEventTypes: null | Set<string>;\n state: Object;\n};\n\n// ========================================================\n// react/packages/react-reconciler/src/ReactFiberHooks.js\n// ========================================================\n\nexport type HookType =\n | 'useState'\n | 'useReducer'\n | 'useContext'\n | 'useRef'\n | 'useEffect'\n | 'useLayoutEffect'\n | 'useCallback'\n | 'useMemo'\n | 'useImperativeHandle'\n | 'useDebugValue'\n | 'useResponder';\n\ntype ReactProviderType<T> = {\n $$typeof: Symbol | number;\n _context: ReactContext<T>;\n};\n\ntype ReactContext<T> = {\n $$typeof: Symbol | number;\n Consumer: ReactContext<T>;\n Provider: ReactProviderType<T>;\n\n _calculateChangedBits: ((a: T, b: T) => number) | null;\n\n _currentValue: T;\n _currentValue2: T;\n _threadCount: number;\n\n // DEV only\n _currentRenderer?: Object | null;\n _currentRenderer2?: Object | null;\n};\n\ntype ContextDependency<T> = {\n context: ReactContext<T>;\n observedBits: number;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n next: ContextDependency<any> | null;\n};\n\nenum WorkTag {\n FunctionComponent = 0,\n ClassComponent = 1,\n IndeterminateComponent = 2, // Before we know whether it is function or class\n HostRoot = 3, // Root of a host tree. Could be nested inside another node.\n HostPortal = 4, // A subtree. Could be an entry point to a different renderer.\n HostComponent = 5,\n HostText = 6,\n Fragment = 7,\n Mode = 8,\n ContextConsumer = 9,\n ContextProvider = 10,\n ForwardRef = 11,\n Profiler = 12,\n SuspenseComponent = 13,\n MemoComponent = 14,\n SimpleMemoComponent = 15,\n LazyComponent = 16,\n IncompleteClassComponent = 17,\n DehydratedFragment = 18,\n SuspenseListComponent = 19,\n FundamentalComponent = 20,\n ScopeComponent = 21,\n}\n\ntype Source = {\n fileName: string;\n lineNumber: number;\n};\n\ntype ExpirationTime = number;\n\ntype Dependencies = {\n expirationTime: ExpirationTime;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n firstContext: ContextDependency<any> | null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n responders: Map<ReactEventResponder<any, any>, ReactEventResponderInstance<any, any>> | null;\n};\n\n// ========================================================\n// react/packages/react-reconciler/src/ReactFiber.js\n// ========================================================\n\n// A Fiber is work on a Component that needs to be done or was done. There can\n// be more than one per component.\n\nexport type Fiber = {\n // These first fields are conceptually members of an Instance. This used to\n // be split into a separate type and intersected with the other Fiber fields,\n // but until Flow fixes its intersection bugs, we've merged them into a\n // single type.\n\n // An Instance is shared between all versions of a component. We can easily\n // break this out into a separate object to avoid copying so much to the\n // alternate versions of the tree. We put this on a single object for now to\n // minimize the number of objects created during the initial render.\n\n // Tag identifying the type of fiber.\n tag: WorkTag;\n\n // Unique identifier of this child.\n key: null | string;\n\n // The value of element.type which is used to preserve the identity during\n // reconciliation of this child.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n elementType: any;\n\n // The resolved function/class/ associated with this fiber.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type: any;\n\n // The local state associated with this fiber.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n stateNode: any;\n\n // Conceptual aliases\n // parent : Instance -> return The parent happens to be the same as the\n // return fiber since we've merged the fiber and instance.\n\n // Remaining fields belong to Fiber\n\n // The Fiber to return to after finishing processing this one.\n // This is effectively the parent, but there can be multiple parents (two)\n // so this is only the parent of the thing we're currently processing.\n // It is conceptually the same as the return address of a stack frame.\n return: Fiber | null;\n\n // Singly Linked List Tree Structure.\n child: Fiber | null;\n sibling: Fiber | null;\n index: number;\n\n // The ref last used to attach this node.\n // I'll avoid adding an owner field for prod and model that as functions.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref: React.Ref<any>;\n\n // Input is the data coming into process this fiber. Arguments. Props.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n pendingProps: any; // This type will be more specific once we overload the tag.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n memoizedProps: any; // The props used to create the output.\n\n // A queue of state updates and callbacks.\n // updateQueue: UpdateQueue<any> | null,\n\n // The state used to create the output\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n memoizedState: any;\n\n // Dependencies (contexts, events) for this fiber, if it has any\n dependencies: Dependencies | null;\n\n // // Bitfield that describes properties about the fiber and its subtree. E.g.\n // // the ConcurrentMode flag indicates whether the subtree should be async-by-\n // // default. When a fiber is created, it inherits the mode of its\n // // parent. Additional flags can be set at creation time, but after that the\n // // value should remain unchanged throughout the fiber's lifetime, particularly\n // // before its child fibers are created.\n // mode: TypeOfMode\n //\n // // Effect\n // effectTag: SideEffectTag\n\n // Singly linked list fast path to the next fiber with side-effects.\n nextEffect: Fiber | null;\n\n // The first and last fiber with side-effect within this subtree. This allows\n // us to reuse a slice of the linked list when we reuse the work done within\n // this fiber.\n firstEffect: Fiber | null;\n lastEffect: Fiber | null;\n\n // Represents a time in the future by which this work should be completed.\n // Does not include work found in its subtree.\n expirationTime: ExpirationTime;\n\n // This is used to quickly determine if a subtree has no pending changes.\n childExpirationTime: ExpirationTime;\n\n // This is a pooled version of a Fiber. Every fiber that gets updated will\n // eventually have a pair. There are cases when we can clean up pairs to save\n // memory if we need to.\n alternate: Fiber | null;\n\n // Time spent rendering this Fiber and its descendants for the current update.\n // This tells us how well the tree makes use of sCU for memoization.\n // It is reset to 0 each time we render and only updated when we don't bailout.\n // This field is only set when the enableProfilerTimer flag is enabled.\n actualDuration?: number;\n\n // If the Fiber is currently active in the \"render\" phase,\n // This marks the time at which the work began.\n // This field is only set when the enableProfilerTimer flag is enabled.\n actualStartTime?: number;\n\n // Duration of the most recent render time for this Fiber.\n // This value is not updated when we bailout for memoization purposes.\n // This field is only set when the enableProfilerTimer flag is enabled.\n selfBaseDuration?: number;\n\n // Sum of base times for all descendants of this Fiber.\n // This value bubbles up during the \"complete\" phase.\n // This field is only set when the enableProfilerTimer flag is enabled.\n treeBaseDuration?: number;\n\n // Conceptual aliases\n // workInProgress : Fiber -> alternate The alternate used for reuse happens\n // to be the same as work in progress.\n // __DEV__ only\n _debugID?: number;\n _debugSource?: Source | null;\n _debugOwner?: Fiber | null;\n _debugIsCurrentlyTiming?: boolean;\n _debugNeedsRemount?: boolean;\n\n // Used to verify that the order of hooks does not change between renders.\n _debugHookTypes?: HookType[] | null;\n};\n\nexport function getReactFiberFromNode(elm: Node | undefined): Fiber | null {\n if (!elm) {\n return null;\n }\n\n for (const k in elm) {\n // React 16 uses \"__reactInternalInstance$\" prefix\n // React 17 uses \"__reactFiber$\" prefix\n // https://github.com/facebook/react/pull/18377\n if (k.indexOf('__reactInternalInstance$') === 0 || k.indexOf('__reactFiber$') === 0) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return elm[k];\n }\n }\n\n throw new Error('getReactFiber(): Failed to find a React Fiber on a node');\n}\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/getScrollParent.ts"],"names":[],"mappings":";;;;;;AAAA;;;;AAIG;;AACI,MAAM,aAAa,GAAI,IAAD,IAAmC;EAC9D,IAAI,IAAI,CAAC,QAAL,KAAkB,MAAtB,EAA8B;IAC5B,OAAO,IAAP;EACD,CAH6D,CAI9D;;;EACA,OAAO,IAAI,CAAC,UAAL,IAAoB,IAAY,CAAC,IAAxC;AACD,CANM;;AAAM,OAAA,CAAA,aAAA,GAAa,aAAb;AAQb;;;;AAIG;;AACH,MAAM,wBAAwB,GAAI,IAAD,IAAoD;;;EACnF,IAAI,IAAI,CAAC,QAAL,KAAkB,CAAtB,EAAyB;IACvB,OAAO,EAAP;EACD;;EAED,MAAM,MAAM,GAAG,CAAA,EAAA,GAAA,IAAI,CAAC,aAAL,MAAkB,IAAlB,IAAkB,EAAA,KAAA,KAAA,CAAlB,GAAkB,KAAA,CAAlB,GAAkB,EAAA,CAAE,WAAnC;EACA,OAAO,MAAO,CAAC,gBAAR,CAAyB,IAAzB,EAA+B,IAA/B,CAAP;AACD,CAPD;AASA;;;;AAIG;;;AACI,MAAM,eAAe,GAAI,IAAD,IAAqD;EAClF;EACA,MAAM,UAAU,GAAG,IAAI,IAAI,OAAA,CAAA,aAAA,CAAc,IAAd,CAA3B,CAFkF,CAGlF;;EACA,IAAI,CAAC,UAAL,EAAiB,OAAO,QAAQ,CAAC,IAAhB;;EAEjB,QAAQ,UAAU,CAAC,QAAnB;IACE,KAAK,MAAL;IACA,KAAK,MAAL;MACE,OAAO,UAAU,CAAC,aAAX,CAA0B,IAAjC;;IACF,KAAK,WAAL;MACE,OAAS,UAAmC,CAAC,IAA7C;EALJ,CANkF,CAclF;;;EACA,MAAM;IAAE,QAAF;IAAY,SAAZ;IAAuB;EAAvB,IAAqC,wBAAwB,CAAC,UAAD,CAAnE;;EACA,IAAI,wBAAwB,IAAxB,CAA6B,QAAS,GAAG,SAAZ,GAAyB,SAAtD,CAAJ,EAAsE;IACpE,OAAO,UAAP;EACD;;EAED,OAAO,OAAA,CAAA,eAAA,CAAgB,UAAhB,CAAP;AACD,CArBM;;AAAM,OAAA,CAAA,eAAA,GAAe,eAAf;;AAuBN,MAAM,eAAe,GAAI,IAAD,IAAiD;;;EAC9E,MAAM,mBAAmB,GAAgB,OAAA,CAAA,eAAA,CAAgB,IAAhB,CAAzC;EACA,OAAO,mBAAmB,GAAG,mBAAmB,MAAK,CAAA,EAAA,GAAA,mBAAmB,CAAC,aAApB,MAAiC,IAAjC,IAAiC,EAAA,KAAA,KAAA,CAAjC,GAAiC,KAAA,CAAjC,GAAiC,EAAA,CAAE,IAAxC,CAAtB,GAAqE,KAA/F;AACD,CAHM;;AAAM,OAAA,CAAA,eAAA,GAAe,eAAf","sourcesContent":["/**\n * Returns the parent node or the host of the node argument.\n * @param node - DOM node.\n * @returns - parent DOM node.\n */\nexport const getParentNode = (node: HTMLElement): HTMLElement => {\n if (node.nodeName === 'HTML') {\n return node;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return node.parentNode || (node as any).host;\n};\n\n/**\n * Returns CSS styles of the given node.\n * @param node - DOM node.\n * @returns - CSS styles.\n */\nconst getStyleComputedProperty = (node: HTMLElement): Partial<CSSStyleDeclaration> => {\n if (node.nodeType !== 1) {\n return {};\n }\n\n const window = node.ownerDocument?.defaultView;\n return window!.getComputedStyle(node, null);\n};\n\n/**\n * Returns the first scrollable parent of the given element.\n * @param node - DOM node.\n * @returns - the first scrollable parent.\n */\nexport const getScrollParent = (node: Document | HTMLElement | null): HTMLElement => {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n const parentNode = node && getParentNode(node as HTMLElement);\n // eslint-disable-next-line\n if (!parentNode) return document.body;\n\n switch (parentNode.nodeName) {\n case 'HTML':\n case 'BODY':\n return parentNode.ownerDocument!.body;\n case '#document':\n return ((parentNode as unknown) as Document).body;\n }\n\n // If any of the overflow props is defined for the node then we return it as the parent\n const { overflow, overflowX, overflowY } = getStyleComputedProperty(parentNode);\n if (/(auto|scroll|overlay)/.test(overflow! + overflowY! + overflowX)) {\n return parentNode;\n }\n\n return getScrollParent(parentNode);\n};\n\nexport const hasScrollParent = (node: Document | HTMLElement | null): boolean => {\n const scrollParentElement: HTMLElement = getScrollParent(node);\n return scrollParentElement ? scrollParentElement !== scrollParentElement.ownerDocument?.body : false;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-positioning/src/utils/getScrollParent.ts"],"names":[],"mappings":";;;;;;AAAA;;;;AAIG;;AACI,MAAM,aAAa,GAAI,IAAD,IAAmC;EAC9D,IAAI,IAAI,CAAC,QAAL,KAAkB,MAAtB,EAA8B;IAC5B,OAAO,IAAP;EACD,CAH6D,CAI9D;;;EACA,OAAO,IAAI,CAAC,UAAL,IAAoB,IAAY,CAAC,IAAxC;AACD,CANM;;AAAM,OAAA,CAAA,aAAA,GAAa,aAAb;AAQb;;;;AAIG;;AACH,MAAM,wBAAwB,GAAI,IAAD,IAAoD;;;EACnF,IAAI,IAAI,CAAC,QAAL,KAAkB,CAAtB,EAAyB;IACvB,OAAO,EAAP;EACD;;EAED,MAAM,MAAM,GAAG,CAAA,EAAA,GAAA,IAAI,CAAC,aAAL,MAAkB,IAAlB,IAAkB,EAAA,KAAA,KAAA,CAAlB,GAAkB,KAAA,CAAlB,GAAkB,EAAA,CAAE,WAAnC;EACA,OAAO,MAAO,CAAC,gBAAR,CAAyB,IAAzB,EAA+B,IAA/B,CAAP;AACD,CAPD;AASA;;;;AAIG;;;AACI,MAAM,eAAe,GAAI,IAAD,IAAqD;EAClF;EACA,MAAM,UAAU,GAAG,IAAI,IAAI,OAAA,CAAA,aAAA,CAAc,IAAd,CAA3B,CAFkF,CAGlF;;EACA,IAAI,CAAC,UAAL,EAAiB,OAAO,QAAQ,CAAC,IAAhB;;EAEjB,QAAQ,UAAU,CAAC,QAAnB;IACE,KAAK,MAAL;IACA,KAAK,MAAL;MACE,OAAO,UAAU,CAAC,aAAX,CAA0B,IAAjC;;IACF,KAAK,WAAL;MACE,OAAS,UAAmC,CAAC,IAA7C;EALJ,CANkF,CAclF;;;EACA,MAAM;IAAE,QAAF;IAAY,SAAZ;IAAuB;EAAvB,IAAqC,wBAAwB,CAAC,UAAD,CAAnE;;EACA,IAAI,wBAAwB,IAAxB,CAA6B,QAAS,GAAG,SAAZ,GAAyB,SAAtD,CAAJ,EAAsE;IACpE,OAAO,UAAP;EACD;;EAED,OAAO,OAAA,CAAA,eAAA,CAAgB,UAAhB,CAAP;AACD,CArBM;;AAAM,OAAA,CAAA,eAAA,GAAe,eAAf;;AAuBN,MAAM,eAAe,GAAI,IAAD,IAAiD;;;EAC9E,MAAM,mBAAmB,GAAgB,OAAA,CAAA,eAAA,CAAgB,IAAhB,CAAzC;EACA,OAAO,mBAAmB,GAAG,mBAAmB,MAAK,CAAA,EAAA,GAAA,mBAAmB,CAAC,aAApB,MAAiC,IAAjC,IAAiC,EAAA,KAAA,KAAA,CAAjC,GAAiC,KAAA,CAAjC,GAAiC,EAAA,CAAE,IAAxC,CAAtB,GAAqE,KAA/F;AACD,CAHM;;AAAM,OAAA,CAAA,eAAA,GAAe,eAAf","sourcesContent":["/**\n * Returns the parent node or the host of the node argument.\n * @param node - DOM node.\n * @returns - parent DOM node.\n */\nexport const getParentNode = (node: HTMLElement): HTMLElement => {\n if (node.nodeName === 'HTML') {\n return node;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return node.parentNode || (node as any).host;\n};\n\n/**\n * Returns CSS styles of the given node.\n * @param node - DOM node.\n * @returns - CSS styles.\n */\nconst getStyleComputedProperty = (node: HTMLElement): Partial<CSSStyleDeclaration> => {\n if (node.nodeType !== 1) {\n return {};\n }\n\n const window = node.ownerDocument?.defaultView;\n return window!.getComputedStyle(node, null);\n};\n\n/**\n * Returns the first scrollable parent of the given element.\n * @param node - DOM node.\n * @returns - the first scrollable parent.\n */\nexport const getScrollParent = (node: Document | HTMLElement | null): HTMLElement => {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n const parentNode = node && getParentNode(node as HTMLElement);\n // eslint-disable-next-line\n if (!parentNode) return document.body;\n\n switch (parentNode.nodeName) {\n case 'HTML':\n case 'BODY':\n return parentNode.ownerDocument!.body;\n case '#document':\n return ((parentNode as unknown) as Document).body;\n }\n\n // If any of the overflow props is defined for the node then we return it as the parent\n const { overflow, overflowX, overflowY } = getStyleComputedProperty(parentNode);\n if (/(auto|scroll|overlay)/.test(overflow! + overflowY! + overflowX)) {\n return parentNode;\n }\n\n return getScrollParent(parentNode);\n};\n\nexport const hasScrollParent = (node: Document | HTMLElement | null): boolean => {\n const scrollParentElement: HTMLElement = getScrollParent(node);\n return scrollParentElement ? scrollParentElement !== scrollParentElement.ownerDocument?.body : false;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/hasAutoFocusFilter.ts"],"names":[],"mappings":"cAAA;AACA;AACA;;;;;;;AAEA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAEA;;;;;AAKG;;;AACH,SAAS,gBAAT,CAA0B,IAA1B,EAAoC;SAAA,CAClC;;;EACA,MAAM,sBAAsB,GAC1B,IAAI,CAAC,QAAL,KAAkB,QAAlB,IACA,IAAI,CAAC,QAAL,KAAkB,OADlB,IAEA,IAAI,CAAC,QAAL,KAAkB,QAFlB,IAGA,IAAI,CAAC,QAAL,KAAkB,UAJpB;;EAMA,IAAI,sBAAJ,EAA4B;IAC1B,OAAO,CAAC,EAAC,CAAA,EAAA,GAAA,uBAAA,CAAA,qBAAA,CAAsB,IAAtB,CAAA,MAA2B,IAA3B,IAA2B,EAAA,KAAA,KAAA,CAA3B,GAA2B,KAAA,CAA3B,GAA2B,EAAA,CAAE,YAAF,CAAe,SAA3C,CAAR;EACD;;EAED,OAAO,KAAP;AACD;;AAED,SAAgB,kBAAhB,CAAmC,IAAnC,EAA6C;EAC3C,OAAO,gBAAgB,CAAC,IAAD,CAAhB,GAAyB,UAAU,CAAC,aAApC,GAAoD,UAAU,CAAC,WAAtE;AACD;;AAFD,OAAA,CAAA,kBAAA,GAAA,kBAAA","sourcesContent":["//\n// Dev utils to detect if nodes have \"autoFocus\" props.\n//\n\nimport { getReactFiberFromNode } from './getReactFiberFromNode';\n\n/**\n * Detects if a passed HTML node has \"autoFocus\" prop on a React's fiber. Is needed as React handles autofocus behavior\n * in React DOM and will not pass \"autoFocus\" to an actual HTML.\n *\n * @param node\n */\nfunction hasAutofocusProp(node: Node): boolean {\n // https://github.com/facebook/react/blob/848bb2426e44606e0a55dfe44c7b3ece33772485/packages/react-dom/src/client/ReactDOMHostConfig.js#L157-L166\n const isAutoFocusableElement =\n node.nodeName === 'BUTTON' ||\n node.nodeName === 'INPUT' ||\n node.nodeName === 'SELECT' ||\n node.nodeName === 'TEXTAREA';\n\n if (isAutoFocusableElement) {\n return !!getReactFiberFromNode(node)?.pendingProps.autoFocus;\n }\n\n return false;\n}\n\nexport function hasAutofocusFilter(node: Node) {\n return hasAutofocusProp(node) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-positioning/src/utils/hasAutoFocusFilter.ts"],"names":[],"mappings":"cAAA;AACA;AACA;;;;;;;AAEA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAEA;;;;;AAKG;;;AACH,SAAS,gBAAT,CAA0B,IAA1B,EAAoC;SAAA,CAClC;;;EACA,MAAM,sBAAsB,GAC1B,IAAI,CAAC,QAAL,KAAkB,QAAlB,IACA,IAAI,CAAC,QAAL,KAAkB,OADlB,IAEA,IAAI,CAAC,QAAL,KAAkB,QAFlB,IAGA,IAAI,CAAC,QAAL,KAAkB,UAJpB;;EAMA,IAAI,sBAAJ,EAA4B;IAC1B,OAAO,CAAC,EAAC,CAAA,EAAA,GAAA,uBAAA,CAAA,qBAAA,CAAsB,IAAtB,CAAA,MAA2B,IAA3B,IAA2B,EAAA,KAAA,KAAA,CAA3B,GAA2B,KAAA,CAA3B,GAA2B,EAAA,CAAE,YAAF,CAAe,SAA3C,CAAR;EACD;;EAED,OAAO,KAAP;AACD;;AAED,SAAgB,kBAAhB,CAAmC,IAAnC,EAA6C;EAC3C,OAAO,gBAAgB,CAAC,IAAD,CAAhB,GAAyB,UAAU,CAAC,aAApC,GAAoD,UAAU,CAAC,WAAtE;AACD;;AAFD,OAAA,CAAA,kBAAA,GAAA,kBAAA","sourcesContent":["//\n// Dev utils to detect if nodes have \"autoFocus\" props.\n//\n\nimport { getReactFiberFromNode } from './getReactFiberFromNode';\n\n/**\n * Detects if a passed HTML node has \"autoFocus\" prop on a React's fiber. Is needed as React handles autofocus behavior\n * in React DOM and will not pass \"autoFocus\" to an actual HTML.\n *\n * @param node\n */\nfunction hasAutofocusProp(node: Node): boolean {\n // https://github.com/facebook/react/blob/848bb2426e44606e0a55dfe44c7b3ece33772485/packages/react-dom/src/client/ReactDOMHostConfig.js#L157-L166\n const isAutoFocusableElement =\n node.nodeName === 'BUTTON' ||\n node.nodeName === 'INPUT' ||\n node.nodeName === 'SELECT' ||\n node.nodeName === 'TEXTAREA';\n\n if (isAutoFocusableElement) {\n return !!getReactFiberFromNode(node)?.pendingProps.autoFocus;\n }\n\n return false;\n}\n\nexport function hasAutofocusFilter(node: Node) {\n return hasAutofocusProp(node) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n}\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,4BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,2BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,+BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './parseFloatingUIPlacement';\nexport * from './getBoundary';\nexport * from './getReactFiberFromNode';\nexport * from './getScrollParent';\nexport * from './mergeArrowOffset';\nexport * from './toFloatingUIPlacement';\nexport * from './fromFloatingUIPlacement';\nexport * from './resolvePositioningShorthand';\nexport * from './useCallbackRef';\nexport * from './debounce';\nexport * from './toggleScrollListener';\nexport * from './hasAutoFocusFilter';\nexport * from './writeArrowUpdates';\nexport * from './writeContainerupdates';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-positioning/src/utils/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,4BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,2BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,+BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './parseFloatingUIPlacement';\nexport * from './getBoundary';\nexport * from './getReactFiberFromNode';\nexport * from './getScrollParent';\nexport * from './mergeArrowOffset';\nexport * from './toFloatingUIPlacement';\nexport * from './fromFloatingUIPlacement';\nexport * from './resolvePositioningShorthand';\nexport * from './useCallbackRef';\nexport * from './debounce';\nexport * from './toggleScrollListener';\nexport * from './hasAutoFocusFilter';\nexport * from './writeArrowUpdates';\nexport * from './writeContainerupdates';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/mergeArrowOffset.ts"],"names":[],"mappings":";;;;;;AAEA;;;;;;;;AAQG;;AACH,SAAgB,gBAAhB,CAAiC,UAAjC,EAAwE,WAAxE,EAA2F;EACzF,IAAI,OAAO,UAAP,KAAsB,QAA1B,EAAoC;IAClC,OAAO,cAAc,CAAC,UAAD,EAAa,WAAb,CAArB;EACD;;EAED,IAAI,OAAO,UAAP,KAAsB,QAAtB,IAAkC,UAAU,KAAK,IAArD,EAA2D;IACzD,OAAO,cAAc,CAAC,UAAD,EAAa,WAAb,CAArB;EACD;;EAED,IAAI,OAAO,UAAP,KAAsB,UAA1B,EAAsC;IACpC,OAAO,YAAY,IAAG;MACpB,MAAM,MAAM,GAAG,UAAU,CAAC,YAAD,CAAzB;MACA,OAAO,cAAc,CAAC,MAAD,EAAS,WAAT,CAArB;IACD,CAHD;EAID;;EAED,OAAO;IAAE,QAAQ,EAAE;EAAZ,CAAP;AACD;;AAjBD,OAAA,CAAA,gBAAA,GAAA,gBAAA;;AAmBA,MAAM,cAAc,GAAG,CAAC,MAAD,EAAgC,WAAhC,KAAqE;;;EAC1F,IAAI,OAAO,MAAP,KAAkB,QAAtB,EAAgC;IAC9B,OAAO;MAAE,QAAQ,EAAE,MAAM,GAAG;IAArB,CAAP;EACD;;EAED,OAAO,EAAE,GAAG,MAAL;IAAa,QAAQ,EAAE,CAAC,CAAA,EAAA,GAAA,MAAM,CAAC,QAAP,MAAe,IAAf,IAAe,EAAA,KAAA,KAAA,CAAf,GAAe,EAAf,GAAmB,CAApB,IAAyB;EAAhD,CAAP;AACD,CAND","sourcesContent":["import type { Offset, OffsetObject } from '../types';\n\n/**\n * Generally when adding an arrow to popper, it's necessary to offset the position of the popper by the\n * height of the arrow. A simple utility to merge a provided offset with an arrow height to return the final offset\n *\n * @internal\n * @param userOffset - The offset provided by the user\n * @param arrowHeight - The height of the arrow in px\n * @returns User offset augmented with arrow height\n */\nexport function mergeArrowOffset(userOffset: Offset | undefined | null, arrowHeight: number): Offset {\n if (typeof userOffset === 'number') {\n return addArrowOffset(userOffset, arrowHeight);\n }\n\n if (typeof userOffset === 'object' && userOffset !== null) {\n return addArrowOffset(userOffset, arrowHeight);\n }\n\n if (typeof userOffset === 'function') {\n return offsetParams => {\n const offset = userOffset(offsetParams);\n return addArrowOffset(offset, arrowHeight);\n };\n }\n\n return { mainAxis: arrowHeight };\n}\n\nconst addArrowOffset = (offset: OffsetObject | number, arrowHeight: number): OffsetObject => {\n if (typeof offset === 'number') {\n return { mainAxis: offset + arrowHeight };\n }\n\n return { ...offset, mainAxis: (offset.mainAxis ?? 0) + arrowHeight };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-positioning/src/utils/mergeArrowOffset.ts"],"names":[],"mappings":";;;;;;AAEA;;;;;;;;AAQG;;AACH,SAAgB,gBAAhB,CAAiC,UAAjC,EAAwE,WAAxE,EAA2F;EACzF,IAAI,OAAO,UAAP,KAAsB,QAA1B,EAAoC;IAClC,OAAO,cAAc,CAAC,UAAD,EAAa,WAAb,CAArB;EACD;;EAED,IAAI,OAAO,UAAP,KAAsB,QAAtB,IAAkC,UAAU,KAAK,IAArD,EAA2D;IACzD,OAAO,cAAc,CAAC,UAAD,EAAa,WAAb,CAArB;EACD;;EAED,IAAI,OAAO,UAAP,KAAsB,UAA1B,EAAsC;IACpC,OAAO,YAAY,IAAG;MACpB,MAAM,MAAM,GAAG,UAAU,CAAC,YAAD,CAAzB;MACA,OAAO,cAAc,CAAC,MAAD,EAAS,WAAT,CAArB;IACD,CAHD;EAID;;EAED,OAAO;IAAE,QAAQ,EAAE;EAAZ,CAAP;AACD;;AAjBD,OAAA,CAAA,gBAAA,GAAA,gBAAA;;AAmBA,MAAM,cAAc,GAAG,CAAC,MAAD,EAAgC,WAAhC,KAAqE;;;EAC1F,IAAI,OAAO,MAAP,KAAkB,QAAtB,EAAgC;IAC9B,OAAO;MAAE,QAAQ,EAAE,MAAM,GAAG;IAArB,CAAP;EACD;;EAED,OAAO,EAAE,GAAG,MAAL;IAAa,QAAQ,EAAE,CAAC,CAAA,EAAA,GAAA,MAAM,CAAC,QAAP,MAAe,IAAf,IAAe,EAAA,KAAA,KAAA,CAAf,GAAe,EAAf,GAAmB,CAApB,IAAyB;EAAhD,CAAP;AACD,CAND","sourcesContent":["import type { Offset, OffsetObject } from '../types';\n\n/**\n * Generally when adding an arrow to popper, it's necessary to offset the position of the popper by the\n * height of the arrow. A simple utility to merge a provided offset with an arrow height to return the final offset\n *\n * @internal\n * @param userOffset - The offset provided by the user\n * @param arrowHeight - The height of the arrow in px\n * @returns User offset augmented with arrow height\n */\nexport function mergeArrowOffset(userOffset: Offset | undefined | null, arrowHeight: number): Offset {\n if (typeof userOffset === 'number') {\n return addArrowOffset(userOffset, arrowHeight);\n }\n\n if (typeof userOffset === 'object' && userOffset !== null) {\n return addArrowOffset(userOffset, arrowHeight);\n }\n\n if (typeof userOffset === 'function') {\n return offsetParams => {\n const offset = userOffset(offsetParams);\n return addArrowOffset(offset, arrowHeight);\n };\n }\n\n return { mainAxis: arrowHeight };\n}\n\nconst addArrowOffset = (offset: OffsetObject | number, arrowHeight: number): OffsetObject => {\n if (typeof offset === 'number') {\n return { mainAxis: offset + arrowHeight };\n }\n\n return { ...offset, mainAxis: (offset.mainAxis ?? 0) + arrowHeight };\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/parseFloatingUIPlacement.ts"],"names":[],"mappings":";;;;;;AAEA;;;;;AAKG;;AACH,SAAgB,wBAAhB,CAAyC,SAAzC,EAA6D;EAC3D,MAAM,MAAM,GAAG,SAAS,CAAC,KAAV,CAAgB,GAAhB,CAAf;EACA,OAAO;IACL,IAAI,EAAE,MAAM,CAAC,CAAD,CADP;IAEL,SAAS,EAAE,MAAM,CAAC,CAAD;EAFZ,CAAP;AAID;;AAND,OAAA,CAAA,wBAAA,GAAA,wBAAA","sourcesContent":["import type { Side, Placement, Alignment } from '@floating-ui/dom';\n\n/**\n * Parses Floating UI placement and returns the different components\n * @param placement - the floating ui placement (i.e. bottom-start)\n *\n * @returns side and alignment components of the placement\n */\nexport function parseFloatingUIPlacement(placement: Placement): { side: Side; alignment: Alignment } {\n const tokens = placement.split('-');\n return {\n side: tokens[0] as Side,\n alignment: tokens[1] as Alignment,\n };\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-positioning/src/utils/parseFloatingUIPlacement.ts"],"names":[],"mappings":";;;;;;AAEA;;;;;AAKG;;AACH,SAAgB,wBAAhB,CAAyC,SAAzC,EAA6D;EAC3D,MAAM,MAAM,GAAG,SAAS,CAAC,KAAV,CAAgB,GAAhB,CAAf;EACA,OAAO;IACL,IAAI,EAAE,MAAM,CAAC,CAAD,CADP;IAEL,SAAS,EAAE,MAAM,CAAC,CAAD;EAFZ,CAAP;AAID;;AAND,OAAA,CAAA,wBAAA,GAAA,wBAAA","sourcesContent":["import type { Side, Placement, Alignment } from '@floating-ui/dom';\n\n/**\n * Parses Floating UI placement and returns the different components\n * @param placement - the floating ui placement (i.e. bottom-start)\n *\n * @returns side and alignment components of the placement\n */\nexport function parseFloatingUIPlacement(placement: Placement): { side: Side; alignment: Alignment } {\n const tokens = placement.split('-');\n return {\n side: tokens[0] as Side,\n alignment: tokens[1] as Alignment,\n };\n}\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/resolvePositioningShorthand.ts"],"names":[],"mappings":";;;;;8CAEA;;AACA,MAAM,eAAe,GAAoF;EACvG,KAAK,EAAE;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B,CADgG;EAEvG,eAAe;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B,CAFwF;EAGvG,aAAa;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B,CAH0F;EAIvG,KAAK,EAAE;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B,CAJgG;EAKvG,eAAe;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B,CALwF;EAMvG,aAAa;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B,CAN0F;EAOvG,MAAM,EAAE;IAAE,QAAQ,EAAE,QAAZ;IAAsB,KAAK,EAAE;EAA7B,CAP+F;EAQvG,cAAc;IAAE,QAAQ,EAAE,QAAZ;IAAsB,KAAK,EAAE;EAA7B,CARyF;EASvG,iBAAiB;IAAE,QAAQ,EAAE,QAAZ;IAAsB,KAAK,EAAE;EAA7B,CATsF;EAUvG,KAAK,EAAE;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B,CAVgG;EAWvG,aAAa;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B,CAX0F;EAYvG,gBAAgB;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B;AAZuF,CAAzG;;AAeA,SAAgB,2BAAhB,CACE,SADF,EACoD;EAElD,IAAI,SAAS,KAAK,SAAd,IAA2B,SAAS,KAAK,IAA7C,EAAmD;IACjD,OAAO,EAAP;EACD;;EAED,IAAI,OAAO,SAAP,KAAqB,QAAzB,EAAmC;IACjC,OAAO,eAAe,CAAC,SAAD,CAAtB;EACD;;EAED,OAAO,SAAP;AACD;;AAZD,OAAA,CAAA,2BAAA,GAAA,2BAAA","sourcesContent":["import type { PositioningShorthand, PositioningShorthandValue, PositioningProps } from '../types';\n\n// Look up table for shorthand to avoid parsing strings\nconst shorthandLookup: Record<PositioningShorthandValue, Pick<PositioningProps, 'position' | 'align'>> = {\n above: { position: 'above', align: 'center' },\n 'above-start': { position: 'above', align: 'start' },\n 'above-end': { position: 'above', align: 'end' },\n below: { position: 'below', align: 'center' },\n 'below-start': { position: 'below', align: 'start' },\n 'below-end': { position: 'below', align: 'end' },\n before: { position: 'before', align: 'center' },\n 'before-top': { position: 'before', align: 'top' },\n 'before-bottom': { position: 'before', align: 'bottom' },\n after: { position: 'after', align: 'center' },\n 'after-top': { position: 'after', align: 'top' },\n 'after-bottom': { position: 'after', align: 'bottom' },\n};\n\nexport function resolvePositioningShorthand(\n shorthand: PositioningShorthand | undefined | null,\n): Readonly<PositioningProps> {\n if (shorthand === undefined || shorthand === null) {\n return {};\n }\n\n if (typeof shorthand === 'string') {\n return shorthandLookup[shorthand];\n }\n\n return shorthand as Readonly<PositioningProps>;\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-positioning/src/utils/resolvePositioningShorthand.ts"],"names":[],"mappings":";;;;;8CAEA;;AACA,MAAM,eAAe,GAAoF;EACvG,KAAK,EAAE;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B,CADgG;EAEvG,eAAe;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B,CAFwF;EAGvG,aAAa;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B,CAH0F;EAIvG,KAAK,EAAE;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B,CAJgG;EAKvG,eAAe;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B,CALwF;EAMvG,aAAa;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B,CAN0F;EAOvG,MAAM,EAAE;IAAE,QAAQ,EAAE,QAAZ;IAAsB,KAAK,EAAE;EAA7B,CAP+F;EAQvG,cAAc;IAAE,QAAQ,EAAE,QAAZ;IAAsB,KAAK,EAAE;EAA7B,CARyF;EASvG,iBAAiB;IAAE,QAAQ,EAAE,QAAZ;IAAsB,KAAK,EAAE;EAA7B,CATsF;EAUvG,KAAK,EAAE;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B,CAVgG;EAWvG,aAAa;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B,CAX0F;EAYvG,gBAAgB;IAAE,QAAQ,EAAE,OAAZ;IAAqB,KAAK,EAAE;EAA5B;AAZuF,CAAzG;;AAeA,SAAgB,2BAAhB,CACE,SADF,EACoD;EAElD,IAAI,SAAS,KAAK,SAAd,IAA2B,SAAS,KAAK,IAA7C,EAAmD;IACjD,OAAO,EAAP;EACD;;EAED,IAAI,OAAO,SAAP,KAAqB,QAAzB,EAAmC;IACjC,OAAO,eAAe,CAAC,SAAD,CAAtB;EACD;;EAED,OAAO,SAAP;AACD;;AAZD,OAAA,CAAA,2BAAA,GAAA,2BAAA","sourcesContent":["import type { PositioningShorthand, PositioningShorthandValue, PositioningProps } from '../types';\n\n// Look up table for shorthand to avoid parsing strings\nconst shorthandLookup: Record<PositioningShorthandValue, Pick<PositioningProps, 'position' | 'align'>> = {\n above: { position: 'above', align: 'center' },\n 'above-start': { position: 'above', align: 'start' },\n 'above-end': { position: 'above', align: 'end' },\n below: { position: 'below', align: 'center' },\n 'below-start': { position: 'below', align: 'start' },\n 'below-end': { position: 'below', align: 'end' },\n before: { position: 'before', align: 'center' },\n 'before-top': { position: 'before', align: 'top' },\n 'before-bottom': { position: 'before', align: 'bottom' },\n after: { position: 'after', align: 'center' },\n 'after-top': { position: 'after', align: 'top' },\n 'after-bottom': { position: 'after', align: 'bottom' },\n};\n\nexport function resolvePositioningShorthand(\n shorthand: PositioningShorthand | undefined | null,\n): Readonly<PositioningProps> {\n if (shorthand === undefined || shorthand === null) {\n return {};\n }\n\n if (typeof shorthand === 'string') {\n return shorthandLookup[shorthand];\n }\n\n return shorthand as Readonly<PositioningProps>;\n}\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/toFloatingUIPlacement.ts"],"names":[],"mappings":";;;;;;;AAMA,MAAM,cAAc,GAAI,GAAD,KAAyD;EAC9E,KAAK,EAAE,KADuE;EAE9E,KAAK,EAAE,QAFuE;EAG9E,MAAM,EAAE,GAAG,GAAG,OAAH,GAAa,MAHsD;EAI9E,KAAK,EAAE,GAAG,GAAG,MAAH,GAAY;AAJwD,CAAzD,CAAvB,C,CAOA;AACA;;;AACA,MAAM,eAAe,GAAG,OAAsD;EAC5E,KAAK,EAAE,OADqE;EAE5E,GAAG,EAAE,KAFuE;EAG5E,GAAG,EAAE,OAHuE;EAI5E,MAAM,EAAE,KAJoE;EAK5E,MAAM,EAAE;AALoE,CAAtD,CAAxB;;AAQA,MAAM,mBAAmB,GAAG,CAAC,CAAD,EAAe,CAAf,KAAyC;EACnE,MAAM,oBAAoB,GAAG,CAAC,KAAK,OAAN,IAAiB,CAAC,KAAK,OAApD;EACA,MAAM,iBAAiB,GAAG,CAAC,KAAK,KAAN,IAAe,CAAC,KAAK,QAA/C;EAEA,OAAQ,oBAAoB,IAAI,iBAAzB,IAAgD,CAAC,oBAAD,IAAyB,CAAC,iBAAjF;AACD,CALD;AAOA;;;AAGG;;;AACI,MAAM,qBAAqB,GAAG,CAAC,KAAD,EAAoB,QAApB,EAAyC,GAAzC,KAAiF;EACpH,MAAM,SAAS,GAAG,mBAAmB,CAAC,QAAD,EAAW,KAAX,CAAnB,GAAuC,QAAvC,GAAkD,KAApE;EAEA,MAAM,gBAAgB,GAAG,QAAQ,IAAI,cAAc,CAAC,GAAD,CAAd,CAAoB,QAApB,CAArC;EACA,MAAM,iBAAiB,GAAG,SAAS,IAAI,eAAe,GAAG,SAAH,CAAtD;;EAEA,IAAI,gBAAgB,IAAI,iBAAxB,EAA2C;IACzC,OAAO,GAAG,gBAAgB,IAAI,iBAAiB,EAA/C;EACD;;EAED,OAAO,gBAAP;AACD,CAXM;;AAAM,OAAA,CAAA,qBAAA,GAAqB,qBAArB","sourcesContent":["import type { Placement, Side, Alignment as FloatingUIAlignment } from '@floating-ui/dom';\nimport type { Alignment, Position } from '../types';\n\ntype PlacementPosition = Side;\ntype PlacementAlign = FloatingUIAlignment;\n\nconst getPositionMap = (rtl?: boolean): Record<Position, PlacementPosition> => ({\n above: 'top',\n below: 'bottom',\n before: rtl ? 'right' : 'left',\n after: rtl ? 'left' : 'right',\n});\n\n// Floating UI automatically flips alignment\n// https://github.com/floating-ui/floating-ui/issues/1563\nconst getAlignmentMap = (): Record<Alignment, PlacementAlign | undefined> => ({\n start: 'start',\n end: 'end',\n top: 'start',\n bottom: 'end',\n center: undefined,\n});\n\nconst shouldAlignToCenter = (p?: Position, a?: Alignment): boolean => {\n const positionedVertically = p === 'above' || p === 'below';\n const alignedVertically = a === 'top' || a === 'bottom';\n\n return (positionedVertically && alignedVertically) || (!positionedVertically && !alignedVertically);\n};\n\n/**\n * Maps internal positioning values to Floating UI placement\n * @see positioningHelper.test.ts for expected placement values\n */\nexport const toFloatingUIPlacement = (align?: Alignment, position?: Position, rtl?: boolean): Placement | undefined => {\n const alignment = shouldAlignToCenter(position, align) ? 'center' : align;\n\n const computedPosition = position && getPositionMap(rtl)[position];\n const computedAlignment = alignment && getAlignmentMap()[alignment];\n\n if (computedPosition && computedAlignment) {\n return `${computedPosition}-${computedAlignment}` as Placement;\n }\n\n return computedPosition;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-positioning/src/utils/toFloatingUIPlacement.ts"],"names":[],"mappings":";;;;;;;AAMA,MAAM,cAAc,GAAI,GAAD,KAAyD;EAC9E,KAAK,EAAE,KADuE;EAE9E,KAAK,EAAE,QAFuE;EAG9E,MAAM,EAAE,GAAG,GAAG,OAAH,GAAa,MAHsD;EAI9E,KAAK,EAAE,GAAG,GAAG,MAAH,GAAY;AAJwD,CAAzD,CAAvB,C,CAOA;AACA;;;AACA,MAAM,eAAe,GAAG,OAAsD;EAC5E,KAAK,EAAE,OADqE;EAE5E,GAAG,EAAE,KAFuE;EAG5E,GAAG,EAAE,OAHuE;EAI5E,MAAM,EAAE,KAJoE;EAK5E,MAAM,EAAE;AALoE,CAAtD,CAAxB;;AAQA,MAAM,mBAAmB,GAAG,CAAC,CAAD,EAAe,CAAf,KAAyC;EACnE,MAAM,oBAAoB,GAAG,CAAC,KAAK,OAAN,IAAiB,CAAC,KAAK,OAApD;EACA,MAAM,iBAAiB,GAAG,CAAC,KAAK,KAAN,IAAe,CAAC,KAAK,QAA/C;EAEA,OAAQ,oBAAoB,IAAI,iBAAzB,IAAgD,CAAC,oBAAD,IAAyB,CAAC,iBAAjF;AACD,CALD;AAOA;;;AAGG;;;AACI,MAAM,qBAAqB,GAAG,CAAC,KAAD,EAAoB,QAApB,EAAyC,GAAzC,KAAiF;EACpH,MAAM,SAAS,GAAG,mBAAmB,CAAC,QAAD,EAAW,KAAX,CAAnB,GAAuC,QAAvC,GAAkD,KAApE;EAEA,MAAM,gBAAgB,GAAG,QAAQ,IAAI,cAAc,CAAC,GAAD,CAAd,CAAoB,QAApB,CAArC;EACA,MAAM,iBAAiB,GAAG,SAAS,IAAI,eAAe,GAAG,SAAH,CAAtD;;EAEA,IAAI,gBAAgB,IAAI,iBAAxB,EAA2C;IACzC,OAAO,GAAG,gBAAgB,IAAI,iBAAiB,EAA/C;EACD;;EAED,OAAO,gBAAP;AACD,CAXM;;AAAM,OAAA,CAAA,qBAAA,GAAqB,qBAArB","sourcesContent":["import type { Placement, Side, Alignment as FloatingUIAlignment } from '@floating-ui/dom';\nimport type { Alignment, Position } from '../types';\n\ntype PlacementPosition = Side;\ntype PlacementAlign = FloatingUIAlignment;\n\nconst getPositionMap = (rtl?: boolean): Record<Position, PlacementPosition> => ({\n above: 'top',\n below: 'bottom',\n before: rtl ? 'right' : 'left',\n after: rtl ? 'left' : 'right',\n});\n\n// Floating UI automatically flips alignment\n// https://github.com/floating-ui/floating-ui/issues/1563\nconst getAlignmentMap = (): Record<Alignment, PlacementAlign | undefined> => ({\n start: 'start',\n end: 'end',\n top: 'start',\n bottom: 'end',\n center: undefined,\n});\n\nconst shouldAlignToCenter = (p?: Position, a?: Alignment): boolean => {\n const positionedVertically = p === 'above' || p === 'below';\n const alignedVertically = a === 'top' || a === 'bottom';\n\n return (positionedVertically && alignedVertically) || (!positionedVertically && !alignedVertically);\n};\n\n/**\n * Maps internal positioning values to Floating UI placement\n * @see positioningHelper.test.ts for expected placement values\n */\nexport const toFloatingUIPlacement = (align?: Alignment, position?: Position, rtl?: boolean): Placement | undefined => {\n const alignment = shouldAlignToCenter(position, align) ? 'center' : align;\n\n const computedPosition = position && getPositionMap(rtl)[position];\n const computedAlignment = alignment && getAlignmentMap()[alignment];\n\n if (computedPosition && computedAlignment) {\n return `${computedPosition}-${computedAlignment}` as Placement;\n }\n\n return computedPosition;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/toggleScrollListener.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;AAEA;;;;;AAKG;;;AACH,SAAgB,oBAAhB,CACE,IADF,EAEE,IAFF,EAGE,OAHF,EAGwB;EAEtB,IAAI,IAAI,KAAK,IAAb,EAAmB;IACjB;EACD;;EAED,IAAI,IAAI,YAAY,WAApB,EAAiC;IAC/B,MAAM,gBAAgB,GAAG,iBAAA,CAAA,eAAA,CAAgB,IAAhB,CAAzB;IACA,gBAAgB,CAAC,mBAAjB,CAAqC,QAArC,EAA+C,OAA/C;EACD;;EACD,IAAI,IAAI,YAAY,WAApB,EAAiC;IAC/B,MAAM,YAAY,GAAG,iBAAA,CAAA,eAAA,CAAgB,IAAhB,CAArB;IACA,YAAY,CAAC,gBAAb,CAA8B,QAA9B,EAAwC,OAAxC;EACD;AACF;;AAjBD,OAAA,CAAA,oBAAA,GAAA,oBAAA","sourcesContent":["import type { PositioningVirtualElement } from '../types';\nimport { getScrollParent } from './getScrollParent';\n\n/**\n * Toggles event listeners for scroll parent.\n * Cleans up the event listeners for the previous element and adds them for the new scroll parent.\n * @param next Next element\n * @param prev Previous element\n */\nexport function toggleScrollListener(\n next: HTMLElement | PositioningVirtualElement | null,\n prev: HTMLElement | PositioningVirtualElement | null,\n handler: EventListener,\n) {\n if (next === prev) {\n return;\n }\n\n if (prev instanceof HTMLElement) {\n const prevScrollParent = getScrollParent(prev);\n prevScrollParent.removeEventListener('scroll', handler);\n }\n if (next instanceof HTMLElement) {\n const scrollParent = getScrollParent(next);\n scrollParent.addEventListener('scroll', handler);\n }\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-positioning/src/utils/toggleScrollListener.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;AAEA;;;;;AAKG;;;AACH,SAAgB,oBAAhB,CACE,IADF,EAEE,IAFF,EAGE,OAHF,EAGwB;EAEtB,IAAI,IAAI,KAAK,IAAb,EAAmB;IACjB;EACD;;EAED,IAAI,IAAI,YAAY,WAApB,EAAiC;IAC/B,MAAM,gBAAgB,GAAG,iBAAA,CAAA,eAAA,CAAgB,IAAhB,CAAzB;IACA,gBAAgB,CAAC,mBAAjB,CAAqC,QAArC,EAA+C,OAA/C;EACD;;EACD,IAAI,IAAI,YAAY,WAApB,EAAiC;IAC/B,MAAM,YAAY,GAAG,iBAAA,CAAA,eAAA,CAAgB,IAAhB,CAArB;IACA,YAAY,CAAC,gBAAb,CAA8B,QAA9B,EAAwC,OAAxC;EACD;AACF;;AAjBD,OAAA,CAAA,oBAAA,GAAA,oBAAA","sourcesContent":["import type { PositioningVirtualElement } from '../types';\nimport { getScrollParent } from './getScrollParent';\n\n/**\n * Toggles event listeners for scroll parent.\n * Cleans up the event listeners for the previous element and adds them for the new scroll parent.\n * @param next Next element\n * @param prev Previous element\n */\nexport function toggleScrollListener(\n next: HTMLElement | PositioningVirtualElement | null,\n prev: HTMLElement | PositioningVirtualElement | null,\n handler: EventListener,\n) {\n if (next === prev) {\n return;\n }\n\n if (prev instanceof HTMLElement) {\n const prevScrollParent = getScrollParent(prev);\n prevScrollParent.removeEventListener('scroll', handler);\n }\n if (next instanceof HTMLElement) {\n const scrollParent = getScrollParent(next);\n scrollParent.addEventListener('scroll', handler);\n }\n}\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/useCallbackRef.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAEA;;;;;;;;;;;;;;;;AAgBG;;;AACH,SAAgB,cAAhB,CACE,YADF,EAEE,QAFF,EAGE,kBAHF,EAG8B;EAE5B,MAAM,OAAO,GAAG,KAAK,CAAC,MAAN,CAAa,IAAb,CAAhB;EACA,MAAM,CAAC,GAAD,IAAQ,KAAK,CAAC,QAAN,CAAe,OAAO;IAClC;IACA,KAAK,EAAE,YAF2B;IAGlC;IACA,QAJkC;IAKlC;IACA,MAAM,EAAE;MACN,IAAI,OAAJ,GAAW;QACT,OAAO,GAAG,CAAC,KAAX;MACD,CAHK;;MAIN,IAAI,OAAJ,CAAY,KAAZ,EAAiB;QACf,MAAM,IAAI,GAAG,GAAG,CAAC,KAAjB;;QAEA,IAAI,IAAI,KAAK,KAAb,EAAoB;UAClB,GAAG,CAAC,KAAJ,GAAY,KAAZ;;UAEA,IAAI,kBAAkB,IAAI,OAAO,CAAC,OAAlC,EAA2C;YACzC;UACD;;UAED,GAAG,CAAC,QAAJ,CAAa,KAAb,EAAoB,IAApB;QACD;MACF;;IAhBK;EAN0B,CAAP,CAAf,CAAd;EA0BA,iBAAA,CAAA,yBAAA,CAA0B,MAAK;IAC7B,OAAO,CAAC,OAAR,GAAkB,KAAlB;EACD,CAFD,EAEG,EAFH,EA7B4B,CAiC5B;;EACA,GAAG,CAAC,QAAJ,GAAe,QAAf;EAEA,OAAO,GAAG,CAAC,MAAX;AACD;;AAxCD,OAAA,CAAA,cAAA,GAAA,cAAA","sourcesContent":["import * as React from 'react';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\n\n/**\n * Creates a MutableRef with ref change callback. Is useful as React.useRef() doesn't notify you when its content\n * changes and mutating the .current property doesn't cause a re-render. An opt-out will be use a callback ref via\n * React.useState(), but it will cause re-renders always.\n *\n * https://reactjs.org/docs/hooks-reference.html#useref\n * https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n *\n * @param initialValue - initial ref value\n * @param callback - a callback to run when value changes\n * @param skipInitialResolve - a flag to skip an initial ref report\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n */\nexport function useCallbackRef<T>(\n initialValue: T | null,\n callback: (newValue: T | null, lastValue: T | null) => void,\n skipInitialResolve?: boolean,\n): React.MutableRefObject<T | null> {\n const isFirst = React.useRef(true);\n const [ref] = React.useState(() => ({\n // value\n value: initialValue,\n // last callback\n callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n const last = ref.value;\n\n if (last !== value) {\n ref.value = value;\n\n if (skipInitialResolve && isFirst.current) {\n return;\n }\n\n ref.callback(value, last);\n }\n },\n },\n }));\n\n useIsomorphicLayoutEffect(() => {\n isFirst.current = false;\n }, []);\n\n // update callback\n ref.callback = callback;\n\n return ref.facade;\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-positioning/src/utils/useCallbackRef.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAEA;;;;;;;;;;;;;;;;AAgBG;;;AACH,SAAgB,cAAhB,CACE,YADF,EAEE,QAFF,EAGE,kBAHF,EAG8B;EAE5B,MAAM,OAAO,GAAG,KAAK,CAAC,MAAN,CAAa,IAAb,CAAhB;EACA,MAAM,CAAC,GAAD,IAAQ,KAAK,CAAC,QAAN,CAAe,OAAO;IAClC;IACA,KAAK,EAAE,YAF2B;IAGlC;IACA,QAJkC;IAKlC;IACA,MAAM,EAAE;MACN,IAAI,OAAJ,GAAW;QACT,OAAO,GAAG,CAAC,KAAX;MACD,CAHK;;MAIN,IAAI,OAAJ,CAAY,KAAZ,EAAiB;QACf,MAAM,IAAI,GAAG,GAAG,CAAC,KAAjB;;QAEA,IAAI,IAAI,KAAK,KAAb,EAAoB;UAClB,GAAG,CAAC,KAAJ,GAAY,KAAZ;;UAEA,IAAI,kBAAkB,IAAI,OAAO,CAAC,OAAlC,EAA2C;YACzC;UACD;;UAED,GAAG,CAAC,QAAJ,CAAa,KAAb,EAAoB,IAApB;QACD;MACF;;IAhBK;EAN0B,CAAP,CAAf,CAAd;EA0BA,iBAAA,CAAA,yBAAA,CAA0B,MAAK;IAC7B,OAAO,CAAC,OAAR,GAAkB,KAAlB;EACD,CAFD,EAEG,EAFH,EA7B4B,CAiC5B;;EACA,GAAG,CAAC,QAAJ,GAAe,QAAf;EAEA,OAAO,GAAG,CAAC,MAAX;AACD;;AAxCD,OAAA,CAAA,cAAA,GAAA,cAAA","sourcesContent":["import * as React from 'react';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\n\n/**\n * Creates a MutableRef with ref change callback. Is useful as React.useRef() doesn't notify you when its content\n * changes and mutating the .current property doesn't cause a re-render. An opt-out will be use a callback ref via\n * React.useState(), but it will cause re-renders always.\n *\n * https://reactjs.org/docs/hooks-reference.html#useref\n * https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n *\n * @param initialValue - initial ref value\n * @param callback - a callback to run when value changes\n * @param skipInitialResolve - a flag to skip an initial ref report\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n */\nexport function useCallbackRef<T>(\n initialValue: T | null,\n callback: (newValue: T | null, lastValue: T | null) => void,\n skipInitialResolve?: boolean,\n): React.MutableRefObject<T | null> {\n const isFirst = React.useRef(true);\n const [ref] = React.useState(() => ({\n // value\n value: initialValue,\n // last callback\n callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n const last = ref.value;\n\n if (last !== value) {\n ref.value = value;\n\n if (skipInitialResolve && isFirst.current) {\n return;\n }\n\n ref.callback(value, last);\n }\n },\n },\n }));\n\n useIsomorphicLayoutEffect(() => {\n isFirst.current = false;\n }, []);\n\n // update callback\n ref.callback = callback;\n\n return ref.facade;\n}\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/writeArrowUpdates.ts"],"names":[],"mappings":";;;;;;AAEA;;AAEG;;AACH,SAAgB,iBAAhB,CAAkC,OAAlC,EAAwG;EACtG,MAAM;IAAE,KAAF;IAAS;EAAT,IAA4B,OAAlC;;EACA,IAAI,CAAC,cAAc,CAAC,KAAhB,IAAyB,CAAC,KAA9B,EAAqC;IACnC;EACD;;EAED,MAAM;IAAE,CAAC,EAAE,MAAL;IAAa,CAAC,EAAE;EAAhB,IAA2B,cAAc,CAAC,KAAhD;EAEA,MAAM,CAAC,MAAP,CAAc,KAAK,CAAC,KAApB,EAA2B;IACzB,IAAI,EAAE,GAAG,MAAM,IADU;IAEzB,GAAG,EAAE,GAAG,MAAM;EAFW,CAA3B;AAID;;AAZD,OAAA,CAAA,iBAAA,GAAA,iBAAA","sourcesContent":["import { MiddlewareData } from '@floating-ui/dom';\n\n/**\n * Writes all DOM element updates after position is computed\n */\nexport function writeArrowUpdates(options: { arrow: HTMLElement | null; middlewareData: MiddlewareData }) {\n const { arrow, middlewareData } = options;\n if (!middlewareData.arrow || !arrow) {\n return;\n }\n\n const { x: arrowX, y: arrowY } = middlewareData.arrow;\n\n Object.assign(arrow.style, {\n left: `${arrowX}px`,\n top: `${arrowY}px`,\n });\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-positioning/src/utils/writeArrowUpdates.ts"],"names":[],"mappings":";;;;;;AAEA;;AAEG;;AACH,SAAgB,iBAAhB,CAAkC,OAAlC,EAAwG;EACtG,MAAM;IAAE,KAAF;IAAS;EAAT,IAA4B,OAAlC;;EACA,IAAI,CAAC,cAAc,CAAC,KAAhB,IAAyB,CAAC,KAA9B,EAAqC;IACnC;EACD;;EAED,MAAM;IAAE,CAAC,EAAE,MAAL;IAAa,CAAC,EAAE;EAAhB,IAA2B,cAAc,CAAC,KAAhD;EAEA,MAAM,CAAC,MAAP,CAAc,KAAK,CAAC,KAApB,EAA2B;IACzB,IAAI,EAAE,GAAG,MAAM,IADU;IAEzB,GAAG,EAAE,GAAG,MAAM;EAFW,CAA3B;AAID;;AAZD,OAAA,CAAA,iBAAA,GAAA,iBAAA","sourcesContent":["import { MiddlewareData } from '@floating-ui/dom';\n\n/**\n * Writes all DOM element updates after position is computed\n */\nexport function writeArrowUpdates(options: { arrow: HTMLElement | null; middlewareData: MiddlewareData }) {\n const { arrow, middlewareData } = options;\n if (!middlewareData.arrow || !arrow) {\n return;\n }\n\n const { x: arrowX, y: arrowY } = middlewareData.arrow;\n\n Object.assign(arrow.style, {\n left: `${arrowX}px`,\n top: `${arrowY}px`,\n });\n}\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/writeContainerupdates.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,WAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;AAOA;;AAEG;;;AACH,SAAgB,qBAAhB,CAAsC,OAAtC,EAYC;;;EACC,MAAM;IACJ,SADI;IAEJ,SAFI;IAGJ,cAHI;IAIJ,QAJI;IAKJ,MALI;IAMJ,WAAW,EAAE;MAAE,CAAF;MAAK;IAAL;EANT,IAOF,OAPJ;;EAQA,IAAI,CAAC,SAAL,EAAgB;IACd;EACD;;EACD,SAAS,CAAC,YAAV,CAAuB,WAAA,CAAA,0BAAvB,EAAmD,SAAnD;EACA,SAAS,CAAC,eAAV,CAA0B,WAAA,CAAA,6BAA1B;;EACA,IAAI,cAAc,CAAC,oBAAf,CAAoC,YAAxC,EAAsD;IACpD,SAAS,CAAC,YAAV,CAAuB,WAAA,CAAA,6BAAvB,EAAsD,EAAtD;EACD;;EAED,SAAS,CAAC,eAAV,CAA0B,WAAA,CAAA,wBAA1B;;EACA,IAAI,CAAA,EAAA,GAAA,cAAc,CAAC,IAAf,MAAmB,IAAnB,IAAmB,EAAA,KAAA,KAAA,CAAnB,GAAmB,KAAA,CAAnB,GAAmB,EAAA,CAAE,OAAzB,EAAkC;IAChC,SAAS,CAAC,YAAV,CAAuB,WAAA,CAAA,wBAAvB,EAAiD,EAAjD;EACD;;EAED,SAAS,CAAC,eAAV,CAA0B,WAAA,CAAA,uBAA1B;;EACA,IAAI,CAAA,EAAA,GAAA,cAAc,CAAC,IAAf,MAAmB,IAAnB,IAAmB,EAAA,KAAA,KAAA,CAAnB,GAAmB,KAAA,CAAnB,GAAmB,EAAA,CAAE,eAAzB,EAA0C;IACxC,SAAS,CAAC,YAAV,CAAuB,WAAA,CAAA,uBAAvB,EAAgD,EAAhD;EACD;;EAED,MAAM,CAAC,MAAP,CAAc,SAAS,CAAC,KAAxB,EAA+B;IAC7B,SAAS,EAAE,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,KAAzB,GAAiC,eAAe,CAAC,OAAO,CAAC,QAD7C;IAE7B,QAAQ,EAAE;EAFmB,CAA/B;AAID;;AA5CD,OAAA,CAAA,qBAAA,GAAA,qBAAA","sourcesContent":["import type { Placement, MiddlewareData, Strategy, Coords } from '@floating-ui/dom';\nimport {\n DATA_POSITIONING_ESCAPED,\n DATA_POSITIONING_HIDDEN,\n DATA_POSITIONING_INTERSECTING,\n DATA_POSITIONING_PLACEMENT,\n} from '../constants';\n\n/**\n * Writes all container element position updates after the position is computed\n */\nexport function writeContainerUpdates(options: {\n container: HTMLElement | null;\n placement: Placement;\n middlewareData: MiddlewareData;\n /**\n * Layer acceleration can disable subpixel rendering which causes slightly\n * blurry text on low PPI displays, so we want to use 2D transforms\n * instead\n */\n lowPPI: boolean;\n strategy: Strategy;\n coordinates: Coords;\n}) {\n const {\n container,\n placement,\n middlewareData,\n strategy,\n lowPPI,\n coordinates: { x, y },\n } = options;\n if (!container) {\n return;\n }\n container.setAttribute(DATA_POSITIONING_PLACEMENT, placement);\n container.removeAttribute(DATA_POSITIONING_INTERSECTING);\n if (middlewareData.intersectionObserver.intersecting) {\n container.setAttribute(DATA_POSITIONING_INTERSECTING, '');\n }\n\n container.removeAttribute(DATA_POSITIONING_ESCAPED);\n if (middlewareData.hide?.escaped) {\n container.setAttribute(DATA_POSITIONING_ESCAPED, '');\n }\n\n container.removeAttribute(DATA_POSITIONING_HIDDEN);\n if (middlewareData.hide?.referenceHidden) {\n container.setAttribute(DATA_POSITIONING_HIDDEN, '');\n }\n\n Object.assign(container.style, {\n transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`,\n position: strategy,\n });\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-positioning/src/utils/writeContainerupdates.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,WAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;AAOA;;AAEG;;;AACH,SAAgB,qBAAhB,CAAsC,OAAtC,EAYC;;;EACC,MAAM;IACJ,SADI;IAEJ,SAFI;IAGJ,cAHI;IAIJ,QAJI;IAKJ,MALI;IAMJ,WAAW,EAAE;MAAE,CAAF;MAAK;IAAL;EANT,IAOF,OAPJ;;EAQA,IAAI,CAAC,SAAL,EAAgB;IACd;EACD;;EACD,SAAS,CAAC,YAAV,CAAuB,WAAA,CAAA,0BAAvB,EAAmD,SAAnD;EACA,SAAS,CAAC,eAAV,CAA0B,WAAA,CAAA,6BAA1B;;EACA,IAAI,cAAc,CAAC,oBAAf,CAAoC,YAAxC,EAAsD;IACpD,SAAS,CAAC,YAAV,CAAuB,WAAA,CAAA,6BAAvB,EAAsD,EAAtD;EACD;;EAED,SAAS,CAAC,eAAV,CAA0B,WAAA,CAAA,wBAA1B;;EACA,IAAI,CAAA,EAAA,GAAA,cAAc,CAAC,IAAf,MAAmB,IAAnB,IAAmB,EAAA,KAAA,KAAA,CAAnB,GAAmB,KAAA,CAAnB,GAAmB,EAAA,CAAE,OAAzB,EAAkC;IAChC,SAAS,CAAC,YAAV,CAAuB,WAAA,CAAA,wBAAvB,EAAiD,EAAjD;EACD;;EAED,SAAS,CAAC,eAAV,CAA0B,WAAA,CAAA,uBAA1B;;EACA,IAAI,CAAA,EAAA,GAAA,cAAc,CAAC,IAAf,MAAmB,IAAnB,IAAmB,EAAA,KAAA,KAAA,CAAnB,GAAmB,KAAA,CAAnB,GAAmB,EAAA,CAAE,eAAzB,EAA0C;IACxC,SAAS,CAAC,YAAV,CAAuB,WAAA,CAAA,uBAAvB,EAAgD,EAAhD;EACD;;EAED,MAAM,CAAC,MAAP,CAAc,SAAS,CAAC,KAAxB,EAA+B;IAC7B,SAAS,EAAE,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,KAAzB,GAAiC,eAAe,CAAC,OAAO,CAAC,QAD7C;IAE7B,QAAQ,EAAE;EAFmB,CAA/B;AAID;;AA5CD,OAAA,CAAA,qBAAA,GAAA,qBAAA","sourcesContent":["import type { Placement, MiddlewareData, Strategy, Coords } from '@floating-ui/dom';\nimport {\n DATA_POSITIONING_ESCAPED,\n DATA_POSITIONING_HIDDEN,\n DATA_POSITIONING_INTERSECTING,\n DATA_POSITIONING_PLACEMENT,\n} from '../constants';\n\n/**\n * Writes all container element position updates after the position is computed\n */\nexport function writeContainerUpdates(options: {\n container: HTMLElement | null;\n placement: Placement;\n middlewareData: MiddlewareData;\n /**\n * Layer acceleration can disable subpixel rendering which causes slightly\n * blurry text on low PPI displays, so we want to use 2D transforms\n * instead\n */\n lowPPI: boolean;\n strategy: Strategy;\n coordinates: Coords;\n}) {\n const {\n container,\n placement,\n middlewareData,\n strategy,\n lowPPI,\n coordinates: { x, y },\n } = options;\n if (!container) {\n return;\n }\n container.setAttribute(DATA_POSITIONING_PLACEMENT, placement);\n container.removeAttribute(DATA_POSITIONING_INTERSECTING);\n if (middlewareData.intersectionObserver.intersecting) {\n container.setAttribute(DATA_POSITIONING_INTERSECTING, '');\n }\n\n container.removeAttribute(DATA_POSITIONING_ESCAPED);\n if (middlewareData.hide?.escaped) {\n container.setAttribute(DATA_POSITIONING_ESCAPED, '');\n }\n\n container.removeAttribute(DATA_POSITIONING_HIDDEN);\n if (middlewareData.hide?.referenceHidden) {\n container.setAttribute(DATA_POSITIONING_HIDDEN, '');\n }\n\n Object.assign(container.style, {\n transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`,\n position: strategy,\n });\n}\n"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-positioning",
3
- "version": "9.3.1",
3
+ "version": "9.3.2",
4
4
  "description": "A react wrapper around Popper.js for Fluent UI",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -19,9 +19,8 @@
19
19
  "just": "just-scripts",
20
20
  "lint": "just-scripts lint",
21
21
  "test": "jest --passWithNoTests",
22
- "docs": "api-extractor run --config=config/api-extractor.local.json --local",
23
- "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/types/packages/react-components/react-positioning/src && yarn docs",
24
- "type-check": "tsc -b tsconfig.json"
22
+ "type-check": "tsc -b tsconfig.json",
23
+ "generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
25
24
  },
26
25
  "devDependencies": {
27
26
  "@fluentui/eslint-plugin": "*",
@@ -31,7 +30,7 @@
31
30
  "@floating-ui/dom": "^1.0.0",
32
31
  "@fluentui/react-shared-contexts": "^9.1.1",
33
32
  "@fluentui/react-theme": "^9.1.2",
34
- "@fluentui/react-utilities": "^9.2.1",
33
+ "@fluentui/react-utilities": "^9.2.2",
35
34
  "@griffel/react": "^1.4.2",
36
35
  "tslib": "^2.1.0"
37
36
  },