@atlaskit/forge-react-types 0.60.0 → 0.62.0

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 (37) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/components/global/__generated__/GlobalExpandableMenuItemProps.codegen.js +5 -1
  3. package/dist/cjs/components/global/__generated__/GlobalMainProps.codegen.js +5 -0
  4. package/dist/cjs/components/global/__generated__/GlobalProps.codegen.js +5 -0
  5. package/dist/cjs/components/global/__generated__/GlobalSidebarProps.codegen.js +5 -1
  6. package/dist/es2019/components/global/__generated__/GlobalExpandableMenuItemProps.codegen.js +1 -0
  7. package/dist/es2019/components/global/__generated__/GlobalMainProps.codegen.js +1 -0
  8. package/dist/es2019/components/global/__generated__/GlobalProps.codegen.js +1 -0
  9. package/dist/es2019/components/global/__generated__/GlobalSidebarProps.codegen.js +1 -0
  10. package/dist/esm/components/global/__generated__/GlobalExpandableMenuItemProps.codegen.js +1 -0
  11. package/dist/esm/components/global/__generated__/GlobalMainProps.codegen.js +1 -0
  12. package/dist/esm/components/global/__generated__/GlobalProps.codegen.js +1 -0
  13. package/dist/esm/components/global/__generated__/GlobalSidebarProps.codegen.js +1 -0
  14. package/dist/types/components/global/__generated__/GlobalExpandableMenuItemProps.codegen.d.ts +8 -3
  15. package/dist/types/components/global/__generated__/GlobalLinkMenuItemProps.codegen.d.ts +3 -3
  16. package/dist/types/components/global/__generated__/GlobalMainProps.codegen.d.ts +15 -0
  17. package/dist/types/components/global/__generated__/GlobalProps.codegen.d.ts +18 -0
  18. package/dist/types/components/global/__generated__/GlobalSidebarProps.codegen.d.ts +9 -4
  19. package/dist/types/components/global/__generated__/index.d.ts +4 -2
  20. package/dist/types/index.d.ts +1 -1
  21. package/dist/types-ts4.5/components/global/__generated__/GlobalExpandableMenuItemProps.codegen.d.ts +8 -3
  22. package/dist/types-ts4.5/components/global/__generated__/GlobalLinkMenuItemProps.codegen.d.ts +3 -3
  23. package/dist/types-ts4.5/components/global/__generated__/GlobalMainProps.codegen.d.ts +15 -0
  24. package/dist/types-ts4.5/components/global/__generated__/GlobalProps.codegen.d.ts +18 -0
  25. package/dist/types-ts4.5/components/global/__generated__/GlobalSidebarProps.codegen.d.ts +9 -4
  26. package/dist/types-ts4.5/components/global/__generated__/index.d.ts +4 -2
  27. package/dist/types-ts4.5/index.d.ts +1 -1
  28. package/package.json +5 -5
  29. package/scripts/codegen/globalComponentPropTypes.ts +55 -5
  30. package/scripts/typechecker.ts +1 -1
  31. package/src/components/global/__generated__/GlobalExpandableMenuItemProps.codegen.tsx +9 -3
  32. package/src/components/global/__generated__/GlobalLinkMenuItemProps.codegen.tsx +3 -3
  33. package/src/components/global/__generated__/GlobalMainProps.codegen.tsx +19 -0
  34. package/src/components/global/__generated__/GlobalProps.codegen.tsx +22 -0
  35. package/src/components/global/__generated__/GlobalSidebarProps.codegen.tsx +10 -4
  36. package/src/components/global/__generated__/index.ts +4 -2
  37. package/src/index.ts +4 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/forge-react-types
2
2
 
