@fluentui/react-positioning 0.0.0-nightly-20230223-0420.1 → 0.0.0-nightly-20230223-2115.1

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 (114) hide show
  1. package/.swcrc +33 -0
  2. package/CHANGELOG.json +9 -9
  3. package/CHANGELOG.md +7 -7
  4. package/lib/constants.js.map +1 -1
  5. package/lib/createArrowStyles.js.map +1 -1
  6. package/lib/createPositionManager.js +7 -6
  7. package/lib/createPositionManager.js.map +1 -1
  8. package/lib/createVirtualElementFromClick.js +1 -2
  9. package/lib/createVirtualElementFromClick.js.map +1 -1
  10. package/lib/index.js.map +1 -1
  11. package/lib/middleware/coverTarget.js.map +1 -1
  12. package/lib/middleware/flip.js.map +1 -1
  13. package/lib/middleware/index.js.map +1 -1
  14. package/lib/middleware/intersecting.js.map +1 -1
  15. package/lib/middleware/maxSize.js +7 -6
  16. package/lib/middleware/maxSize.js.map +1 -1
  17. package/lib/middleware/offset.js.map +1 -1
  18. package/lib/middleware/shift.js.map +1 -1
  19. package/lib/types.js +1 -1
  20. package/lib/types.js.map +1 -1
  21. package/lib/usePositioning.js +21 -21
  22. package/lib/usePositioning.js.map +1 -1
  23. package/lib/usePositioningMouseTarget.js.map +1 -1
  24. package/lib/utils/debounce.js +1 -2
  25. package/lib/utils/debounce.js.map +1 -1
  26. package/lib/utils/fromFloatingUIPlacement.js.map +1 -1
  27. package/lib/utils/getBoundary.js.map +1 -1
  28. package/lib/utils/getFloatingUIOffset.js +8 -7
  29. package/lib/utils/getFloatingUIOffset.js.map +1 -1
  30. package/lib/utils/getReactFiberFromNode.js +1 -0
  31. package/lib/utils/getReactFiberFromNode.js.map +1 -1
  32. package/lib/utils/getScrollParent.js +5 -6
  33. package/lib/utils/getScrollParent.js.map +1 -1
  34. package/lib/utils/hasAutoFocusFilter.js +2 -2
  35. package/lib/utils/hasAutoFocusFilter.js.map +1 -1
  36. package/lib/utils/index.js.map +1 -1
  37. package/lib/utils/mergeArrowOffset.js +2 -4
  38. package/lib/utils/mergeArrowOffset.js.map +1 -1
  39. package/lib/utils/parseFloatingUIPlacement.js +1 -2
  40. package/lib/utils/parseFloatingUIPlacement.js.map +1 -1
  41. package/lib/utils/resolvePositioningShorthand.js.map +1 -1
  42. package/lib/utils/toFloatingUIPadding.js.map +1 -1
  43. package/lib/utils/toFloatingUIPlacement.js.map +1 -1
  44. package/lib/utils/toggleScrollListener.js.map +1 -1
  45. package/lib/utils/useCallbackRef.js.map +1 -1
  46. package/lib/utils/writeArrowUpdates.js +1 -2
  47. package/lib/utils/writeArrowUpdates.js.map +1 -1
  48. package/lib/utils/writeContainerupdates.js +4 -4
  49. package/lib/utils/writeContainerupdates.js.map +1 -1
  50. package/lib-commonjs/constants.js +18 -7
  51. package/lib-commonjs/constants.js.map +1 -1
  52. package/lib-commonjs/createArrowStyles.js +60 -88
  53. package/lib-commonjs/createArrowStyles.js.map +1 -1
  54. package/lib-commonjs/createPositionManager.js +103 -116
  55. package/lib-commonjs/createPositionManager.js.map +1 -1
  56. package/lib-commonjs/createVirtualElementFromClick.js +27 -26
  57. package/lib-commonjs/createVirtualElementFromClick.js.map +1 -1
  58. package/lib-commonjs/index.js +24 -51
  59. package/lib-commonjs/index.js.map +1 -1
  60. package/lib-commonjs/middleware/coverTarget.js +34 -37
  61. package/lib-commonjs/middleware/coverTarget.js.map +1 -1
  62. package/lib-commonjs/middleware/flip.js +20 -22
  63. package/lib-commonjs/middleware/flip.js.map +1 -1
  64. package/lib-commonjs/middleware/index.js +10 -9
  65. package/lib-commonjs/middleware/index.js.map +1 -1
  66. package/lib-commonjs/middleware/intersecting.js +24 -22
  67. package/lib-commonjs/middleware/intersecting.js.map +1 -1
  68. package/lib-commonjs/middleware/maxSize.js +35 -40
  69. package/lib-commonjs/middleware/maxSize.js.map +1 -1
  70. package/lib-commonjs/middleware/offset.js +11 -12
  71. package/lib-commonjs/middleware/offset.js.map +1 -1
  72. package/lib-commonjs/middleware/shift.js +29 -37
  73. package/lib-commonjs/middleware/shift.js.map +1 -1
  74. package/lib-commonjs/types.js +5 -2
  75. package/lib-commonjs/types.js.map +1 -1
  76. package/lib-commonjs/usePositioning.js +195 -161
  77. package/lib-commonjs/usePositioning.js.map +1 -1
  78. package/lib-commonjs/usePositioningMouseTarget.js +34 -37
  79. package/lib-commonjs/usePositioningMouseTarget.js.map +1 -1
  80. package/lib-commonjs/utils/debounce.js +22 -21
  81. package/lib-commonjs/utils/debounce.js.map +1 -1
  82. package/lib-commonjs/utils/fromFloatingUIPlacement.js +30 -35
  83. package/lib-commonjs/utils/fromFloatingUIPlacement.js.map +1 -1
  84. package/lib-commonjs/utils/getBoundary.js +21 -22
  85. package/lib-commonjs/utils/getBoundary.js.map +1 -1
  86. package/lib-commonjs/utils/getFloatingUIOffset.js +24 -35
  87. package/lib-commonjs/utils/getFloatingUIOffset.js.map +1 -1
  88. package/lib-commonjs/utils/getReactFiberFromNode.js +45 -41
  89. package/lib-commonjs/utils/getReactFiberFromNode.js.map +1 -1
  90. package/lib-commonjs/utils/getScrollParent.js +52 -56
  91. package/lib-commonjs/utils/getScrollParent.js.map +1 -1
  92. package/lib-commonjs/utils/hasAutoFocusFilter.js +18 -17
  93. package/lib-commonjs/utils/hasAutoFocusFilter.js.map +1 -1
  94. package/lib-commonjs/utils/index.js +19 -18
  95. package/lib-commonjs/utils/index.js.map +1 -1
  96. package/lib-commonjs/utils/mergeArrowOffset.js +32 -32
  97. package/lib-commonjs/utils/mergeArrowOffset.js.map +1 -1
  98. package/lib-commonjs/utils/parseFloatingUIPlacement.js +15 -14
  99. package/lib-commonjs/utils/parseFloatingUIPlacement.js.map +1 -1
  100. package/lib-commonjs/utils/resolvePositioningShorthand.js +63 -61
  101. package/lib-commonjs/utils/resolvePositioningShorthand.js.map +1 -1
  102. package/lib-commonjs/utils/toFloatingUIPadding.js +23 -25
  103. package/lib-commonjs/utils/toFloatingUIPadding.js.map +1 -1
  104. package/lib-commonjs/utils/toFloatingUIPlacement.js +31 -33
  105. package/lib-commonjs/utils/toFloatingUIPlacement.js.map +1 -1
  106. package/lib-commonjs/utils/toggleScrollListener.js +19 -23
  107. package/lib-commonjs/utils/toggleScrollListener.js.map +1 -1
  108. package/lib-commonjs/utils/useCallbackRef.js +39 -53
  109. package/lib-commonjs/utils/useCallbackRef.js.map +1 -1
  110. package/lib-commonjs/utils/writeArrowUpdates.js +19 -24
  111. package/lib-commonjs/utils/writeArrowUpdates.js.map +1 -1
  112. package/lib-commonjs/utils/writeContainerupdates.js +37 -45
  113. package/lib-commonjs/utils/writeContainerupdates.js.map +1 -1
  114. package/package.json +6 -6
