@fluentui/react-portal 0.0.0-nightly-20230316-0427.1 → 0.0.0-nightly-20230317-1454.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 (59) hide show
  1. package/.swcrc +39 -0
  2. package/CHANGELOG.json +30 -9
  3. package/CHANGELOG.md +17 -7
  4. package/lib/Portal.js +1 -1
  5. package/lib/Portal.js.map +1 -1
  6. package/lib/components/Portal/Portal.js +4 -3
  7. package/lib/components/Portal/Portal.js.map +1 -1
  8. package/lib/components/Portal/Portal.types.js +1 -1
  9. package/lib/components/Portal/Portal.types.js.map +1 -1
  10. package/lib/components/Portal/index.js +4 -4
  11. package/lib/components/Portal/index.js.map +1 -1
  12. package/lib/components/Portal/renderPortal.js +2 -2
  13. package/lib/components/Portal/renderPortal.js.map +1 -1
  14. package/lib/components/Portal/usePortal.js +6 -6
  15. package/lib/components/Portal/usePortal.js.map +1 -1
  16. package/lib/components/Portal/usePortalMountNode.js +11 -11
  17. package/lib/components/Portal/usePortalMountNode.js.map +1 -1
  18. package/lib/index.js +2 -2
  19. package/lib/index.js.map +1 -1
  20. package/lib/virtualParent/elementContains.js +1 -1
  21. package/lib/virtualParent/elementContains.js.map +1 -1
  22. package/lib/virtualParent/getParent.js +2 -2
  23. package/lib/virtualParent/getParent.js.map +1 -1
  24. package/lib/virtualParent/index.js +2 -2
  25. package/lib/virtualParent/index.js.map +1 -1
  26. package/lib/virtualParent/isVirtualElement.js +1 -2
  27. package/lib/virtualParent/isVirtualElement.js.map +1 -1
  28. package/lib/virtualParent/setVirtualParent.js +1 -2
  29. package/lib/virtualParent/setVirtualParent.js.map +1 -1
  30. package/lib/virtualParent/types.js.map +1 -1
  31. package/lib-commonjs/Portal.js +5 -4
  32. package/lib-commonjs/Portal.js.map +1 -1
  33. package/lib-commonjs/components/Portal/Portal.js +14 -14
  34. package/lib-commonjs/components/Portal/Portal.js.map +1 -1
  35. package/lib-commonjs/components/Portal/Portal.types.js +5 -2
  36. package/lib-commonjs/components/Portal/Portal.types.js.map +1 -1
  37. package/lib-commonjs/components/Portal/index.js +8 -7
  38. package/lib-commonjs/components/Portal/index.js.map +1 -1
  39. package/lib-commonjs/components/Portal/renderPortal.js +15 -15
  40. package/lib-commonjs/components/Portal/renderPortal.js.map +1 -1
  41. package/lib-commonjs/components/Portal/usePortal.js +56 -55
  42. package/lib-commonjs/components/Portal/usePortal.js.map +1 -1
  43. package/lib-commonjs/components/Portal/usePortalMountNode.js +86 -68
  44. package/lib-commonjs/components/Portal/usePortalMountNode.js.map +1 -1
  45. package/lib-commonjs/index.js +17 -34
  46. package/lib-commonjs/index.js.map +1 -1
  47. package/lib-commonjs/virtualParent/elementContains.js +26 -30
  48. package/lib-commonjs/virtualParent/elementContains.js.map +1 -1
  49. package/lib-commonjs/virtualParent/getParent.js +19 -22
  50. package/lib-commonjs/virtualParent/getParent.js.map +1 -1
  51. package/lib-commonjs/virtualParent/index.js +6 -5
  52. package/lib-commonjs/virtualParent/index.js.map +1 -1
  53. package/lib-commonjs/virtualParent/isVirtualElement.js +11 -10
  54. package/lib-commonjs/virtualParent/isVirtualElement.js.map +1 -1
  55. package/lib-commonjs/virtualParent/setVirtualParent.js +18 -17
  56. package/lib-commonjs/virtualParent/setVirtualParent.js.map +1 -1
  57. package/lib-commonjs/virtualParent/types.js +3 -2
  58. package/lib-commonjs/virtualParent/types.js.map +1 -1
  59. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../../../../../../../../packages/react-components/react-portal/src/virtualParent/index.ts"],"sourcesContent":["export * from './elementContains';\nexport * from './setVirtualParent';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,uBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,wBAAAC,OAAA"}
