@fluentui/react-portal 0.0.0-nightly-20230317-1454.1 → 0.0.0-nightly-20230321-0440.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/CHANGELOG.json +9 -9
  2. package/CHANGELOG.md +7 -7
  3. package/lib/Portal.js +1 -1
  4. package/lib/Portal.js.map +1 -1
  5. package/lib/components/Portal/Portal.js +3 -4
  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 +4 -4
  10. package/lib/components/Portal/index.js.map +1 -1
  11. package/lib/components/Portal/renderPortal.js +2 -2
  12. package/lib/components/Portal/renderPortal.js.map +1 -1
  13. package/lib/components/Portal/usePortal.js +6 -6
  14. package/lib/components/Portal/usePortal.js.map +1 -1
  15. package/lib/components/Portal/usePortalMountNode.js +11 -11
  16. package/lib/components/Portal/usePortalMountNode.js.map +1 -1
  17. package/lib/index.js +2 -2
  18. package/lib/index.js.map +1 -1
  19. package/lib/virtualParent/elementContains.js +1 -1
  20. package/lib/virtualParent/elementContains.js.map +1 -1
  21. package/lib/virtualParent/getParent.js +2 -2
  22. package/lib/virtualParent/getParent.js.map +1 -1
  23. package/lib/virtualParent/index.js +2 -2
  24. package/lib/virtualParent/index.js.map +1 -1
  25. package/lib/virtualParent/isVirtualElement.js +2 -1
  26. package/lib/virtualParent/isVirtualElement.js.map +1 -1
  27. package/lib/virtualParent/setVirtualParent.js +2 -1
  28. package/lib/virtualParent/setVirtualParent.js.map +1 -1
  29. package/lib/virtualParent/types.js.map +1 -1
  30. package/lib-commonjs/Portal.js +4 -5
  31. package/lib-commonjs/Portal.js.map +1 -1
  32. package/lib-commonjs/components/Portal/Portal.js +14 -14
  33. package/lib-commonjs/components/Portal/Portal.js.map +1 -1
  34. package/lib-commonjs/components/Portal/Portal.types.js +2 -5
  35. package/lib-commonjs/components/Portal/Portal.types.js.map +1 -1
  36. package/lib-commonjs/components/Portal/index.js +7 -8
  37. package/lib-commonjs/components/Portal/index.js.map +1 -1
  38. package/lib-commonjs/components/Portal/renderPortal.js +15 -15
  39. package/lib-commonjs/components/Portal/renderPortal.js.map +1 -1
  40. package/lib-commonjs/components/Portal/usePortal.js +55 -56
  41. package/lib-commonjs/components/Portal/usePortal.js.map +1 -1
  42. package/lib-commonjs/components/Portal/usePortalMountNode.js +68 -86
  43. package/lib-commonjs/components/Portal/usePortalMountNode.js.map +1 -1
  44. package/lib-commonjs/index.js +34 -17
  45. package/lib-commonjs/index.js.map +1 -1
  46. package/lib-commonjs/virtualParent/elementContains.js +30 -26
  47. package/lib-commonjs/virtualParent/elementContains.js.map +1 -1
  48. package/lib-commonjs/virtualParent/getParent.js +22 -19
  49. package/lib-commonjs/virtualParent/getParent.js.map +1 -1
  50. package/lib-commonjs/virtualParent/index.js +5 -6
  51. package/lib-commonjs/virtualParent/index.js.map +1 -1
  52. package/lib-commonjs/virtualParent/isVirtualElement.js +10 -11
  53. package/lib-commonjs/virtualParent/isVirtualElement.js.map +1 -1
  54. package/lib-commonjs/virtualParent/setVirtualParent.js +17 -18
  55. package/lib-commonjs/virtualParent/setVirtualParent.js.map +1 -1
  56. package/lib-commonjs/virtualParent/types.js +2 -3
  57. package/lib-commonjs/virtualParent/types.js.map +1 -1
  58. package/package.json +8 -7
  59. package/.swcrc +0 -39
@@ -1,25 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.setVirtualParent = void 0;
1
7
  /**
2
8
  * Sets the virtual parent of an element.
3
9
  *
4
10
  * @param child - Theme element to set the virtual parent
5
11
  * @param parent - The virtual parent, use `undefined` to remove a virtual parent relationship
6
- */ "use strict";
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- Object.defineProperty(exports, "setVirtualParent", {
11
- enumerable: true,
12
- get: ()=>setVirtualParent
13
- });
12
+ */
14
13
  function setVirtualParent(child, parent) {
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
-
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;
25
24
  //# sourceMappingURL=setVirtualParent.js.map
@@ -1 +1 @@
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
+ {"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,7 +1,6 @@
1
1
  "use strict";
2
+
2
3
  Object.defineProperty(exports, "__esModule", {
3
- value: true
4
+ value: true
4
5
  });
5
- //# sourceMappingURL=types.js.map
6
-
7
6
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/virtualParent/types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=types.js.map"],"names":[],"mappings":";;;;CACA,iCAAiC"}
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":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-portal",
3
- "version": "0.0.0-nightly-20230317-1454.1",
3
+ "version": "0.0.0-nightly-20230321-0440.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": "just-scripts generate-api"
25
+ "generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
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-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",
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",
37
37
  "@griffel/react": "^1.5.2",
38
- "use-disposable": "^1.0.1",
39
- "@swc/helpers": "^0.4.14"
38
+ "tslib": "^2.1.0",
39
+ "use-disposable": "^1.0.1"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@types/react": ">=16.8.0 <19.0.0",
@@ -48,6 +48,7 @@
48
48
  "exports": {
49
49
  ".": {
50
50
  "types": "./dist/index.d.ts",
51
+ "node": "./lib-commonjs/index.js",
51
52
  "import": "./lib/index.js",
52
53
  "require": "./lib-commonjs/index.js"
53
54
  },
package/.swcrc DELETED
@@ -1,39 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/swcrc",
3
- "env": {
4
- "targets": {
5
- "chrome": "84",
6
- "edge": "84",
7
- "firefox": "75",
8
- "opera": "73",
9
- "safari": "14.1"
10
- },
11
- "bugfixes": true
12
- },
13
- "exclude": [
14
- "/testing",
15
- "/**/*.cy.ts",
16
- "/**/*.cy.tsx",
17
- "/**/*.spec.ts",
18
- "/**/*.spec.tsx",
19
- "/**/*.test.ts",
20
- "/**/*.test.tsx"
21
- ],
22
- "jsc": {
23
- "parser": {
24
- "syntax": "typescript",
25
- "tsx": true,
26
- "decorators": false,
27
- "dynamicImport": false
28
- },
29
- "externalHelpers": true,
30
- "transform": {
31
- "react": {
32
- "runtime": "classic",
33
- "useSpread": true
34
- }
35
- }
36
- },
37
- "minify": false,
38
- "sourceMaps": true
39
- }