@@ -1,28 +1,23 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.writeArrowUpdates = void 0;
7
1
  /**
8
2
  * Writes all DOM element updates after position is computed
9
- */
3
+ */ "use strict";
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ Object.defineProperty(exports, "writeArrowUpdates", {
8
+ enumerable: true,
9
+ get: ()=>writeArrowUpdates
10
+ });
10
11
  function writeArrowUpdates(options) {
11
- const {
12
- arrow,
13
- middlewareData
14
- } = options;
15
- if (!middlewareData.arrow || !arrow) {
16
- return;
17
- }
18
- const {
19
- x: arrowX,
20
- y: arrowY
21
- } = middlewareData.arrow;
22
- Object.assign(arrow.style, {
23
- left: `${arrowX}px`,
24
- top: `${arrowY}px`
25
- });
26
- }
27
- exports.writeArrowUpdates = writeArrowUpdates;
12
+ const { arrow , middlewareData } = options;
13
+ if (!middlewareData.arrow || !arrow) {
14
+ return;
15
+ }
16
+ const { x: arrowX , y: arrowY } = middlewareData.arrow;
17
+ Object.assign(arrow.style, {
18
+ left: `${arrowX}px`,
19
+ top: `${arrowY}px`
20
+ });
21
+ } //# sourceMappingURL=writeArrowUpdates.js.map
22
+
28
23
  //# sourceMappingURL=writeArrowUpdates.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAEA;;;AAGA,SAAgBA,iBAAiB,CAACC,OAAsE;EACtG,MAAM;IAAEC,KAAK;IAAEC;EAAc,CAAE,GAAGF,OAAO;EACzC,IAAI,CAACE,cAAc,CAACD,KAAK,IAAI,CAACA,KAAK,EAAE;IACnC;;EAGF,MAAM;IAAEE,CAAC,EAAEC,MAAM;IAAEC,CAAC,EAAEC;EAAM,CAAE,GAAGJ,cAAc,CAACD,KAAK;EAErDM,MAAM,CAACC,MAAM,CAACP,KAAK,CAACQ,KAAK,EAAE;IACzBC,IAAI,EAAE,GAAGN,MAAM,IAAI;IACnBO,GAAG,EAAE,GAAGL,MAAM;GACf,CAAC;AACJ;AAZAM","names":["writeArrowUpdates","options","arrow","middlewareData","x","arrowX","y","arrowY","Object","assign","style","left","top","exports"],"sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-positioning/src/utils/writeArrowUpdates.ts"],"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"]}
