@fluentui/react-portal 0.0.0-nightly-20230321-0440.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 (50) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +48 -9
  3. package/CHANGELOG.md +20 -7
  4. package/lib/Portal.js.map +1 -1
  5. package/lib/components/Portal/Portal.js +1 -0
  6. package/lib/components/Portal/Portal.js.map +1 -1
  7. package/lib/components/Portal/Portal.types.js +1 -1
  8. package/lib/components/Portal/Portal.types.js.map +1 -1
  9. package/lib/components/Portal/index.js.map +1 -1
  10. package/lib/components/Portal/renderPortal.js.map +1 -1
  11. package/lib/components/Portal/usePortal.js.map +1 -1
  12. package/lib/components/Portal/usePortalMountNode.js.map +1 -1
  13. package/lib/index.js.map +1 -1
  14. package/lib/virtualParent/elementContains.js.map +1 -1
  15. package/lib/virtualParent/getParent.js.map +1 -1
  16. package/lib/virtualParent/index.js.map +1 -1
  17. package/lib/virtualParent/isVirtualElement.js +1 -2
  18. package/lib/virtualParent/isVirtualElement.js.map +1 -1
  19. package/lib/virtualParent/setVirtualParent.js +1 -2
  20. package/lib/virtualParent/setVirtualParent.js.map +1 -1
  21. package/lib/virtualParent/types.js.map +1 -1
  22. package/lib-commonjs/Portal.js +5 -4
  23. package/lib-commonjs/Portal.js.map +1 -1
  24. package/lib-commonjs/components/Portal/Portal.js +14 -14
  25. package/lib-commonjs/components/Portal/Portal.js.map +1 -1
  26. package/lib-commonjs/components/Portal/Portal.types.js +5 -2
  27. package/lib-commonjs/components/Portal/Portal.types.js.map +1 -1
  28. package/lib-commonjs/components/Portal/index.js +8 -7
  29. package/lib-commonjs/components/Portal/index.js.map +1 -1
  30. package/lib-commonjs/components/Portal/renderPortal.js +15 -15
  31. package/lib-commonjs/components/Portal/renderPortal.js.map +1 -1
  32. package/lib-commonjs/components/Portal/usePortal.js +56 -55
  33. package/lib-commonjs/components/Portal/usePortal.js.map +1 -1
  34. package/lib-commonjs/components/Portal/usePortalMountNode.js +86 -68
  35. package/lib-commonjs/components/Portal/usePortalMountNode.js.map +1 -1
  36. package/lib-commonjs/index.js +17 -34
  37. package/lib-commonjs/index.js.map +1 -1
  38. package/lib-commonjs/virtualParent/elementContains.js +26 -30
  39. package/lib-commonjs/virtualParent/elementContains.js.map +1 -1
  40. package/lib-commonjs/virtualParent/getParent.js +19 -22
  41. package/lib-commonjs/virtualParent/getParent.js.map +1 -1
  42. package/lib-commonjs/virtualParent/index.js +6 -5
  43. package/lib-commonjs/virtualParent/index.js.map +1 -1
  44. package/lib-commonjs/virtualParent/isVirtualElement.js +11 -10
  45. package/lib-commonjs/virtualParent/isVirtualElement.js.map +1 -1
  46. package/lib-commonjs/virtualParent/setVirtualParent.js +18 -17
  47. package/lib-commonjs/virtualParent/setVirtualParent.js.map +1 -1
  48. package/lib-commonjs/virtualParent/types.js +3 -2
  49. package/lib-commonjs/virtualParent/types.js.map +1 -1
  50. package/package.json +6 -6
