@fluentui/react-positioning 0.0.0-nightly-20230317-1454.1 → 0.0.0-nightly-20230322-0439.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 (92) hide show
  1. package/.swcrc +2 -11
  2. package/CHANGELOG.json +48 -9
  3. package/CHANGELOG.md +20 -7
  4. package/lib/constants.js +4 -4
  5. package/lib/createArrowStyles.js +19 -19
  6. package/lib/createPositionManager.js +13 -13
  7. package/lib/createPositionManager.js.map +1 -1
  8. package/lib/index.js +5 -5
  9. package/lib/middleware/coverTarget.js +6 -6
  10. package/lib/middleware/flip.js +4 -4
  11. package/lib/middleware/index.js +6 -6
  12. package/lib/middleware/intersecting.js +2 -2
  13. package/lib/middleware/maxSize.js +8 -8
  14. package/lib/middleware/offset.js +2 -2
  15. package/lib/middleware/shift.js +5 -5
  16. package/lib/types.js +1 -1
  17. package/lib/usePositioning.js +37 -29
  18. package/lib/usePositioning.js.map +1 -1
  19. package/lib/usePositioningMouseTarget.js +4 -4
  20. package/lib/utils/fromFloatingUIPlacement.js +10 -10
  21. package/lib/utils/getBoundary.js +8 -8
  22. package/lib/utils/getBoundary.js.map +1 -1
  23. package/lib/utils/getFloatingUIOffset.js +2 -2
  24. package/lib/utils/getReactFiberFromNode.js +3 -3
  25. package/lib/utils/getScrollParent.js +8 -6
  26. package/lib/utils/getScrollParent.js.map +1 -1
  27. package/lib/utils/hasAutoFocusFilter.js +4 -3
  28. package/lib/utils/hasAutoFocusFilter.js.map +1 -1
  29. package/lib/utils/index.js +15 -15
  30. package/lib/utils/mergeArrowOffset.js +6 -5
  31. package/lib/utils/mergeArrowOffset.js.map +1 -1
  32. package/lib/utils/parseFloatingUIPlacement.js +1 -1
  33. package/lib/utils/resolvePositioningShorthand.js +33 -33
  34. package/lib/utils/toFloatingUIPadding.js +3 -3
  35. package/lib/utils/toFloatingUIPlacement.js +11 -11
  36. package/lib/utils/toggleScrollListener.js +4 -4
  37. package/lib/utils/useCallbackRef.js +2 -2
  38. package/lib/utils/writeContainerupdates.js +8 -7
  39. package/lib/utils/writeContainerupdates.js.map +1 -1
  40. package/lib-commonjs/constants.js +4 -4
  41. package/lib-commonjs/constants.js.map +1 -1
  42. package/lib-commonjs/createArrowStyles.js +16 -16
  43. package/lib-commonjs/createArrowStyles.js.map +1 -1
  44. package/lib-commonjs/createPositionManager.js +10 -10
  45. package/lib-commonjs/createPositionManager.js.map +1 -1
  46. package/lib-commonjs/index.js.map +1 -1
  47. package/lib-commonjs/middleware/coverTarget.js +5 -5
  48. package/lib-commonjs/middleware/coverTarget.js.map +1 -1
  49. package/lib-commonjs/middleware/flip.js +2 -2
  50. package/lib-commonjs/middleware/flip.js.map +1 -1
  51. package/lib-commonjs/middleware/index.js.map +1 -1
  52. package/lib-commonjs/middleware/intersecting.js +1 -1
  53. package/lib-commonjs/middleware/intersecting.js.map +1 -1
  54. package/lib-commonjs/middleware/maxSize.js +6 -6
  55. package/lib-commonjs/middleware/maxSize.js.map +1 -1
  56. package/lib-commonjs/middleware/offset.js.map +1 -1
  57. package/lib-commonjs/middleware/shift.js +3 -3
  58. package/lib-commonjs/middleware/shift.js.map +1 -1
  59. package/lib-commonjs/types.js.map +1 -1
  60. package/lib-commonjs/usePositioning.js +30 -22
  61. package/lib-commonjs/usePositioning.js.map +1 -1
  62. package/lib-commonjs/usePositioningMouseTarget.js +2 -2
  63. package/lib-commonjs/usePositioningMouseTarget.js.map +1 -1
  64. package/lib-commonjs/utils/fromFloatingUIPlacement.js +9 -9
  65. package/lib-commonjs/utils/fromFloatingUIPlacement.js.map +1 -1
  66. package/lib-commonjs/utils/getBoundary.js +7 -7
  67. package/lib-commonjs/utils/getBoundary.js.map +1 -1
  68. package/lib-commonjs/utils/getFloatingUIOffset.js +1 -1
  69. package/lib-commonjs/utils/getFloatingUIOffset.js.map +1 -1
  70. package/lib-commonjs/utils/getReactFiberFromNode.js +2 -2
  71. package/lib-commonjs/utils/getReactFiberFromNode.js.map +1 -1
  72. package/lib-commonjs/utils/getScrollParent.js +8 -6
  73. package/lib-commonjs/utils/getScrollParent.js.map +1 -1
  74. package/lib-commonjs/utils/hasAutoFocusFilter.js +3 -2
  75. package/lib-commonjs/utils/hasAutoFocusFilter.js.map +1 -1
  76. package/lib-commonjs/utils/index.js.map +1 -1
  77. package/lib-commonjs/utils/mergeArrowOffset.js +6 -5
  78. package/lib-commonjs/utils/mergeArrowOffset.js.map +1 -1
  79. package/lib-commonjs/utils/parseFloatingUIPlacement.js +1 -1
  80. package/lib-commonjs/utils/parseFloatingUIPlacement.js.map +1 -1
  81. package/lib-commonjs/utils/resolvePositioningShorthand.js +33 -33
  82. package/lib-commonjs/utils/resolvePositioningShorthand.js.map +1 -1
  83. package/lib-commonjs/utils/toFloatingUIPadding.js +3 -3
  84. package/lib-commonjs/utils/toFloatingUIPadding.js.map +1 -1
  85. package/lib-commonjs/utils/toFloatingUIPlacement.js +11 -11
  86. package/lib-commonjs/utils/toFloatingUIPlacement.js.map +1 -1
  87. package/lib-commonjs/utils/toggleScrollListener.js +2 -2
  88. package/lib-commonjs/utils/toggleScrollListener.js.map +1 -1
  89. package/lib-commonjs/utils/useCallbackRef.js.map +1 -1
  90. package/lib-commonjs/utils/writeContainerupdates.js +7 -6
  91. package/lib-commonjs/utils/writeContainerupdates.js.map +1 -1
  92. package/package.json +5 -4