1
+ {"version":3,"sources":["../../lib/utils/writeArrowUpdates.js"],"sourcesContent":["/**\n * Writes all DOM element updates after position is computed\n */export function writeArrowUpdates(options) {\n const {\n arrow,\n middlewareData\n } = options;\n if (!middlewareData.arrow || !arrow) {\n return;\n }\n const {\n x: arrowX,\n y: arrowY\n } = middlewareData.arrow;\n Object.assign(arrow.style, {\n left: `${arrowX}px`,\n top: `${arrowY}px`\n });\n}\n//# sourceMappingURL=writeArrowUpdates.js.map"],"names":["writeArrowUpdates","options","arrow","middlewareData","x","arrowX","y","arrowY","Object","assign","style","left","top"],"mappings":"AAAA;;CAEC;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,kBAAkBC,OAAO,EAAE;IAC5C,MAAM,EACJC,MAAK,EACLC,eAAc,EACf,GAAGF;IACJ,IAAI,CAACE,eAAeD,KAAK,IAAI,CAACA,OAAO;QACnC;IACF,CAAC;IACD,MAAM,EACJE,GAAGC,OAAM,EACTC,GAAGC,OAAM,EACV,GAAGJ,eAAeD,KAAK;IACxBM,OAAOC,MAAM,CAACP,MAAMQ,KAAK,EAAE;QACzBC,MAAM,CAAC,EAAEN,OAAO,EAAE,CAAC;QACnBO,KAAK,CAAC,EAAEL,OAAO,EAAE,CAAC;IACpB;AACF,EACA,6CAA6C"}
@@ -1,50 +1,42 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "writeContainerUpdates", {
6
+ enumerable: true,
7
+ get: ()=>writeContainerUpdates
5
8
  });
