@fluentui/react-positioning 9.3.2 → 9.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +63 -1
- package/CHANGELOG.md +24 -2
- package/lib/utils/writeContainerupdates.js +3 -4
- package/lib/utils/writeContainerupdates.js.map +1 -1
- package/lib-amd/utils/writeContainerupdates.js +3 -1
- package/lib-amd/utils/writeContainerupdates.js.map +1 -1
- package/lib-commonjs/utils/writeContainerupdates.js +3 -4
- package/lib-commonjs/utils/writeContainerupdates.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,69 @@
|
|
|
2
2
|
"name": "@fluentui/react-positioning",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 20 Dec 2022 14:55:51 GMT",
|
|
6
|
+
"tag": "@fluentui/react-positioning_v9.3.4",
|
|
7
|
+
"version": "9.3.4",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "lingfangao@hotmail.com",
|
|
12
|
+
"package": "@fluentui/react-positioning",
|
|
13
|
+
"commit": "905b3b2e74e472bd2d9cb825c0dc12d3dee4aa46",
|
|
14
|
+
"comment": "fix: Coordinates should be rounded to integers"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui/react-positioning",
|
|
19
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.1.3",
|
|
20
|
+
"commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-positioning",
|
|
25
|
+
"comment": "Bump @fluentui/react-theme to v9.1.4",
|
|
26
|
+
"commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-positioning",
|
|
31
|
+
"comment": "Bump @fluentui/react-utilities to v9.3.0",
|
|
32
|
+
"commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"date": "Mon, 05 Dec 2022 18:29:28 GMT",
|
|
39
|
+
"tag": "@fluentui/react-positioning_v9.3.3",
|
|
40
|
+
"version": "9.3.3",
|
|
41
|
+
"comments": {
|
|
42
|
+
"none": [
|
|
43
|
+
{
|
|
44
|
+
"author": "tristan.watanabe@gmail.com",
|
|
45
|
+
"package": "@fluentui/react-positioning",
|
|
46
|
+
"commit": "109f6e6966ce703169c98134f1aedbaec17d6f93",
|
|
47
|
+
"comment": "chore: Migrate to new package structure."
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"patch": [
|
|
51
|
+
{
|
|
52
|
+
"author": "beachball",
|
|
53
|
+
"package": "@fluentui/react-positioning",
|
|
54
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.1.2",
|
|
55
|
+
"commit": "4c29542a51bf068e171690cc8e59c14489883912"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"author": "beachball",
|
|
59
|
+
"package": "@fluentui/react-positioning",
|
|
60
|
+
"comment": "Bump @fluentui/react-theme to v9.1.3",
|
|
61
|
+
"commit": "4c29542a51bf068e171690cc8e59c14489883912"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"date": "Thu, 17 Nov 2022 23:05:44 GMT",
|
|
6
68
|
"tag": "@fluentui/react-positioning_v9.3.2",
|
|
7
69
|
"version": "9.3.2",
|
|
8
70
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-positioning
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 20 Dec 2022 14:55:51 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.3.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-positioning_v9.3.4)
|
|
8
|
+
|
|
9
|
+
Tue, 20 Dec 2022 14:55:51 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-positioning_v9.3.3..@fluentui/react-positioning_v9.3.4)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- fix: Coordinates should be rounded to integers ([PR #26038](https://github.com/microsoft/fluentui/pull/26038) by lingfangao@hotmail.com)
|
|
15
|
+
- Bump @fluentui/react-shared-contexts to v9.1.3 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
|
|
16
|
+
- Bump @fluentui/react-theme to v9.1.4 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
|
|
17
|
+
- Bump @fluentui/react-utilities to v9.3.0 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
|
|
18
|
+
|
|
19
|
+
## [9.3.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-positioning_v9.3.3)
|
|
20
|
+
|
|
21
|
+
Mon, 05 Dec 2022 18:29:28 GMT
|
|
22
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-positioning_v9.3.2..@fluentui/react-positioning_v9.3.3)
|
|
23
|
+
|
|
24
|
+
### Patches
|
|
25
|
+
|
|
26
|
+
- Bump @fluentui/react-shared-contexts to v9.1.2 ([PR #25798](https://github.com/microsoft/fluentui/pull/25798) by beachball)
|
|
27
|
+
- Bump @fluentui/react-theme to v9.1.3 ([PR #25798](https://github.com/microsoft/fluentui/pull/25798) by beachball)
|
|
28
|
+
|
|
7
29
|
## [9.3.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-positioning_v9.3.2)
|
|
8
30
|
|
|
9
|
-
Thu, 17 Nov 2022 23:
|
|
31
|
+
Thu, 17 Nov 2022 23:05:44 GMT
|
|
10
32
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-positioning_v9.3.1..@fluentui/react-positioning_v9.3.2)
|
|
11
33
|
|
|
12
34
|
### Patches
|
|
@@ -12,10 +12,7 @@ export function writeContainerUpdates(options) {
|
|
|
12
12
|
middlewareData,
|
|
13
13
|
strategy,
|
|
14
14
|
lowPPI,
|
|
15
|
-
coordinates
|
|
16
|
-
x,
|
|
17
|
-
y
|
|
18
|
-
}
|
|
15
|
+
coordinates
|
|
19
16
|
} = options;
|
|
20
17
|
|
|
21
18
|
if (!container) {
|
|
@@ -41,6 +38,8 @@ export function writeContainerUpdates(options) {
|
|
|
41
38
|
container.setAttribute(DATA_POSITIONING_HIDDEN, '');
|
|
42
39
|
}
|
|
43
40
|
|
|
41
|
+
const x = Math.round(coordinates.x);
|
|
42
|
+
const y = Math.round(coordinates.y);
|
|
44
43
|
Object.assign(container.style, {
|
|
45
44
|
transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`,
|
|
46
45
|
position: strategy
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["packages/react-components/react-positioning/src/utils/writeContainerupdates.ts"],"names":[],"mappings":"AACA,SACE,wBADF,EAEE,uBAFF,EAGE,6BAHF,EAIE,0BAJF,QAKO,cALP;AAOA;;AAEG;;AACH,OAAM,SAAU,qBAAV,CAAgC,OAAhC,EAYL;;;EACC,MAAM;
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-positioning/src/utils/writeContainerupdates.ts"],"names":[],"mappings":"AACA,SACE,wBADF,EAEE,uBAFF,EAGE,6BAHF,EAIE,0BAJF,QAKO,cALP;AAOA;;AAEG;;AACH,OAAM,SAAU,qBAAV,CAAgC,OAAhC,EAYL;;;EACC,MAAM;IAAE,SAAF;IAAa,SAAb;IAAwB,cAAxB;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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 const x = Math.round(coordinates.x);\n const y = Math.round(coordinates.y);\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/"}
|
|
@@ -7,7 +7,7 @@ define(["require", "exports", "../constants"], function (require, exports, const
|
|
|
7
7
|
*/
|
|
8
8
|
function writeContainerUpdates(options) {
|
|
9
9
|
var _a, _b;
|
|
10
|
-
var container = options.container, placement = options.placement, middlewareData = options.middlewareData, strategy = options.strategy, lowPPI = options.lowPPI,
|
|
10
|
+
var container = options.container, placement = options.placement, middlewareData = options.middlewareData, strategy = options.strategy, lowPPI = options.lowPPI, coordinates = options.coordinates;
|
|
11
11
|
if (!container) {
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
@@ -24,6 +24,8 @@ define(["require", "exports", "../constants"], function (require, exports, const
|
|
|
24
24
|
if ((_b = middlewareData.hide) === null || _b === void 0 ? void 0 : _b.referenceHidden) {
|
|
25
25
|
container.setAttribute(constants_1.DATA_POSITIONING_HIDDEN, '');
|
|
26
26
|
}
|
|
27
|
+
var x = Math.round(coordinates.x);
|
|
28
|
+
var y = Math.round(coordinates.y);
|
|
27
29
|
Object.assign(container.style, {
|
|
28
30
|
transform: lowPPI ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)",
|
|
29
31
|
position: strategy,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeContainerupdates.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-positioning/src/utils/writeContainerupdates.ts"],"names":[],"mappings":";;;;IAQA;;OAEG;IACH,SAAgB,qBAAqB,CAAC,OAYrC;;
|
|
1
|
+
{"version":3,"file":"writeContainerupdates.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-positioning/src/utils/writeContainerupdates.ts"],"names":[],"mappings":";;;;IAQA;;OAEG;IACH,SAAgB,qBAAqB,CAAC,OAYrC;;QACS,IAAA,SAAS,GAA+D,OAAO,UAAtE,EAAE,SAAS,GAAoD,OAAO,UAA3D,EAAE,cAAc,GAAoC,OAAO,eAA3C,EAAE,QAAQ,GAA0B,OAAO,SAAjC,EAAE,MAAM,GAAkB,OAAO,OAAzB,EAAE,WAAW,GAAK,OAAO,YAAZ,CAAa;QACxF,IAAI,CAAC,SAAS,EAAE;YACd,OAAO;SACR;QACD,SAAS,CAAC,YAAY,CAAC,sCAA0B,EAAE,SAAS,CAAC,CAAC;QAC9D,SAAS,CAAC,eAAe,CAAC,yCAA6B,CAAC,CAAC;QACzD,IAAI,cAAc,CAAC,oBAAoB,CAAC,YAAY,EAAE;YACpD,SAAS,CAAC,YAAY,CAAC,yCAA6B,EAAE,EAAE,CAAC,CAAC;SAC3D;QAED,SAAS,CAAC,eAAe,CAAC,oCAAwB,CAAC,CAAC;QACpD,IAAI,MAAA,cAAc,CAAC,IAAI,0CAAE,OAAO,EAAE;YAChC,SAAS,CAAC,YAAY,CAAC,oCAAwB,EAAE,EAAE,CAAC,CAAC;SACtD;QAED,SAAS,CAAC,eAAe,CAAC,mCAAuB,CAAC,CAAC;QACnD,IAAI,MAAA,cAAc,CAAC,IAAI,0CAAE,eAAe,EAAE;YACxC,SAAS,CAAC,YAAY,CAAC,mCAAuB,EAAE,EAAE,CAAC,CAAC;SACrD;QAED,IAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QACpC,IAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAEpC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE;YAC7B,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,eAAa,CAAC,YAAO,CAAC,QAAK,CAAC,CAAC,CAAC,iBAAe,CAAC,YAAO,CAAC,WAAQ;YAClF,QAAQ,EAAE,QAAQ;SACnB,CAAC,CAAC;IACL,CAAC;IAxCD,sDAwCC","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 const x = Math.round(coordinates.x);\n const y = Math.round(coordinates.y);\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"]}
|
|
@@ -20,10 +20,7 @@ function writeContainerUpdates(options) {
|
|
|
20
20
|
middlewareData,
|
|
21
21
|
strategy,
|
|
22
22
|
lowPPI,
|
|
23
|
-
coordinates
|
|
24
|
-
x,
|
|
25
|
-
y
|
|
26
|
-
}
|
|
23
|
+
coordinates
|
|
27
24
|
} = options;
|
|
28
25
|
|
|
29
26
|
if (!container) {
|
|
@@ -49,6 +46,8 @@ function writeContainerUpdates(options) {
|
|
|
49
46
|
container.setAttribute(constants_1.DATA_POSITIONING_HIDDEN, '');
|
|
50
47
|
}
|
|
51
48
|
|
|
49
|
+
const x = Math.round(coordinates.x);
|
|
50
|
+
const y = Math.round(coordinates.y);
|
|
52
51
|
Object.assign(container.style, {
|
|
53
52
|
transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`,
|
|
54
53
|
position: strategy
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-positioning/src/ut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AM,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;;AAxCD,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 { 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 const x = Math.round(coordinates.x);\n const y = Math.round(coordinates.y);\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.
|
|
3
|
+
"version": "9.3.4",
|
|
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",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@floating-ui/dom": "^1.0.0",
|
|
31
|
-
"@fluentui/react-shared-contexts": "^9.1.
|
|
32
|
-
"@fluentui/react-theme": "^9.1.
|
|
33
|
-
"@fluentui/react-utilities": "^9.
|
|
31
|
+
"@fluentui/react-shared-contexts": "^9.1.3",
|
|
32
|
+
"@fluentui/react-theme": "^9.1.4",
|
|
33
|
+
"@fluentui/react-utilities": "^9.3.0",
|
|
34
34
|
"@griffel/react": "^1.4.2",
|
|
35
35
|
"tslib": "^2.1.0"
|
|
36
36
|
},
|