@@ -9,59 +9,59 @@ Object.defineProperty(exports, "resolvePositioningShorthand", {
9
9
  });
10
10
  const shorthandLookup = {
11
11
  above: {
12
- position: "above",
13
- align: "center"
12
+ position: 'above',
13
+ align: 'center'
14
14
  },
15
- "above-start": {
16
- position: "above",
17
- align: "start"
15
+ 'above-start': {
16
+ position: 'above',
17
+ align: 'start'
18
18
  },
19
- "above-end": {
20
- position: "above",
21
- align: "end"
19
+ 'above-end': {
20
+ position: 'above',
21
+ align: 'end'
22
22
  },
23
23
  below: {
24
- position: "below",
25
- align: "center"
24
+ position: 'below',
25
+ align: 'center'
26
26
  },
27
- "below-start": {
28
- position: "below",
29
- align: "start"
27
+ 'below-start': {
28
+ position: 'below',
29
+ align: 'start'
30
30
  },
31
- "below-end": {
32
- position: "below",
33
- align: "end"
31
+ 'below-end': {
32
+ position: 'below',
33
+ align: 'end'
34
34
  },
35
35
  before: {
36
- position: "before",
37
- align: "center"
36
+ position: 'before',
37
+ align: 'center'
38
38
  },
39
- "before-top": {
40
- position: "before",
41
- align: "top"
39
+ 'before-top': {
40
+ position: 'before',
41
+ align: 'top'
42
42
  },
43
- "before-bottom": {
44
- position: "before",
45
- align: "bottom"
43
+ 'before-bottom': {
44
+ position: 'before',
45
+ align: 'bottom'
46
46
  },
47
47
  after: {
48
- position: "after",
49
- align: "center"
48
+ position: 'after',
49
+ align: 'center'
50
50
  },
51
- "after-top": {
52
- position: "after",
53
- align: "top"
51
+ 'after-top': {
52
+ position: 'after',
53
+ align: 'top'
54
54
  },
55
- "after-bottom": {
56
- position: "after",
57
- align: "bottom"
55
+ 'after-bottom': {
56
+ position: 'after',
57
+ align: 'bottom'
58
58
  }
59
59
  };
60
60
  function resolvePositioningShorthand(shorthand) {
61
61
  if (shorthand === undefined || shorthand === null) {
62
62
  return {};
63
63
  }
64
- if (typeof shorthand === "string") {
64
+ if (typeof shorthand === 'string') {
65
65
  return shorthandLookup[shorthand];
66
66
  }
67
67
  return shorthand;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/resolvePositioningShorthand.js"],"sourcesContent":["// Look up table for shorthand to avoid parsing strings\nconst shorthandLookup = {\n above: {\n position: \"above\",\n align: \"center\"\n },\n \"above-start\": {\n position: \"above\",\n align: \"start\"\n },\n \"above-end\": {\n position: \"above\",\n align: \"end\"\n },\n below: {\n position: \"below\",\n align: \"center\"\n },\n \"below-start\": {\n position: \"below\",\n align: \"start\"\n },\n \"below-end\": {\n position: \"below\",\n align: \"end\"\n },\n before: {\n position: \"before\",\n align: \"center\"\n },\n \"before-top\": {\n position: \"before\",\n align: \"top\"\n },\n \"before-bottom\": {\n position: \"before\",\n align: \"bottom\"\n },\n after: {\n position: \"after\",\n align: \"center\"\n },\n \"after-top\": {\n position: \"after\",\n align: \"top\"\n },\n \"after-bottom\": {\n position: \"after\",\n align: \"bottom\"\n }\n};\nexport function resolvePositioningShorthand(shorthand) {\n if (shorthand === undefined || shorthand === null) {\n return {};\n }\n if (typeof shorthand === \"string\") {\n return shorthandLookup[shorthand];\n }\n return shorthand;\n}\n//# sourceMappingURL=resolvePositioningShorthand.js.map"],"names":["resolvePositioningShorthand","shorthandLookup","above","position","align","below","before","after","shorthand","undefined"],"mappings":"AAAA,uDAAuD;;;;;+BAmDvCA;;aAAAA;;AAlDhB,MAAMC,kBAAkB;IACtBC,OAAO;QACLC,UAAU;QACVC,OAAO;IACT;IACA,eAAe;QACbD,UAAU;QACVC,OAAO;IACT;IACA,aAAa;QACXD,UAAU;QACVC,OAAO;IACT;IACAC,OAAO;QACLF,UAAU;QACVC,OAAO;IACT;IACA,eAAe;QACbD,UAAU;QACVC,OAAO;IACT;IACA,aAAa;QACXD,UAAU;QACVC,OAAO;IACT;IACAE,QAAQ;QACNH,UAAU;QACVC,OAAO;IACT;IACA,cAAc;QACZD,UAAU;QACVC,OAAO;IACT;IACA,iBAAiB;QACfD,UAAU;QACVC,OAAO;IACT;IACAG,OAAO;QACLJ,UAAU;QACVC,OAAO;IACT;IACA,aAAa;QACXD,UAAU;QACVC,OAAO;IACT;IACA,gBAAgB;QACdD,UAAU;QACVC,OAAO;IACT;AACF;AACO,SAASJ,4BAA4BQ,SAAS,EAAE;IACrD,IAAIA,cAAcC,aAAaD,cAAc,IAAI,EAAE;QACjD,OAAO,CAAC;IACV,CAAC;IACD,IAAI,OAAOA,cAAc,UAAU;QACjC,OAAOP,eAAe,CAACO,UAAU;IACnC,CAAC;IACD,OAAOA;AACT,EACA,uDAAuD"}
1
+ {"version":3,"sources":["../../lib/utils/resolvePositioningShorthand.js"],"sourcesContent":["// Look up table for shorthand to avoid parsing strings\nconst shorthandLookup = {\n above: {\n position: 'above',\n align: 'center'\n },\n 'above-start': {\n position: 'above',\n align: 'start'\n },\n 'above-end': {\n position: 'above',\n align: 'end'\n },\n below: {\n position: 'below',\n align: 'center'\n },\n 'below-start': {\n position: 'below',\n align: 'start'\n },\n 'below-end': {\n position: 'below',\n align: 'end'\n },\n before: {\n position: 'before',\n align: 'center'\n },\n 'before-top': {\n position: 'before',\n align: 'top'\n },\n 'before-bottom': {\n position: 'before',\n align: 'bottom'\n },\n after: {\n position: 'after',\n align: 'center'\n },\n 'after-top': {\n position: 'after',\n align: 'top'\n },\n 'after-bottom': {\n position: 'after',\n align: 'bottom'\n }\n};\nexport function resolvePositioningShorthand(shorthand) {\n if (shorthand === undefined || shorthand === null) {\n return {};\n }\n if (typeof shorthand === 'string') {\n return shorthandLookup[shorthand];\n }\n return shorthand;\n}\n//# sourceMappingURL=resolvePositioningShorthand.js.map"],"names":["resolvePositioningShorthand","shorthandLookup","above","position","align","below","before","after","shorthand","undefined"],"mappings":"AAAA,uDAAuD;;;;;+BAmDvCA;;aAAAA;;AAlDhB,MAAMC,kBAAkB;IACtBC,OAAO;QACLC,UAAU;QACVC,OAAO;IACT;IACA,eAAe;QACbD,UAAU;QACVC,OAAO;IACT;IACA,aAAa;QACXD,UAAU;QACVC,OAAO;IACT;IACAC,OAAO;QACLF,UAAU;QACVC,OAAO;IACT;IACA,eAAe;QACbD,UAAU;QACVC,OAAO;IACT;IACA,aAAa;QACXD,UAAU;QACVC,OAAO;IACT;IACAE,QAAQ;QACNH,UAAU;QACVC,OAAO;IACT;IACA,cAAc;QACZD,UAAU;QACVC,OAAO;IACT;IACA,iBAAiB;QACfD,UAAU;QACVC,OAAO;IACT;IACAG,OAAO;QACLJ,UAAU;QACVC,OAAO;IACT;IACA,aAAa;QACXD,UAAU;QACVC,OAAO;IACT;IACA,gBAAgB;QACdD,UAAU;QACVC,OAAO;IACT;AACF;AACO,SAASJ,4BAA4BQ,SAAS,EAAE;IACrD,IAAIA,cAAcC,aAAaD,cAAc,IAAI,EAAE;QACjD,OAAO,CAAC;IACV,CAAC;IACD,IAAI,OAAOA,cAAc,UAAU;QACjC,OAAOP,eAAe,CAACO,UAAU;IACnC,CAAC;IACD,OAAOA;AACT,EACA,uDAAuD"}
@@ -7,13 +7,13 @@ Object.defineProperty(exports, "toFloatingUIPadding", {
7
7
  get: ()=>toFloatingUIPadding
8
8
  });
9
9
  function toFloatingUIPadding(padding, isRtl) {
10
- if (typeof padding === "number") {
10
+ if (typeof padding === 'number') {
11
11
  return padding;
12
12
  }
13
13
  const { start , end , ...verticalPadding } = padding;
14
14
  const paddingObject = verticalPadding;
15
- const left = isRtl ? "end" : "start";
16
- const right = isRtl ? "start" : "end";
15
+ const left = isRtl ? 'end' : 'start';
16
+ const right = isRtl ? 'start' : 'end';
17
17
  // assign properties explicitly since undefined values are actually handled by floating UI
18
18
  // TODO create floating UI issue
19
19
  if (padding[left]) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/toFloatingUIPadding.js"],"sourcesContent":["export function toFloatingUIPadding(padding, isRtl) {\n if (typeof padding === \"number\") {\n return padding;\n }\n const {\n start,\n end,\n ...verticalPadding\n } = padding;\n const paddingObject = verticalPadding;\n const left = isRtl ? \"end\" : \"start\";\n const right = isRtl ? \"start\" : \"end\";\n // assign properties explicitly since undefined values are actually handled by floating UI\n // TODO create floating UI issue\n if (padding[left]) {\n paddingObject.left = padding[left];\n }\n if (padding[right]) {\n paddingObject.right = padding[right];\n }\n return paddingObject;\n}\n//# sourceMappingURL=toFloatingUIPadding.js.map"],"names":["toFloatingUIPadding","padding","isRtl","start","end","verticalPadding","paddingObject","left","right"],"mappings":";;;;+BAAgBA;;aAAAA;;AAAT,SAASA,oBAAoBC,OAAO,EAAEC,KAAK,EAAE;IAClD,IAAI,OAAOD,YAAY,UAAU;QAC/B,OAAOA;IACT,CAAC;IACD,MAAM,EACJE,MAAK,EACLC,IAAG,EACH,GAAGC,iBACJ,GAAGJ;IACJ,MAAMK,gBAAgBD;IACtB,MAAME,OAAOL,QAAQ,QAAQ,OAAO;IACpC,MAAMM,QAAQN,QAAQ,UAAU,KAAK;IACrC,0FAA0F;IAC1F,gCAAgC;IAChC,IAAID,OAAO,CAACM,KAAK,EAAE;QACjBD,cAAcC,IAAI,GAAGN,OAAO,CAACM,KAAK;IACpC,CAAC;IACD,IAAIN,OAAO,CAACO,MAAM,EAAE;QAClBF,cAAcE,KAAK,GAAGP,OAAO,CAACO,MAAM;IACtC,CAAC;IACD,OAAOF;AACT,EACA,+CAA+C"}
1
+ {"version":3,"sources":["../../lib/utils/toFloatingUIPadding.js"],"sourcesContent":["export function toFloatingUIPadding(padding, isRtl) {\n if (typeof padding === 'number') {\n return padding;\n }\n const {\n start,\n end,\n ...verticalPadding\n } = padding;\n const paddingObject = verticalPadding;\n const left = isRtl ? 'end' : 'start';\n const right = isRtl ? 'start' : 'end';\n // assign properties explicitly since undefined values are actually handled by floating UI\n // TODO create floating UI issue\n if (padding[left]) {\n paddingObject.left = padding[left];\n }\n if (padding[right]) {\n paddingObject.right = padding[right];\n }\n return paddingObject;\n}\n//# sourceMappingURL=toFloatingUIPadding.js.map"],"names":["toFloatingUIPadding","padding","isRtl","start","end","verticalPadding","paddingObject","left","right"],"mappings":";;;;+BAAgBA;;aAAAA;;AAAT,SAASA,oBAAoBC,OAAO,EAAEC,KAAK,EAAE;IAClD,IAAI,OAAOD,YAAY,UAAU;QAC/B,OAAOA;IACT,CAAC;IACD,MAAM,EACJE,MAAK,EACLC,IAAG,EACH,GAAGC,iBACJ,GAAGJ;IACJ,MAAMK,gBAAgBD;IACtB,MAAME,OAAOL,QAAQ,QAAQ,OAAO;IACpC,MAAMM,QAAQN,QAAQ,UAAU,KAAK;IACrC,0FAA0F;IAC1F,gCAAgC;IAChC,IAAID,OAAO,CAACM,KAAK,EAAE;QACjBD,cAAcC,IAAI,GAAGN,OAAO,CAACM,KAAK;IACpC,CAAC;IACD,IAAIN,OAAO,CAACO,MAAM,EAAE;QAClBF,cAAcE,KAAK,GAAGP,OAAO,CAACO,MAAM;IACtC,CAAC;IACD,OAAOF;AACT,EACA,+CAA+C"}
@@ -7,27 +7,27 @@ Object.defineProperty(exports, "toFloatingUIPlacement", {
7
7
  get: ()=>toFloatingUIPlacement
8
8
  });
9
9
  const getPositionMap = (rtl)=>({
10
- above: "top",
11
- below: "bottom",
12
- before: rtl ? "right" : "left",
13
- after: rtl ? "left" : "right"
10
+ above: 'top',
11
+ below: 'bottom',
12
+ before: rtl ? 'right' : 'left',
13
+ after: rtl ? 'left' : 'right'
14
14
  });
15
15
  // Floating UI automatically flips alignment
16
16
  // https://github.com/floating-ui/floating-ui/issues/1563
17
17
  const getAlignmentMap = ()=>({
18
- start: "start",
19
- end: "end",
20
- top: "start",
21
- bottom: "end",
18
+ start: 'start',
19
+ end: 'end',
20
+ top: 'start',
21
+ bottom: 'end',
22
22
  center: undefined
23
23
  });
24
24
  const shouldAlignToCenter = (p, a)=>{
25
- const positionedVertically = p === "above" || p === "below";
26
- const alignedVertically = a === "top" || a === "bottom";
25
+ const positionedVertically = p === 'above' || p === 'below';
26
+ const alignedVertically = a === 'top' || a === 'bottom';
27
27
  return positionedVertically && alignedVertically || !positionedVertically && !alignedVertically;
28
28
  };
29
29
  const toFloatingUIPlacement = (align, position, rtl)=>{
30
- const alignment = shouldAlignToCenter(position, align) ? "center" : align;
30
+ const alignment = shouldAlignToCenter(position, align) ? 'center' : align;
31
31
  const computedPosition = position && getPositionMap(rtl)[position];
32
32
  const computedAlignment = alignment && getAlignmentMap()[alignment];
33
33
  if (computedPosition && computedAlignment) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/toFloatingUIPlacement.js"],"sourcesContent":["const getPositionMap = rtl => ({\n above: \"top\",\n below: \"bottom\",\n before: rtl ? \"right\" : \"left\",\n after: rtl ? \"left\" : \"right\"\n});\n// Floating UI automatically flips alignment\n// https://github.com/floating-ui/floating-ui/issues/1563\nconst getAlignmentMap = () => ({\n start: \"start\",\n end: \"end\",\n top: \"start\",\n bottom: \"end\",\n center: undefined\n});\nconst shouldAlignToCenter = (p, a) => {\n const positionedVertically = p === \"above\" || p === \"below\";\n const alignedVertically = a === \"top\" || a === \"bottom\";\n return positionedVertically && alignedVertically || !positionedVertically && !alignedVertically;\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, position, rtl) => {\n const alignment = shouldAlignToCenter(position, align) ? \"center\" : align;\n const computedPosition = position && getPositionMap(rtl)[position];\n const computedAlignment = alignment && getAlignmentMap()[alignment];\n if (computedPosition && computedAlignment) {\n return `${computedPosition}-${computedAlignment}`;\n }\n return computedPosition;\n};\n//# sourceMappingURL=toFloatingUIPlacement.js.map"],"names":["toFloatingUIPlacement","getPositionMap","rtl","above","below","before","after","getAlignmentMap","start","end","top","bottom","center","undefined","shouldAlignToCenter","p","a","positionedVertically","alignedVertically","align","position","alignment","computedPosition","computedAlignment"],"mappings":";;;;+BAwBaA;;aAAAA;;AAxBb,MAAMC,iBAAiBC,CAAAA,MAAQ,CAAA;QAC7BC,OAAO;QACPC,OAAO;QACPC,QAAQH,MAAM,UAAU,MAAM;QAC9BI,OAAOJ,MAAM,SAAS,OAAO;IAC/B,CAAA;AACA,4CAA4C;AAC5C,yDAAyD;AACzD,MAAMK,kBAAkB,IAAO,CAAA;QAC7BC,OAAO;QACPC,KAAK;QACLC,KAAK;QACLC,QAAQ;QACRC,QAAQC;IACV,CAAA;AACA,MAAMC,sBAAsB,CAACC,GAAGC,IAAM;IACpC,MAAMC,uBAAuBF,MAAM,WAAWA,MAAM;IACpD,MAAMG,oBAAoBF,MAAM,SAASA,MAAM;IAC/C,OAAOC,wBAAwBC,qBAAqB,CAACD,wBAAwB,CAACC;AAChF;AAKO,MAAMlB,wBAAwB,CAACmB,OAAOC,UAAUlB,MAAQ;IAC7D,MAAMmB,YAAYP,oBAAoBM,UAAUD,SAAS,WAAWA,KAAK;IACzE,MAAMG,mBAAmBF,YAAYnB,eAAeC,IAAI,CAACkB,SAAS;IAClE,MAAMG,oBAAoBF,aAAad,iBAAiB,CAACc,UAAU;IACnE,IAAIC,oBAAoBC,mBAAmB;QACzC,OAAO,CAAC,EAAED,iBAAiB,CAAC,EAAEC,kBAAkB,CAAC;IACnD,CAAC;IACD,OAAOD;AACT,GACA,iDAAiD"}
1
+ {"version":3,"sources":["../../lib/utils/toFloatingUIPlacement.js"],"sourcesContent":["const getPositionMap = rtl => ({\n above: 'top',\n below: 'bottom',\n before: rtl ? 'right' : 'left',\n after: rtl ? 'left' : 'right'\n});\n// Floating UI automatically flips alignment\n// https://github.com/floating-ui/floating-ui/issues/1563\nconst getAlignmentMap = () => ({\n start: 'start',\n end: 'end',\n top: 'start',\n bottom: 'end',\n center: undefined\n});\nconst shouldAlignToCenter = (p, a) => {\n const positionedVertically = p === 'above' || p === 'below';\n const alignedVertically = a === 'top' || a === 'bottom';\n return positionedVertically && alignedVertically || !positionedVertically && !alignedVertically;\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, position, rtl) => {\n const alignment = shouldAlignToCenter(position, align) ? 'center' : align;\n const computedPosition = position && getPositionMap(rtl)[position];\n const computedAlignment = alignment && getAlignmentMap()[alignment];\n if (computedPosition && computedAlignment) {\n return `${computedPosition}-${computedAlignment}`;\n }\n return computedPosition;\n};\n//# sourceMappingURL=toFloatingUIPlacement.js.map"],"names":["toFloatingUIPlacement","getPositionMap","rtl","above","below","before","after","getAlignmentMap","start","end","top","bottom","center","undefined","shouldAlignToCenter","p","a","positionedVertically","alignedVertically","align","position","alignment","computedPosition","computedAlignment"],"mappings":";;;;+BAwBaA;;aAAAA;;AAxBb,MAAMC,iBAAiBC,CAAAA,MAAQ,CAAA;QAC7BC,OAAO;QACPC,OAAO;QACPC,QAAQH,MAAM,UAAU,MAAM;QAC9BI,OAAOJ,MAAM,SAAS,OAAO;IAC/B,CAAA;AACA,4CAA4C;AAC5C,yDAAyD;AACzD,MAAMK,kBAAkB,IAAO,CAAA;QAC7BC,OAAO;QACPC,KAAK;QACLC,KAAK;QACLC,QAAQ;QACRC,QAAQC;IACV,CAAA;AACA,MAAMC,sBAAsB,CAACC,GAAGC,IAAM;IACpC,MAAMC,uBAAuBF,MAAM,WAAWA,MAAM;IACpD,MAAMG,oBAAoBF,MAAM,SAASA,MAAM;IAC/C,OAAOC,wBAAwBC,qBAAqB,CAACD,wBAAwB,CAACC;AAChF;AAKO,MAAMlB,wBAAwB,CAACmB,OAAOC,UAAUlB,MAAQ;IAC7D,MAAMmB,YAAYP,oBAAoBM,UAAUD,SAAS,WAAWA,KAAK;IACzE,MAAMG,mBAAmBF,YAAYnB,eAAeC,IAAI,CAACkB,SAAS;IAClE,MAAMG,oBAAoBF,aAAad,iBAAiB,CAACc,UAAU;IACnE,IAAIC,oBAAoBC,mBAAmB;QACzC,OAAO,CAAC,EAAED,iBAAiB,CAAC,EAAEC,kBAAkB,CAAC;IACnD,CAAC;IACD,OAAOD;AACT,GACA,iDAAiD"}
@@ -14,11 +14,11 @@ function toggleScrollListener(next, prev, handler) {
14
14
  }
15
15
  if ((0, _reactUtilities.isHTMLElement)(prev)) {
16
16
  const prevScrollParent = (0, _getScrollParent.getScrollParent)(prev);
17
- prevScrollParent.removeEventListener("scroll", handler);
17
+ prevScrollParent.removeEventListener('scroll', handler);
18
18
  }
19
19
  if ((0, _reactUtilities.isHTMLElement)(next)) {
20
20
  const scrollParent = (0, _getScrollParent.getScrollParent)(next);
21
- scrollParent.addEventListener("scroll", handler);
21
+ scrollParent.addEventListener('scroll', handler);
22
22
  }
23
23
  } //# sourceMappingURL=toggleScrollListener.js.map
24
24
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/toggleScrollListener.js"],"sourcesContent":["import { isHTMLElement } from \"@fluentui/react-utilities\";\nimport { getScrollParent } from \"./getScrollParent\";\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(next, prev, handler) {\n if (next === prev) {\n return;\n }\n if (isHTMLElement(prev)) {\n const prevScrollParent = getScrollParent(prev);\n prevScrollParent.removeEventListener(\"scroll\", handler);\n }\n if (isHTMLElement(next)) {\n const scrollParent = getScrollParent(next);\n scrollParent.addEventListener(\"scroll\", handler);\n }\n}\n//# sourceMappingURL=toggleScrollListener.js.map"],"names":["toggleScrollListener","next","prev","handler","isHTMLElement","prevScrollParent","getScrollParent","removeEventListener","scrollParent","addEventListener"],"mappings":";;;;+BAQgBA;;aAAAA;;gCARc;iCACE;AAOzB,SAASA,qBAAqBC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAE;IACxD,IAAIF,SAASC,MAAM;QACjB;IACF,CAAC;IACD,IAAIE,IAAAA,6BAAa,EAACF,OAAO;QACvB,MAAMG,mBAAmBC,IAAAA,gCAAe,EAACJ;QACzCG,iBAAiBE,mBAAmB,CAAC,UAAUJ;IACjD,CAAC;IACD,IAAIC,IAAAA,6BAAa,EAACH,OAAO;QACvB,MAAMO,eAAeF,IAAAA,gCAAe,EAACL;QACrCO,aAAaC,gBAAgB,CAAC,UAAUN;IAC1C,CAAC;AACH,EACA,gDAAgD"}
1
+ {"version":3,"sources":["../../lib/utils/toggleScrollListener.js"],"sourcesContent":["import { isHTMLElement } from '@fluentui/react-utilities';\nimport { getScrollParent } from './getScrollParent';\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(next, prev, handler) {\n if (next === prev) {\n return;\n }\n if (isHTMLElement(prev)) {\n const prevScrollParent = getScrollParent(prev);\n prevScrollParent.removeEventListener('scroll', handler);\n }\n if (isHTMLElement(next)) {\n const scrollParent = getScrollParent(next);\n scrollParent.addEventListener('scroll', handler);\n }\n}\n//# sourceMappingURL=toggleScrollListener.js.map"],"names":["toggleScrollListener","next","prev","handler","isHTMLElement","prevScrollParent","getScrollParent","removeEventListener","scrollParent","addEventListener"],"mappings":";;;;+BAQgBA;;aAAAA;;gCARc;iCACE;AAOzB,SAASA,qBAAqBC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAE;IACxD,IAAIF,SAASC,MAAM;QACjB;IACF,CAAC;IACD,IAAIE,IAAAA,6BAAa,EAACF,OAAO;QACvB,MAAMG,mBAAmBC,IAAAA,gCAAe,EAACJ;QACzCG,iBAAiBE,mBAAmB,CAAC,UAAUJ;IACjD,CAAC;IACD,IAAIC,IAAAA,6BAAa,EAACH,OAAO;QACvB,MAAMO,eAAeF,IAAAA,gCAAe,EAACL;QACrCO,aAAaC,gBAAgB,CAAC,UAAUN;IAC1C,CAAC;AACH,EACA,gDAAgD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/useCallbackRef.js"],"sourcesContent":["import * as React from \"react\";\nimport { useIsomorphicLayoutEffect } from \"@fluentui/react-utilities\";\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(initialValue, callback, skipInitialResolve) {\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 if (last !== value) {\n ref.value = value;\n if (skipInitialResolve && isFirst.current) {\n return;\n }\n ref.callback(value, last);\n }\n }\n }\n }));\n useIsomorphicLayoutEffect(() => {\n isFirst.current = false;\n }, []);\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n//# sourceMappingURL=useCallbackRef.js.map"],"names":["useCallbackRef","initialValue","callback","skipInitialResolve","isFirst","React","useRef","ref","useState","value","facade","current","last","useIsomorphicLayoutEffect"],"mappings":";;;;+BAmBgBA;;aAAAA;;;6DAnBO;gCACmB;AAkBnC,SAASA,eAAeC,YAAY,EAAEC,QAAQ,EAAEC,kBAAkB,EAAE;IACzE,MAAMC,UAAUC,OAAMC,MAAM,CAAC,IAAI;IACjC,MAAM,CAACC,IAAI,GAAGF,OAAMG,QAAQ,CAAC,IAAO,CAAA;YAClC,QAAQ;YACRC,OAAOR;YACP,gBAAgB;YAChBC;YACA,8BAA8B;YAC9BQ,QAAQ;gBACN,IAAIC,WAAU;oBACZ,OAAOJ,IAAIE,KAAK;gBAClB;gBACA,IAAIE,SAAQF,MAAO;oBACjB,MAAMG,OAAOL,IAAIE,KAAK;oBACtB,IAAIG,SAASH,OAAO;wBAClBF,IAAIE,KAAK,GAAGA;wBACZ,IAAIN,sBAAsBC,QAAQO,OAAO,EAAE;4BACzC;wBACF,CAAC;wBACDJ,IAAIL,QAAQ,CAACO,OAAOG;oBACtB,CAAC;gBACH;YACF;QACF,CAAA;IACAC,IAAAA,yCAAyB,EAAC,IAAM;QAC9BT,QAAQO,OAAO,GAAG,KAAK;IACzB,GAAG,EAAE;IACL,kBAAkB;IAClBJ,IAAIL,QAAQ,GAAGA;IACf,OAAOK,IAAIG,MAAM;AACnB,EACA,0CAA0C"}
1
+ {"version":3,"sources":["../../lib/utils/useCallbackRef.js"],"sourcesContent":["import * as React from 'react';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\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(initialValue, callback, skipInitialResolve) {\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 if (last !== value) {\n ref.value = value;\n if (skipInitialResolve && isFirst.current) {\n return;\n }\n ref.callback(value, last);\n }\n }\n }\n }));\n useIsomorphicLayoutEffect(() => {\n isFirst.current = false;\n }, []);\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n//# sourceMappingURL=useCallbackRef.js.map"],"names":["useCallbackRef","initialValue","callback","skipInitialResolve","isFirst","React","useRef","ref","useState","value","facade","current","last","useIsomorphicLayoutEffect"],"mappings":";;;;+BAmBgBA;;aAAAA;;;6DAnBO;gCACmB;AAkBnC,SAASA,eAAeC,YAAY,EAAEC,QAAQ,EAAEC,kBAAkB,EAAE;IACzE,MAAMC,UAAUC,OAAMC,MAAM,CAAC,IAAI;IACjC,MAAM,CAACC,IAAI,GAAGF,OAAMG,QAAQ,CAAC,IAAO,CAAA;YAClC,QAAQ;YACRC,OAAOR;YACP,gBAAgB;YAChBC;YACA,8BAA8B;YAC9BQ,QAAQ;gBACN,IAAIC,WAAU;oBACZ,OAAOJ,IAAIE,KAAK;gBAClB;gBACA,IAAIE,SAAQF,MAAO;oBACjB,MAAMG,OAAOL,IAAIE,KAAK;oBACtB,IAAIG,SAASH,OAAO;wBAClBF,IAAIE,KAAK,GAAGA;wBACZ,IAAIN,sBAAsBC,QAAQO,OAAO,EAAE;4BACzC;wBACF,CAAC;wBACDJ,IAAIL,QAAQ,CAACO,OAAOG;oBACtB,CAAC;gBACH;YACF;QACF,CAAA;IACAC,IAAAA,yCAAyB,EAAC,IAAM;QAC9BT,QAAQO,OAAO,GAAG,KAAK;IACzB,GAAG,EAAE;IACL,kBAAkB;IAClBJ,IAAIL,QAAQ,GAAGA;IACf,OAAOK,IAAIG,MAAM;AACnB,EACA,0CAA0C"}
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "writeContainerUpdates", {
8
8
  });
9
9
  const _constants = require("../constants");
10
10
  function writeContainerUpdates(options) {
11
+ var _middlewareData_hide, _middlewareData_hide1, _container_ownerDocument_defaultView;
11
12
  const { container , placement , middlewareData , strategy , lowPPI , coordinates } = options;
12
13
  if (!container) {
13
14
  return;
@@ -15,21 +16,21 @@ function writeContainerUpdates(options) {
15
16
  container.setAttribute(_constants.DATA_POSITIONING_PLACEMENT, placement);
16
17
  container.removeAttribute(_constants.DATA_POSITIONING_INTERSECTING);
17
18
  if (middlewareData.intersectionObserver.intersecting) {
18
- container.setAttribute(_constants.DATA_POSITIONING_INTERSECTING, "");
19
+ container.setAttribute(_constants.DATA_POSITIONING_INTERSECTING, '');
19
20
  }
20
21
  container.removeAttribute(_constants.DATA_POSITIONING_ESCAPED);
21
- if (middlewareData.hide?.escaped) {
22
- container.setAttribute(_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, '');
23
24
  }
24
25
  container.removeAttribute(_constants.DATA_POSITIONING_HIDDEN);
25
- if (middlewareData.hide?.referenceHidden) {
26
- container.setAttribute(_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, '');
27
28
  }
28
29
  // Round so that the coordinates land on device pixels.
29
30
  // This prevents blurriness in cases where the browser doesn't apply pixel snapping, such as when other effects like
30
31
  // `backdrop-filter: blur()` are applied to the container, and the browser is zoomed in.
31
32
  // See https://github.com/microsoft/fluentui/issues/26764 for more info.
32
- const devicePixelRatio = container.ownerDocument.defaultView?.devicePixelRatio || 1;
33
+ const devicePixelRatio = ((_container_ownerDocument_defaultView = container.ownerDocument.defaultView) === null || _container_ownerDocument_defaultView === void 0 ? void 0 : _container_ownerDocument_defaultView.devicePixelRatio) || 1;
33
34
  const x = Math.round(coordinates.x * devicePixelRatio) / devicePixelRatio;
34
35
  const y = Math.round(coordinates.y * devicePixelRatio) / devicePixelRatio;
35
36
  Object.assign(container.style, {
@@ -1 +1 @@
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 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?.escaped) {\n container.setAttribute(DATA_POSITIONING_ESCAPED, \"\");\n }\n container.removeAttribute(DATA_POSITIONING_HIDDEN);\n if (middlewareData.hide?.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?.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","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,MAAM,EACJC,UAAS,EACTC,UAAS,EACTC,eAAc,EACdC,SAAQ,EACRC,OAAM,EACNC,YAAW,EACZ,GAAGN;IACJ,IAAI,CAACC,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,IAAIV,eAAeW,IAAI,EAAEC,SAAS;QAChCd,UAAUM,YAAY,CAACM,mCAAwB,EAAE;IACnD,CAAC;IACDZ,UAAUQ,eAAe,CAACO,kCAAuB;IACjD,IAAIb,eAAeW,IAAI,EAAEG,iBAAiB;QACxChB,UAAUM,YAAY,CAACS,kCAAuB,EAAE;IAClD,CAAC;IACD,uDAAuD;IACvD,oHAAoH;IACpH,wFAAwF;IACxF,wEAAwE;IACxE,MAAME,mBAAmBjB,UAAUkB,aAAa,CAACC,WAAW,EAAEF,oBAAoB;IAClF,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"}
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-20230317-1454.1",
3
+ "version": "0.0.0-nightly-20230322-0439.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",
@@ -29,9 +29,9 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@floating-ui/dom": "^1.2.0",
32
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20230317-1454.1",
33
- "@fluentui/react-theme": "0.0.0-nightly-20230317-1454.1",
34
- "@fluentui/react-utilities": "0.0.0-nightly-20230317-1454.1",
32
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20230322-0439.1",
33
+ "@fluentui/react-theme": "0.0.0-nightly-20230322-0439.1",
34
+ "@fluentui/react-utilities": "0.0.0-nightly-20230322-0439.1",
35
35
  "@griffel/react": "^1.5.2",
36
36
  "@swc/helpers": "^0.4.14"
37
37
  },
@@ -45,6 +45,7 @@
45
45
  "exports": {
46
46
  ".": {
47
47
  "types": "./dist/index.d.ts",
48
+ "node": "./lib-commonjs/index.js",
48
49
  "import": "./lib/index.js",
49
50
  "require": "./lib-commonjs/index.js"
50
51
  },