6
- exports.writeContainerUpdates = void 0;
7
- const constants_1 = /*#__PURE__*/require("../constants");
8
- /**
9
- * Writes all container element position updates after the position is computed
10
- */
9
+ const _constants = require("../constants");
11
10
  function writeContainerUpdates(options) {
12
- var _a, _b, _c;
13
- const {
14
- container,
15
- placement,
16
- middlewareData,
17
- strategy,
18
- lowPPI,
19
- coordinates
20
- } = options;
21
- if (!container) {
22
- return;
23
- }
24
- container.setAttribute(constants_1.DATA_POSITIONING_PLACEMENT, placement);
25
- container.removeAttribute(constants_1.DATA_POSITIONING_INTERSECTING);
26
- if (middlewareData.intersectionObserver.intersecting) {
27
- container.setAttribute(constants_1.DATA_POSITIONING_INTERSECTING, '');
28
- }
29
- container.removeAttribute(constants_1.DATA_POSITIONING_ESCAPED);
30
- if ((_a = middlewareData.hide) === null || _a === void 0 ? void 0 : _a.escaped) {
31
- container.setAttribute(constants_1.DATA_POSITIONING_ESCAPED, '');
32
- }
33
- container.removeAttribute(constants_1.DATA_POSITIONING_HIDDEN);
34
- if ((_b = middlewareData.hide) === null || _b === void 0 ? void 0 : _b.referenceHidden) {
35
- container.setAttribute(constants_1.DATA_POSITIONING_HIDDEN, '');
36
- }
37
- // Round so that the coordinates land on device pixels.
38
- // This prevents blurriness in cases where the browser doesn't apply pixel snapping, such as when other effects like
39
- // `backdrop-filter: blur()` are applied to the container, and the browser is zoomed in.
40
- // See https://github.com/microsoft/fluentui/issues/26764 for more info.
41
- const devicePixelRatio = ((_c = container.ownerDocument.defaultView) === null || _c === void 0 ? void 0 : _c.devicePixelRatio) || 1;
42
- const x = Math.round(coordinates.x * devicePixelRatio) / devicePixelRatio;
43
- const y = Math.round(coordinates.y * devicePixelRatio) / devicePixelRatio;
44
- Object.assign(container.style, {
45
- transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`,
46
- position: strategy
47
- });
48
- }
49
- exports.writeContainerUpdates = writeContainerUpdates;
11
+ var _middlewareData_hide, _middlewareData_hide1, _container_ownerDocument_defaultView;
12
+ const { container , placement , middlewareData , strategy , lowPPI , coordinates } = options;
13
+ if (!container) {
14
+ return;
15
+ }
16
+ container.setAttribute(_constants.DATA_POSITIONING_PLACEMENT, placement);
17
+ container.removeAttribute(_constants.DATA_POSITIONING_INTERSECTING);
18
+ if (middlewareData.intersectionObserver.intersecting) {
19
+ container.setAttribute(_constants.DATA_POSITIONING_INTERSECTING, '');
20
+ }
21
+ container.removeAttribute(_constants.DATA_POSITIONING_ESCAPED);
22
+ if ((_middlewareData_hide = middlewareData.hide) === null || _middlewareData_hide === void 0 ? void 0 : _middlewareData_hide.escaped) {
23
+ container.setAttribute(_constants.DATA_POSITIONING_ESCAPED, '');
24
+ }
25
+ container.removeAttribute(_constants.DATA_POSITIONING_HIDDEN);
26
+ if ((_middlewareData_hide1 = middlewareData.hide) === null || _middlewareData_hide1 === void 0 ? void 0 : _middlewareData_hide1.referenceHidden) {
27
+ container.setAttribute(_constants.DATA_POSITIONING_HIDDEN, '');
28
+ }
29
+ // Round so that the coordinates land on device pixels.
30
+ // This prevents blurriness in cases where the browser doesn't apply pixel snapping, such as when other effects like
31
+ // `backdrop-filter: blur()` are applied to the container, and the browser is zoomed in.
32
+ // See https://github.com/microsoft/fluentui/issues/26764 for more info.
33
+ const devicePixelRatio = ((_container_ownerDocument_defaultView = container.ownerDocument.defaultView) === null || _container_ownerDocument_defaultView === void 0 ? void 0 : _container_ownerDocument_defaultView.devicePixelRatio) || 1;
34
+ const x = Math.round(coordinates.x * devicePixelRatio) / devicePixelRatio;
35
+ const y = Math.round(coordinates.y * devicePixelRatio) / devicePixelRatio;
36
+ Object.assign(container.style, {
37
+ transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`,
38
+ position: strategy
39
+ });
40
+ } //# sourceMappingURL=writeContainerupdates.js.map
41
+
50
42
  //# sourceMappingURL=writeContainerupdates.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AACA;AAOA;;;AAGA,SAAgBA,qBAAqB,CAACC,OAYrC;;EACC,MAAM;IAAEC,SAAS;IAAEC,SAAS;IAAEC,cAAc;IAAEC,QAAQ;IAAEC,MAAM;IAAEC;EAAW,CAAE,GAAGN,OAAO;EACvF,IAAI,CAACC,SAAS,EAAE;IACd;;EAEFA,SAAS,CAACM,YAAY,CAACC,sCAA0B,EAAEN,SAAS,CAAC;EAC7DD,SAAS,CAACQ,eAAe,CAACD,yCAA6B,CAAC;EACxD,IAAIL,cAAc,CAACO,oBAAoB,CAACC,YAAY,EAAE;IACpDV,SAAS,CAACM,YAAY,CAACC,yCAA6B,EAAE,EAAE,CAAC;;EAG3DP,SAAS,CAACQ,eAAe,CAACD,oCAAwB,CAAC;EACnD,IAAI,oBAAc,CAACI,IAAI,0CAAEC,OAAO,EAAE;IAChCZ,SAAS,CAACM,YAAY,CAACC,oCAAwB,EAAE,EAAE,CAAC;;EAGtDP,SAAS,CAACQ,eAAe,CAACD,mCAAuB,CAAC;EAClD,IAAI,oBAAc,CAACI,IAAI,0CAAEE,eAAe,EAAE;IACxCb,SAAS,CAACM,YAAY,CAACC,mCAAuB,EAAE,EAAE,CAAC;;EAGrD;EACA;EACA;EACA;EACA,MAAMO,gBAAgB,GAAG,gBAAS,CAACC,aAAa,CAACC,WAAW,0CAAEF,gBAAgB,KAAI,CAAC;EACnF,MAAMG,CAAC,GAAGC,IAAI,CAACC,KAAK,CAACd,WAAW,CAACY,CAAC,GAAGH,gBAAgB,CAAC,GAAGA,gBAAgB;EACzE,MAAMM,CAAC,GAAGF,IAAI,CAACC,KAAK,CAACd,WAAW,CAACe,CAAC,GAAGN,gBAAgB,CAAC,GAAGA,gBAAgB;EAEzEO,MAAM,CAACC,MAAM,CAACtB,SAAS,CAACuB,KAAK,EAAE;IAC7BC,SAAS,EAAEpB,MAAM,GAAG,aAAaa,CAAC,OAAOG,CAAC,KAAK,GAAG,eAAeH,CAAC,OAAOG,CAAC,QAAQ;IAClFK,QAAQ,EAAEtB;GACX,CAAC;AACJ;AA7CAuB","names":["writeContainerUpdates","options","container","placement","middlewareData","strategy","lowPPI","coordinates","setAttribute","constants_1","removeAttribute","intersectionObserver","intersecting","hide","escaped","referenceHidden","devicePixelRatio","ownerDocument","defaultView","x","Math","round","y","Object","assign","style","transform","position","exports"],"sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-positioning/src/utils/writeContainerupdates.ts"],"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 { container, placement, middlewareData, strategy, lowPPI, coordinates } = 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 // Round so that the coordinates land on device pixels.\n // This prevents blurriness in cases where the browser doesn't apply pixel snapping, such as when other effects like\n // `backdrop-filter: blur()` are applied to the container, and the browser is zoomed in.\n // See https://github.com/microsoft/fluentui/issues/26764 for more info.\n const devicePixelRatio = container.ownerDocument.defaultView?.devicePixelRatio || 1;\n const x = Math.round(coordinates.x * devicePixelRatio) / devicePixelRatio;\n const y = Math.round(coordinates.y * devicePixelRatio) / devicePixelRatio;\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"]}
