@fluentui/react-positioning 0.0.0-nightly-20221219-0421.1 → 0.0.0-nightly-20221220-1334.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.
- package/CHANGELOG.json +9 -9
- package/CHANGELOG.md +7 -7
- package/lib/utils/writeContainerupdates.js +3 -4
- package/lib/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,9 +2,9 @@
|
|
2
2
|
"name": "@fluentui/react-positioning",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-positioning_v0.0.0-nightly-
|
7
|
-
"version": "0.0.0-nightly-
|
5
|
+
"date": "Tue, 20 Dec 2022 13:41:18 GMT",
|
6
|
+
"tag": "@fluentui/react-positioning_v0.0.0-nightly-20221220-1334.1",
|
7
|
+
"version": "0.0.0-nightly-20221220-1334.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -16,20 +16,20 @@
|
|
16
16
|
{
|
17
17
|
"author": "beachball",
|
18
18
|
"package": "@fluentui/react-positioning",
|
19
|
-
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
20
|
-
"commit": "
|
19
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20221220-1334.1",
|
20
|
+
"commit": "f4d677916e0dc5e2d3ed6e83db41989346622a3d"
|
21
21
|
},
|
22
22
|
{
|
23
23
|
"author": "beachball",
|
24
24
|
"package": "@fluentui/react-positioning",
|
25
|
-
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-
|
26
|
-
"commit": "
|
25
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20221220-1334.1",
|
26
|
+
"commit": "f4d677916e0dc5e2d3ed6e83db41989346622a3d"
|
27
27
|
},
|
28
28
|
{
|
29
29
|
"author": "beachball",
|
30
30
|
"package": "@fluentui/react-positioning",
|
31
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-
|
32
|
-
"commit": "
|
31
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20221220-1334.1",
|
32
|
+
"commit": "f4d677916e0dc5e2d3ed6e83db41989346622a3d"
|
33
33
|
}
|
34
34
|
]
|
35
35
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,20 +1,20 @@
|
|
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 13:41:18 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-nightly-
|
7
|
+
## [0.0.0-nightly-20221220-1334.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-positioning_v0.0.0-nightly-20221220-1334.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-positioning_v9.3.3..@fluentui/react-positioning_v0.0.0-nightly-
|
9
|
+
Tue, 20 Dec 2022 13:41:18 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-positioning_v9.3.3..@fluentui/react-positioning_v0.0.0-nightly-20221220-1334.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
15
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
16
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
17
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
15
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20221220-1334.1 ([commit](https://github.com/microsoft/fluentui/commit/f4d677916e0dc5e2d3ed6e83db41989346622a3d) by beachball)
|
16
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20221220-1334.1 ([commit](https://github.com/microsoft/fluentui/commit/f4d677916e0dc5e2d3ed6e83db41989346622a3d) by beachball)
|
17
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20221220-1334.1 ([commit](https://github.com/microsoft/fluentui/commit/f4d677916e0dc5e2d3ed6e83db41989346622a3d) by beachball)
|
18
18
|
|
19
19
|
## [9.3.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-positioning_v9.3.3)
|
20
20
|
|
@@ -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,OAA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cesContent":["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":""}
|
@@ -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/utils/writeContainerupdates.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,WAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;AAOA;;AAEG;;;AACH,SAAgB,qBAAhB,CAAsC,OAAtC,EAYC;;;EACC,MAAM;IAAE,SAAF;IAAa,SAAb;IAAwB,cAAxB;IAAwC,QAAxC;IAAkD,MAAlD;IAA0D;EAA1D,IAA0E,OAAhF;;EACA,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,GAAG,IAAI,CAAC,KAAL,CAAW,WAAW,CAAC,CAAvB,CAAV;EACA,MAAM,CAAC,GAAG,IAAI,CAAC,KAAL,CAAW,WAAW,CAAC,CAAvB,CAAV;EAEA,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;;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":""}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-positioning",
|
3
|
-
"version": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20221220-1334.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",
|
@@ -28,9 +28,9 @@
|
|
28
28
|
},
|
29
29
|
"dependencies": {
|
30
30
|
"@floating-ui/dom": "^1.0.0",
|
31
|
-
"@fluentui/react-shared-contexts": "0.0.0-nightly-
|
32
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
33
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
31
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20221220-1334.1",
|
32
|
+
"@fluentui/react-theme": "0.0.0-nightly-20221220-1334.1",
|
33
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20221220-1334.1",
|
34
34
|
"@griffel/react": "^1.4.2",
|
35
35
|
"tslib": "^2.1.0"
|
36
36
|
},
|