1
+ {"version":3,"sources":["../../lib/virtualParent/index.js"],"sourcesContent":["export * from \"./elementContains\";\nexport * from \"./setVirtualParent\";\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;CACd,iCAAiC"}
@@ -1,14 +1,15 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isVirtualElement = void 0;
7
1
  /**
8
2
  * Determines whether or not an element has the virtual hierarchy extension.
9
- */
3
+ */ "use strict";
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ Object.defineProperty(exports, "isVirtualElement", {
8
+ enumerable: true,
9
+ get: ()=>isVirtualElement
10
+ });
10
11
  function isVirtualElement(element) {
11
- return element && !!element._virtual;
12
- }
13
- exports.isVirtualElement = isVirtualElement;
12
+ return element && !!element._virtual;
13
+ } //# sourceMappingURL=isVirtualElement.js.map
14
+
14
15
  //# sourceMappingURL=isVirtualElement.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["isVirtualElement","element","_virtual","exports"],"sources":["../../../../../../../../packages/react-components/react-portal/src/virtualParent/isVirtualElement.ts"],"sourcesContent":["import type { VirtualElement } from './types';\n\n/**\n * Determines whether or not an element has the virtual hierarchy extension.\n */\nexport function isVirtualElement(element: Node | VirtualElement): element is VirtualElement {\n return element && !!(<VirtualElement>element)._virtual;\n}\n"],"mappings":";;;;;;AAEA;;;AAGA,SAAgBA,gBAAgBA,CAACC,OAA8B;EAC7D,OAAOA,OAAO,IAAI,CAAC,CAAkBA,OAAQ,CAACC,QAAQ;AACxD;AAFAC,OAAA,CAAAH,gBAAA,GAAAA,gBAAA"}
1
+ {"version":3,"sources":["../../lib/virtualParent/isVirtualElement.js"],"sourcesContent":["/**\n * Determines whether or not an element has the virtual hierarchy extension.\n */export function isVirtualElement(element) {\n return element && !!element._virtual;\n}\n//# sourceMappingURL=isVirtualElement.js.map"],"names":["isVirtualElement","element","_virtual"],"mappings":"AAAA;;CAEC;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,iBAAiBC,OAAO,EAAE;IAC3C,OAAOA,WAAW,CAAC,CAACA,QAAQC,QAAQ;AACtC,EACA,4CAA4C"}
@@ -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-20230316-0427.1",
3
+ "version": "0.0.0-nightly-20230317-1454.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,12 +31,12 @@
31
31
  "@fluentui/scripts-tasks": "*"
32
32
  },
33
33
  "dependencies": {
34
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20230316-0427.1",
35
- "@fluentui/react-tabster": "0.0.0-nightly-20230316-0427.1",
36
- "@fluentui/react-utilities": "0.0.0-nightly-20230316-0427.1",
34
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20230317-1454.1",
35
+ "@fluentui/react-tabster": "0.0.0-nightly-20230317-1454.1",
36
+ "@fluentui/react-utilities": "0.0.0-nightly-20230317-1454.1",
37
37
  "@griffel/react": "^1.5.2",
38
- "tslib": "^2.1.0",
39
- "use-disposable": "^1.0.1"
38
+ "use-disposable": "^1.0.1",
39
+ "@swc/helpers": "^0.4.14"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@types/react": ">=16.8.0 <19.0.0",