1
+ {"version":3,"sources":["../../lib/utils/writeContainerupdates.js"],"sourcesContent":["import { DATA_POSITIONING_ESCAPED, DATA_POSITIONING_HIDDEN, DATA_POSITIONING_INTERSECTING, DATA_POSITIONING_PLACEMENT } from '../constants';\n/**\n * Writes all container element position updates after the position is computed\n */\nexport function writeContainerUpdates(options) {\n var _middlewareData_hide, _middlewareData_hide1, _container_ownerDocument_defaultView;\n const {\n container,\n placement,\n middlewareData,\n strategy,\n lowPPI,\n coordinates\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 container.removeAttribute(DATA_POSITIONING_ESCAPED);\n if ((_middlewareData_hide = middlewareData.hide) === null || _middlewareData_hide === void 0 ? void 0 : _middlewareData_hide.escaped) {\n container.setAttribute(DATA_POSITIONING_ESCAPED, '');\n }\n container.removeAttribute(DATA_POSITIONING_HIDDEN);\n if ((_middlewareData_hide1 = middlewareData.hide) === null || _middlewareData_hide1 === void 0 ? void 0 : _middlewareData_hide1.referenceHidden) {\n container.setAttribute(DATA_POSITIONING_HIDDEN, '');\n }\n // Round so that the coordinates land on device pixels.\n // This prevents blurriness in cases where the browser doesn't apply pixel snapping, such as when other effects like\n // `backdrop-filter: blur()` are applied to the container, and the browser is zoomed in.\n // See https://github.com/microsoft/fluentui/issues/26764 for more info.\n const devicePixelRatio = ((_container_ownerDocument_defaultView = container.ownerDocument.defaultView) === null || _container_ownerDocument_defaultView === void 0 ? void 0 : _container_ownerDocument_defaultView.devicePixelRatio) || 1;\n const x = Math.round(coordinates.x * devicePixelRatio) / devicePixelRatio;\n const y = Math.round(coordinates.y * devicePixelRatio) / devicePixelRatio;\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//# sourceMappingURL=writeContainerupdates.js.map"],"names":["writeContainerUpdates","options","_middlewareData_hide","_middlewareData_hide1","_container_ownerDocument_defaultView","container","placement","middlewareData","strategy","lowPPI","coordinates","setAttribute","DATA_POSITIONING_PLACEMENT","removeAttribute","DATA_POSITIONING_INTERSECTING","intersectionObserver","intersecting","DATA_POSITIONING_ESCAPED","hide","escaped","DATA_POSITIONING_HIDDEN","referenceHidden","devicePixelRatio","ownerDocument","defaultView","x","Math","round","y","Object","assign","style","transform","position"],"mappings":";;;;+BAIgBA;;aAAAA;;2BAJ6G;AAItH,SAASA,sBAAsBC,OAAO,EAAE;IAC7C,IAAIC,sBAAsBC,uBAAuBC;IACjD,MAAM,EACJC,UAAS,EACTC,UAAS,EACTC,eAAc,EACdC,SAAQ,EACRC,OAAM,EACNC,YAAW,EACZ,GAAGT;IACJ,IAAI,CAACI,WAAW;QACd;IACF,CAAC;IACDA,UAAUM,YAAY,CAACC,qCAA0B,EAAEN;IACnDD,UAAUQ,eAAe,CAACC,wCAA6B;IACvD,IAAIP,eAAeQ,oBAAoB,CAACC,YAAY,EAAE;QACpDX,UAAUM,YAAY,CAACG,wCAA6B,EAAE;IACxD,CAAC;IACDT,UAAUQ,eAAe,CAACI,mCAAwB;IAClD,IAAI,AAACf,CAAAA,uBAAuBK,eAAeW,IAAI,AAAD,MAAO,IAAI,IAAIhB,yBAAyB,KAAK,IAAI,KAAK,IAAIA,qBAAqBiB,OAAO,EAAE;QACpId,UAAUM,YAAY,CAACM,mCAAwB,EAAE;IACnD,CAAC;IACDZ,UAAUQ,eAAe,CAACO,kCAAuB;IACjD,IAAI,AAACjB,CAAAA,wBAAwBI,eAAeW,IAAI,AAAD,MAAO,IAAI,IAAIf,0BAA0B,KAAK,IAAI,KAAK,IAAIA,sBAAsBkB,eAAe,EAAE;QAC/IhB,UAAUM,YAAY,CAACS,kCAAuB,EAAE;IAClD,CAAC;IACD,uDAAuD;IACvD,oHAAoH;IACpH,wFAAwF;IACxF,wEAAwE;IACxE,MAAME,mBAAmB,AAAC,CAAA,AAAClB,CAAAA,uCAAuCC,UAAUkB,aAAa,CAACC,WAAW,AAAD,MAAO,IAAI,IAAIpB,yCAAyC,KAAK,IAAI,KAAK,IAAIA,qCAAqCkB,gBAAgB,AAAD,KAAM;IACxO,MAAMG,IAAIC,KAAKC,KAAK,CAACjB,YAAYe,CAAC,GAAGH,oBAAoBA;IACzD,MAAMM,IAAIF,KAAKC,KAAK,CAACjB,YAAYkB,CAAC,GAAGN,oBAAoBA;IACzDO,OAAOC,MAAM,CAACzB,UAAU0B,KAAK,EAAE;QAC7BC,WAAWvB,SAAS,CAAC,UAAU,EAAEgB,EAAE,IAAI,EAAEG,EAAE,GAAG,CAAC,GAAG,CAAC,YAAY,EAAEH,EAAE,IAAI,EAAEG,EAAE,MAAM,CAAC;QAClFK,UAAUzB;IACZ;AACF,EACA,iDAAiD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-positioning",
3
- "version": "0.0.0-nightly-20230223-0420.1",
3
+ "version": "0.0.0-nightly-20230223-2115.1",
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",
@@ -20,7 +20,7 @@
20
20
  "lint": "just-scripts lint",
21
21
  "test": "jest --passWithNoTests",
22
22
  "type-check": "tsc -b tsconfig.json",
23
- "generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
23
+ "generate-api": "just-scripts generate-api"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@fluentui/eslint-plugin": "*",
@@ -29,11 +29,11 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@floating-ui/dom": "^1.2.0",
32
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20230223-0420.1",
33
- "@fluentui/react-theme": "0.0.0-nightly-20230223-0420.1",
34
- "@fluentui/react-utilities": "0.0.0-nightly-20230223-0420.1",
32
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20230223-2115.1",
33
+ "@fluentui/react-theme": "0.0.0-nightly-20230223-2115.1",
34
+ "@fluentui/react-utilities": "0.0.0-nightly-20230223-2115.1",
35
35
  "@griffel/react": "^1.5.2",
36
- "tslib": "^2.1.0"
36
+ "@swc/helpers": "^0.4.14"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@types/react": ">=16.8.0 <19.0.0",