3
+ ## 0.62.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`4e53247402873`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4e53247402873) -
8
+ Update global component props
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 0.61.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [`50d654b213b1b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/50d654b213b1b) -
19
+ Export types for Global, GlobalMain, GlobalSidebar
20
+
3
21
  ## 0.60.0
4
22
 
5
23
  ### Minor Changes
@@ -1 +1,5 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1 +1,5 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -3,15 +3,20 @@
3
3
  *
4
4
  * Generated prop types for Global component - GlobalExpandableMenuItem
5
5
  *
6
- * @codegen <<SignedSource::5cc168904578780ba265e1ad2fc3cfec>>
6
+ * @codegen <<SignedSource::8780871b323d0ecd390c334b279f4c5c>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::f24c6db68c9118776491952640ba616f>>
9
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-ExpandableMenuItem.tsx <<SignedSource::79df02babb605094ae73bdd0c00c7156>>
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-ExpandableMenuItem.tsx <<SignedSource::70ca291a86897077f42eb7af58f709b1>>
10
10
  */
11
+ import type React from 'react';
11
12
  export type GlobalExpandableMenuItemProps = {
12
13
  /**
13
14
  * The display label for the expandable menu item.
14
15
  */
15
16
  label: string;
17
+ /**
18
+ * Accepts LinkMenuItem components.
19
+ */
20
+ children: React.ReactElement | React.ReactElement[];
16
21
  };
17
22
  export type TGlobalExpandableMenuItem<T> = (props: GlobalExpandableMenuItemProps) => T;
@@ -3,10 +3,10 @@
3
3
  *
4
4
  * Generated prop types for Global component - GlobalLinkMenuItem
5
5
  *
6
- * @codegen <<SignedSource::1c930740db9038f51b3e7b99771b253c>>
6
+ * @codegen <<SignedSource::ec42467e1d5bf99efc2748fb4387c7db>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::f24c6db68c9118776491952640ba616f>>
9
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-LinkMenuItem.tsx <<SignedSource::e70effe0d4e0620246252b35abddb112>>
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-LinkMenuItem.tsx <<SignedSource::714aeaa577c5b83035e8db86a0791f12>>
10
10
  */
11
11
  export type GlobalLinkMenuItemProps = {
12
12
  /**
@@ -0,0 +1,15 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * Generated prop types for Global component - GlobalMain
5
+ *
6
+ * @codegen <<SignedSource::77dc12c1b869c10e64b714e1f60669f9>>
7
+ * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-Main.tsx <<SignedSource::082e248420c3447666672693808d6a2f>>
10
+ */
11
+ import type React from 'react';
12
+ export type GlobalMainProps = {
13
+ children?: React.ReactNode;
14
+ };
15
+ export type TGlobalMain<T> = (props: GlobalMainProps) => T;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * Generated prop types for Global component - Global
5
+ *
6
+ * @codegen <<SignedSource::01c434a8e1088249f55e97bba99aa916>>
7
+ * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global.tsx <<SignedSource::54502ae221b976e3c4f4849cff6be726>>
10
+ */
11
+ import type React from 'react';
12
+ export type GlobalProps = {
13
+ /**
14
+ * Accepts Global.Sidebar and Global.Main components as children.
15
+ */
16
+ children?: React.ReactElement | React.ReactElement[];
17
+ };
18
+ export type TGlobal<T> = (props: GlobalProps) => T;
@@ -3,16 +3,21 @@
3
3
  *
4
4
  * Generated prop types for Global component - GlobalSidebar
5
5
  *
6
- * @codegen <<SignedSource::2e9345246b57199aa34c90c2d697b45c>>
6
+ * @codegen <<SignedSource::99a3fc631d768e6e6e1355970e07eb99>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::f24c6db68c9118776491952640ba616f>>
9
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-Sidebar.tsx <<SignedSource::79c613be77297a86b70005750a4b0220>>
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-Sidebar.tsx <<SignedSource::13411f0525b0468463282baeeb342f2b>>
10
10
  */
11
+ import type React from 'react';
11
12
  export type GlobalSidebarProps = {
12
13
  /**
13
14
  * URL path for the "For You" section in the sidebar.
14
15
  * When provided, enables the "For You" navigation item.
15
16
  */
16
- forYouUrl?: string | undefined;
17
+ forYouUrl?: string;
18
+ /**
19
+ * Accepts Global.LinkMenuItem and Global.ExpandMenuItem components.
20
+ */
21
+ children?: React.ReactElement | React.ReactElement[];
17
22
  };
18
23
  export type TGlobalSidebar<T> = (props: GlobalSidebarProps) => T;
@@ -3,10 +3,12 @@
3
3
  *
4
4
  * Index file for generated Global component prop types
5
5
  *
6
- * @codegen <<SignedSource::94d4d04a65ea9019214cd455fcb4c585>>
6
+ * @codegen <<SignedSource::275df2eb411df5669a05d8e4573e519b>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::f24c6db68c9118776491952640ba616f>>
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
9
  */
10
+ export type { GlobalProps, TGlobal } from './GlobalProps.codegen';
11
+ export type { GlobalMainProps, TGlobalMain } from './GlobalMainProps.codegen';
10
12
  export type { GlobalSidebarProps, TGlobalSidebar } from './GlobalSidebarProps.codegen';
11
13
  export type { GlobalLinkMenuItemProps, TGlobalLinkMenuItem } from './GlobalLinkMenuItemProps.codegen';
12
14
  export type { GlobalExpandableMenuItemProps, TGlobalExpandableMenuItem } from './GlobalExpandableMenuItemProps.codegen';
@@ -3,4 +3,4 @@ export type { BarChartProps, StackBarChartProps, HorizontalStackBarChartProps, H
3
3
  export type { ChromelessEditorProps, CommentEditorProps, TChromelessEditor, TCommentEditor, } from './components/editor';
4
4
  export type { ChartColorTokens } from './types';
5
5
  export type { FrameProps } from './components/frame';
6
- export type { GlobalSidebarProps, TGlobalSidebar, GlobalLinkMenuItemProps, TGlobalLinkMenuItem, GlobalExpandableMenuItemProps, TGlobalExpandableMenuItem, } from './components/global/__generated__';
6
+ export type { GlobalSidebarProps, TGlobalSidebar, GlobalLinkMenuItemProps, TGlobalLinkMenuItem, GlobalExpandableMenuItemProps, TGlobalExpandableMenuItem, GlobalProps, TGlobal, GlobalMainProps, TGlobalMain, } from './components/global/__generated__';
@@ -3,15 +3,20 @@
3
3
  *
4
4
  * Generated prop types for Global component - GlobalExpandableMenuItem
5
5
  *
6
- * @codegen <<SignedSource::5cc168904578780ba265e1ad2fc3cfec>>
6
+ * @codegen <<SignedSource::8780871b323d0ecd390c334b279f4c5c>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::f24c6db68c9118776491952640ba616f>>
9
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-ExpandableMenuItem.tsx <<SignedSource::79df02babb605094ae73bdd0c00c7156>>
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-ExpandableMenuItem.tsx <<SignedSource::70ca291a86897077f42eb7af58f709b1>>
10
10
  */
11
+ import type React from 'react';
11
12
  export type GlobalExpandableMenuItemProps = {
12
13
  /**
13
14
  * The display label for the expandable menu item.
14
15
  */
15
16
  label: string;
17
+ /**
18
+ * Accepts LinkMenuItem components.
19
+ */
20
+ children: React.ReactElement | React.ReactElement[];
16
21
  };
17
22
  export type TGlobalExpandableMenuItem<T> = (props: GlobalExpandableMenuItemProps) => T;
@@ -3,10 +3,10 @@
3
3
  *
4
4
  * Generated prop types for Global component - GlobalLinkMenuItem
5
5
  *
6
- * @codegen <<SignedSource::1c930740db9038f51b3e7b99771b253c>>
6
+ * @codegen <<SignedSource::ec42467e1d5bf99efc2748fb4387c7db>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::f24c6db68c9118776491952640ba616f>>
9
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-LinkMenuItem.tsx <<SignedSource::e70effe0d4e0620246252b35abddb112>>
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-LinkMenuItem.tsx <<SignedSource::714aeaa577c5b83035e8db86a0791f12>>
10
10
  */
11
11
  export type GlobalLinkMenuItemProps = {
12
12
  /**
@@ -0,0 +1,15 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * Generated prop types for Global component - GlobalMain
5
+ *
6
+ * @codegen <<SignedSource::77dc12c1b869c10e64b714e1f60669f9>>
7
+ * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-Main.tsx <<SignedSource::082e248420c3447666672693808d6a2f>>
10
+ */
11
+ import type React from 'react';
12
+ export type GlobalMainProps = {
13
+ children?: React.ReactNode;
14
+ };
15
+ export type TGlobalMain<T> = (props: GlobalMainProps) => T;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * Generated prop types for Global component - Global
5
+ *
6
+ * @codegen <<SignedSource::01c434a8e1088249f55e97bba99aa916>>
7
+ * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global.tsx <<SignedSource::54502ae221b976e3c4f4849cff6be726>>
10
+ */
11
+ import type React from 'react';
12
+ export type GlobalProps = {
13
+ /**
14
+ * Accepts Global.Sidebar and Global.Main components as children.
15
+ */
16
+ children?: React.ReactElement | React.ReactElement[];
17
+ };
18
+ export type TGlobal<T> = (props: GlobalProps) => T;
@@ -3,16 +3,21 @@
3
3
  *
4
4
  * Generated prop types for Global component - GlobalSidebar
5
5
  *
6
- * @codegen <<SignedSource::2e9345246b57199aa34c90c2d697b45c>>
6
+ * @codegen <<SignedSource::99a3fc631d768e6e6e1355970e07eb99>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::f24c6db68c9118776491952640ba616f>>
9
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-Sidebar.tsx <<SignedSource::79c613be77297a86b70005750a4b0220>>
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-Sidebar.tsx <<SignedSource::13411f0525b0468463282baeeb342f2b>>
10
10
  */
11
+ import type React from 'react';
11
12
  export type GlobalSidebarProps = {
12
13
  /**
13
14
  * URL path for the "For You" section in the sidebar.
14
15
  * When provided, enables the "For You" navigation item.
15
16
  */
16
- forYouUrl?: string | undefined;
17
+ forYouUrl?: string;
18
+ /**
19
+ * Accepts Global.LinkMenuItem and Global.ExpandMenuItem components.
20
+ */
21
+ children?: React.ReactElement | React.ReactElement[];
17
22
  };
18
23
  export type TGlobalSidebar<T> = (props: GlobalSidebarProps) => T;
@@ -3,10 +3,12 @@
3
3
  *
4
4
  * Index file for generated Global component prop types
5
5
  *
6
- * @codegen <<SignedSource::94d4d04a65ea9019214cd455fcb4c585>>
6
+ * @codegen <<SignedSource::275df2eb411df5669a05d8e4573e519b>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::f24c6db68c9118776491952640ba616f>>
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
9
  */
10
+ export type { GlobalProps, TGlobal } from './GlobalProps.codegen';
11
+ export type { GlobalMainProps, TGlobalMain } from './GlobalMainProps.codegen';
10
12
  export type { GlobalSidebarProps, TGlobalSidebar } from './GlobalSidebarProps.codegen';
11
13
  export type { GlobalLinkMenuItemProps, TGlobalLinkMenuItem } from './GlobalLinkMenuItemProps.codegen';
12
14
  export type { GlobalExpandableMenuItemProps, TGlobalExpandableMenuItem } from './GlobalExpandableMenuItemProps.codegen';
@@ -3,4 +3,4 @@ export type { BarChartProps, StackBarChartProps, HorizontalStackBarChartProps, H
3
3
  export type { ChromelessEditorProps, CommentEditorProps, TChromelessEditor, TCommentEditor, } from './components/editor';
4
4
  export type { ChartColorTokens } from './types';
5
5
  export type { FrameProps } from './components/frame';
6
- export type { GlobalSidebarProps, TGlobalSidebar, GlobalLinkMenuItemProps, TGlobalLinkMenuItem, GlobalExpandableMenuItemProps, TGlobalExpandableMenuItem, } from './components/global/__generated__';
6
+ export type { GlobalSidebarProps, TGlobalSidebar, GlobalLinkMenuItemProps, TGlobalLinkMenuItem, GlobalExpandableMenuItemProps, TGlobalExpandableMenuItem, GlobalProps, TGlobal, GlobalMainProps, TGlobalMain, } from './components/global/__generated__';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/forge-react-types",
3
- "version": "0.60.0",
3
+ "version": "0.62.0",
4
4
  "description": "Component types for Forge UI Kit React components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,18 +28,18 @@
28
28
  "@atlaskit/form": "^15.3.0",
29
29
  "@atlaskit/inline-edit": "^15.6.0",
30
30
  "@atlaskit/modal-dialog": "^14.10.0",
31
- "@atlaskit/navigation-system": "^5.33.0",
31
+ "@atlaskit/navigation-system": "^5.34.0",
32
32
  "@atlaskit/object": "^1.0.0",
33
33
  "@atlaskit/popup": "^4.13.0",
34
34
  "@atlaskit/primitives": "^18.0.0",
35
35
  "@atlaskit/progress-bar": "^4.1.0",
36
- "@atlaskit/progress-tracker": "^10.4.0",
36
+ "@atlaskit/progress-tracker": "^10.5.0",
37
37
  "@atlaskit/radio": "^8.4.0",
38
38
  "@atlaskit/section-message": "^8.12.0",
39
39
  "@atlaskit/select": "^21.7.0",
40
40
  "@atlaskit/spinner": "^19.0.0",
41
41
  "@atlaskit/tabs": "^18.3.0",
42
- "@atlaskit/tag": "^14.4.0",
42
+ "@atlaskit/tag": "^14.5.0",
43
43
  "@atlaskit/tag-group": "^12.0.0",
44
44
  "@atlaskit/textarea": "^8.2.0",
45
45
  "@atlaskit/textfield": "^8.2.0",
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "devDependencies": {
58
58
  "@atlassian/codegen": "^0.1.0",
59
- "@atlassian/forge-ui": "^32.81.0",
59
+ "@atlassian/forge-ui": "^32.82.0",
60
60
  "@types/node": "^24.0.0",
61
61
  "lodash": "^4.17.21",
62
62
  "react": "^18.2.0",
@@ -73,9 +73,12 @@ const resolveToPrimitive = (typeText: string): string => {
73
73
  return typeText;
74
74
  }
75
75
 
76
- // Handle optional types (e.g., "string | undefined")
76
+ // Handle union types (e.g., "string | undefined")
77
77
  if (typeText.includes('|')) {
78
- const parts = typeText.split('|').map((p) => p.trim());
78
+ const parts = typeText
79
+ .split('|')
80
+ .map((p) => p.trim())
81
+ .filter((p) => p.length > 0);
79
82
  const resolvedParts = parts.map((part) => resolveToPrimitive(part));
80
83
  return resolvedParts.join(' | ');
81
84
  }
@@ -147,7 +150,10 @@ const resolveToInterfaceDeclaration = (
147
150
  /**
148
151
  * Generates the source code for a single component's prop types.
149
152
  */
150
- const generateComponentPropTypeCode = (interfaceDecl: InterfaceDeclaration): string => {
153
+ const generateComponentPropTypeCode = (
154
+ interfaceDecl: InterfaceDeclaration,
155
+ allPropsNames: string[],
156
+ ): string => {
151
157
  const interfaceName = interfaceDecl.getName();
152
158
  const componentName = interfaceName.replace('Props', '');
153
159
 
@@ -174,7 +180,31 @@ const generateComponentPropTypeCode = (interfaceDecl: InterfaceDeclaration): str
174
180
 
175
181
  properties.forEach((prop: PropertySignature) => {
176
182
  const propName = prop.getName();
177
- const propType = prop.getType().getText();
183
+ // Prefer the source-level type annotation (getTypeNode) over the resolved type (getType).
184
+ // getType().getText() can produce degenerate types (any/never/undefined) when the
185
+ // ts-morph Project lacks type definitions, or overly verbose types that expand
186
+ // generic defaults (e.g., ReactElement<X> → ReactElement<X, string | JSXElementConstructor<any>>).
187
+ // The source annotation preserves the developer's intended type expression.
188
+ const resolvedTypeText = prop.getType().getText();
189
+ const sourceTypeText = prop.getTypeNode()?.getText();
190
+ let propType = sourceTypeText ?? resolvedTypeText;
191
+
192
+ // Normalize bare React type references (e.g., ReactElement → React.ReactElement)
193
+ // so the generated file only needs a single React namespace import.
194
+ const reactTypeNames = [
195
+ 'ReactElement',
196
+ 'ReactNode',
197
+ 'ReactFragment',
198
+ 'ReactPortal',
199
+ 'JSXElementConstructor',
200
+ ];
201
+ for (const typeName of reactTypeNames) {
202
+ propType = propType.replace(
203
+ new RegExp(`(?<![\\w.])${typeName}\\b`, 'g'),
204
+ `React.${typeName}`,
205
+ );
206
+ }
207
+
178
208
  const isOptional = prop.hasQuestionToken();
179
209
  const resolvedType = resolveToPrimitive(propType);
180
210
 
@@ -204,6 +234,25 @@ const generateComponentPropTypeCode = (interfaceDecl: InterfaceDeclaration): str
204
234
  }
205
235
  lines.push(`export type T${componentName}<T> = (props: ${interfaceName}) => T;`);
206
236
 
237
+ // Detect needed imports based on type references in the generated code
238
+ const generatedCode = lines.slice(2).join('\n'); // skip eslint directive and blank line
239
+ const importLines: string[] = [];
240
+
241
+ if (/\bReact\./.test(generatedCode)) {
242
+ importLines.push("import type React from 'react';");
243
+ }
244
+
245
+ for (const propsName of allPropsNames) {
246
+ if (propsName !== interfaceName && generatedCode.includes(propsName)) {
247
+ importLines.push(`import type { ${propsName} } from './${propsName}.codegen';`);
248
+ }
249
+ }
250
+
251
+ if (importLines.length > 0) {
252
+ // Insert imports after the eslint directive and blank line (index 2)
253
+ lines.splice(2, 0, ...importLines, '');
254
+ }
255
+
207
256
  return lines.join('\n');
208
257
  };
209
258
 
@@ -236,6 +285,7 @@ const generateGlobalComponentPropTypes = () => {
236
285
  const exportedSymbols = sourceFile.getExportSymbols();
237
286
  const propsSymbols = exportedSymbols.filter((symbol) => symbol.getName().endsWith('Props'));
238
287
 
288
+ const allPropsNames = propsSymbols.map((s) => s.getName());
239
289
  const generatedFiles: string[] = [];
240
290
 
241
291
  propsSymbols.forEach((symbol) => {
@@ -251,7 +301,7 @@ const generateGlobalComponentPropTypes = () => {
251
301
  }
252
302
 
253
303
  const { interfaceDecl, sourceFilePath } = resolved;
254
- const sourceCode = generateComponentPropTypeCode(interfaceDecl);
304
+ const sourceCode = generateComponentPropTypeCode(interfaceDecl, allPropsNames);
255
305
  const outputPath = resolve(GLOBAL_OUTPUT_DIR, `${symbolName}.codegen.tsx`);
256
306
 
257
307
  const signedSourceCode = createSignedArtifact(
@@ -11,7 +11,7 @@ import {
11
11
  type LozengeProps,
12
12
  type RangeProps,
13
13
  type IconProps,
14
- } from '@atlassian/forge-ui/src/components/UIKit';
14
+ } from '@atlassian/forge-ui/UIKit';
15
15
  import { type BadgeProps as GeneratedBadgeProps } from '../src/components/__generated__/BadgeProps.codegen';
16
16
  import { type CalendarProps as GeneratedCalendarProps } from '../src/components/__generated__/CalendarProps.codegen';
17
17
  import { type CheckboxProps as GeneratedCheckboxProps } from '../src/components/__generated__/CheckboxProps.codegen';
@@ -3,18 +3,24 @@
3
3
  *
4
4
  * Generated prop types for Global component - GlobalExpandableMenuItem
5
5
  *
6
- * @codegen <<SignedSource::5cc168904578780ba265e1ad2fc3cfec>>
6
+ * @codegen <<SignedSource::8780871b323d0ecd390c334b279f4c5c>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::f24c6db68c9118776491952640ba616f>>
9
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-ExpandableMenuItem.tsx <<SignedSource::79df02babb605094ae73bdd0c00c7156>>
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-ExpandableMenuItem.tsx <<SignedSource::70ca291a86897077f42eb7af58f709b1>>
10
10
  */
11
11
  /* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
12
12
 
13
+ import type React from 'react';
14
+
13
15
  export type GlobalExpandableMenuItemProps = {
14
16
  /**
15
17
  * The display label for the expandable menu item.
16
18
  */
17
19
  label: string;
20
+ /**
21
+ * Accepts LinkMenuItem components.
22
+ */
23
+ children: React.ReactElement | React.ReactElement[];
18
24
  };
19
25
 
20
26
  export type TGlobalExpandableMenuItem<T> = (props: GlobalExpandableMenuItemProps) => T;
@@ -3,10 +3,10 @@
3
3
  *
4
4
  * Generated prop types for Global component - GlobalLinkMenuItem
5
5
  *
6
- * @codegen <<SignedSource::1c930740db9038f51b3e7b99771b253c>>
6
+ * @codegen <<SignedSource::ec42467e1d5bf99efc2748fb4387c7db>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::f24c6db68c9118776491952640ba616f>>
9
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-LinkMenuItem.tsx <<SignedSource::e70effe0d4e0620246252b35abddb112>>
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-LinkMenuItem.tsx <<SignedSource::714aeaa577c5b83035e8db86a0791f12>>
10
10
  */
11
11
  /* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
12
12
 
@@ -0,0 +1,19 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * Generated prop types for Global component - GlobalMain
5
+ *
6
+ * @codegen <<SignedSource::77dc12c1b869c10e64b714e1f60669f9>>
7
+ * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-Main.tsx <<SignedSource::082e248420c3447666672693808d6a2f>>
10
+ */
11
+ /* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
12
+
13
+ import type React from 'react';
14
+
15
+ export type GlobalMainProps = {
16
+ children?: React.ReactNode;
17
+ };
18
+
19
+ export type TGlobalMain<T> = (props: GlobalMainProps) => T;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * Generated prop types for Global component - Global
5
+ *
6
+ * @codegen <<SignedSource::01c434a8e1088249f55e97bba99aa916>>
7
+ * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global.tsx <<SignedSource::54502ae221b976e3c4f4849cff6be726>>
10
+ */
11
+ /* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
12
+
13
+ import type React from 'react';
14
+
15
+ export type GlobalProps = {
16
+ /**
17
+ * Accepts Global.Sidebar and Global.Main components as children.
18
+ */
19
+ children?: React.ReactElement | React.ReactElement[];
20
+ };
21
+
22
+ export type TGlobal<T> = (props: GlobalProps) => T;
@@ -3,19 +3,25 @@
3
3
  *
4
4
  * Generated prop types for Global component - GlobalSidebar
5
5
  *
6
- * @codegen <<SignedSource::2e9345246b57199aa34c90c2d697b45c>>
6
+ * @codegen <<SignedSource::99a3fc631d768e6e6e1355970e07eb99>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::f24c6db68c9118776491952640ba616f>>
9
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-Sidebar.tsx <<SignedSource::79c613be77297a86b70005750a4b0220>>
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/components/global/Global-Sidebar.tsx <<SignedSource::13411f0525b0468463282baeeb342f2b>>
10
10
  */
11
11
  /* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
12
12
 
13
+ import type React from 'react';
14
+
13
15
  export type GlobalSidebarProps = {
14
16
  /**
15
17
  * URL path for the "For You" section in the sidebar.
16
18
  * When provided, enables the "For You" navigation item.
17
19
  */
18
- forYouUrl?: string | undefined;
20
+ forYouUrl?: string;
21
+ /**
22
+ * Accepts Global.LinkMenuItem and Global.ExpandMenuItem components.
23
+ */
24
+ children?: React.ReactElement | React.ReactElement[];
19
25
  };
20
26
 
21
27
  export type TGlobalSidebar<T> = (props: GlobalSidebarProps) => T;
@@ -3,12 +3,14 @@
3
3
  *
4
4
  * Index file for generated Global component prop types
5
5
  *
6
- * @codegen <<SignedSource::94d4d04a65ea9019214cd455fcb4c585>>
6
+ * @codegen <<SignedSource::275df2eb411df5669a05d8e4573e519b>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen-global
8
- * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::f24c6db68c9118776491952640ba616f>>
8
+ * @codegenDependency ../../../../../../../services/forge-common-app-gateway/src/types/global-component-props.ts <<SignedSource::ad330a446ee260180d5b510c18b5e1c8>>
9
9
  */
10
10
  /* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
11
11
 
12
+ export type { GlobalProps, TGlobal } from './GlobalProps.codegen';
13
+ export type { GlobalMainProps, TGlobalMain } from './GlobalMainProps.codegen';
12
14
  export type { GlobalSidebarProps, TGlobalSidebar } from './GlobalSidebarProps.codegen';
13
15
  export type { GlobalLinkMenuItemProps, TGlobalLinkMenuItem } from './GlobalLinkMenuItemProps.codegen';
14
16
  export type { GlobalExpandableMenuItemProps, TGlobalExpandableMenuItem } from './GlobalExpandableMenuItemProps.codegen';
package/src/index.ts CHANGED
@@ -170,4 +170,8 @@ export type {
170
170
  TGlobalLinkMenuItem,
171
171
  GlobalExpandableMenuItemProps,
172
172
  TGlobalExpandableMenuItem,
173
+ GlobalProps,
174
+ TGlobal,
175
+ GlobalMainProps,
176
+ TGlobalMain,
173
177
  } from './components/global/__generated__';