@@ -1,24 +1,25 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.setVirtualParent = void 0;
7
1
  /**
8
2
  * Sets the virtual parent of an element.
9
3
  *
10
4
  * @param child - Theme element to set the virtual parent
11
5
  * @param parent - The virtual parent, use `undefined` to remove a virtual parent relationship
12
- */
6
+ */ "use strict";
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ Object.defineProperty(exports, "setVirtualParent", {
11
+ enumerable: true,
12
+ get: ()=>setVirtualParent
13
+ });
13
14
  function setVirtualParent(child, parent) {
14
- if (!child) {
15
- return;
16
- }
17
- const virtualChild = child;
18
- if (!virtualChild._virtual) {
19
- virtualChild._virtual = {};
20
- }
21
- virtualChild._virtual.parent = parent;
22
- }
23
- exports.setVirtualParent = setVirtualParent;
15
+ if (!child) {
16
+ return;
17
+ }
18
+ const virtualChild = child;
19
+ if (!virtualChild._virtual) {
20
+ virtualChild._virtual = {};
21
+ }
22
+ virtualChild._virtual.parent = parent;
23
+ } //# sourceMappingURL=setVirtualParent.js.map
24
+
24
25
  //# sourceMappingURL=setVirtualParent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["setVirtualParent","child","parent","virtualChild","_virtual","exports"],"sources":["../../../../../../../../packages/react-components/react-portal/src/virtualParent/setVirtualParent.ts"],"sourcesContent":["import type { VirtualElement } from './types';\n\n/**\n * Sets the virtual parent of an element.\n *\n * @param child - Theme element to set the virtual parent\n * @param parent - The virtual parent, use `undefined` to remove a virtual parent relationship\n */\nexport function setVirtualParent(child: Node, parent?: Node): void {\n if (!child) {\n return;\n }\n\n const virtualChild = child as VirtualElement;\n\n if (!virtualChild._virtual) {\n virtualChild._virtual = {};\n }\n\n virtualChild._virtual.parent = parent;\n}\n"],"mappings":";;;;;;AAEA;;;;;;AAMA,SAAgBA,gBAAgBA,CAACC,KAAW,EAAEC,MAAa;EACzD,IAAI,CAACD,KAAK,EAAE;IACV;;EAGF,MAAME,YAAY,GAAGF,KAAuB;EAE5C,IAAI,CAACE,YAAY,CAACC,QAAQ,EAAE;IAC1BD,YAAY,CAACC,QAAQ,GAAG,EAAE;;EAG5BD,YAAY,CAACC,QAAQ,CAACF,MAAM,GAAGA,MAAM;AACvC;AAZAG,OAAA,CAAAL,gBAAA,GAAAA,gBAAA"}
1
+ {"version":3,"sources":["../../lib/virtualParent/setVirtualParent.js"],"sourcesContent":["/**\n * Sets the virtual parent of an element.\n *\n * @param child - Theme element to set the virtual parent\n * @param parent - The virtual parent, use `undefined` to remove a virtual parent relationship\n */export function setVirtualParent(child, parent) {\n if (!child) {\n return;\n }\n const virtualChild = child;\n if (!virtualChild._virtual) {\n virtualChild._virtual = {};\n }\n virtualChild._virtual.parent = parent;\n}\n//# sourceMappingURL=setVirtualParent.js.map"],"names":["setVirtualParent","child","parent","virtualChild","_virtual"],"mappings":"AAAA;;;;;CAKC;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,iBAAiBC,KAAK,EAAEC,MAAM,EAAE;IACjD,IAAI,CAACD,OAAO;QACV;IACF,CAAC;IACD,MAAME,eAAeF;IACrB,IAAI,CAACE,aAAaC,QAAQ,EAAE;QAC1BD,aAAaC,QAAQ,GAAG,CAAC;IAC3B,CAAC;IACDD,aAAaC,QAAQ,CAACF,MAAM,GAAGA;AACjC,EACA,4CAA4C"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
5
+ //# sourceMappingURL=types.js.map
6
+
6
7
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../../../../../../packages/react-components/react-portal/src/virtualParent/types.ts"],"sourcesContent":["export interface VirtualElement extends Node {\n _virtual: {\n parent?: Node;\n };\n}\n"],"mappings":""}
1
+ {"version":3,"sources":["../../lib/virtualParent/types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=types.js.map"],"names":[],"mappings":";;;;CACA,iCAAiC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-portal",
3
- "version": "0.0.0-nightly-20230321-0440.1",
3
+ "version": "0.0.0-nightly-20230322-0439.1",
4
4
  "description": "A utility component that creates portals compatible with Fluent UI",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -22,7 +22,7 @@
22
22
  "test": "jest --passWithNoTests",
23
23
  "storybook": "start-storybook",
24
24
  "type-check": "tsc -b tsconfig.json",
25
- "generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
25
+ "generate-api": "just-scripts generate-api"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@fluentui/eslint-plugin": "*",
@@ -31,11 +31,11 @@
31
31
  "@fluentui/scripts-tasks": "*"
32
32
  },
33
33
  "dependencies": {
34
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20230321-0440.1",
35
- "@fluentui/react-tabster": "0.0.0-nightly-20230321-0440.1",
36
- "@fluentui/react-utilities": "0.0.0-nightly-20230321-0440.1",
34
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20230322-0439.1",
35
+ "@fluentui/react-tabster": "0.0.0-nightly-20230322-0439.1",
36
+ "@fluentui/react-utilities": "0.0.0-nightly-20230322-0439.1",
37
37
  "@griffel/react": "^1.5.2",
38
- "tslib": "^2.1.0",
38
+ "@swc/helpers": "^0.4.14",
39
39
  "use-disposable": "^1.0.1"
40
40
  },
41
41
  "peerDependencies": {