@atlassian/clientside-extensions-components 4.0.2 → 5.1.0-5a180d69-mdyn784a

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 (95) hide show
  1. package/dist/cjs/ExtensionPoint.js +1 -1
  2. package/dist/cjs/ExtensionPoint.js.map +1 -1
  3. package/dist/cjs/ExtensionPointInfo.js +27 -20
  4. package/dist/cjs/ExtensionPointInfo.js.map +1 -1
  5. package/dist/cjs/ExtensionsObservable.js +1 -1
  6. package/dist/cjs/ExtensionsObservable.js.map +1 -1
  7. package/dist/cjs/handlers/AsyncPanelHandler.js +1 -1
  8. package/dist/cjs/handlers/AsyncPanelHandler.js.map +1 -1
  9. package/dist/cjs/handlers/ButtonHandler.js +2 -2
  10. package/dist/cjs/handlers/ButtonHandler.js.map +1 -1
  11. package/dist/cjs/handlers/LinkHandler.js +2 -2
  12. package/dist/cjs/handlers/LinkHandler.js.map +1 -1
  13. package/dist/cjs/handlers/ModalHandler.js +5 -5
  14. package/dist/cjs/handlers/ModalHandler.js.map +1 -1
  15. package/dist/cjs/handlers/PanelHandler.js +1 -1
  16. package/dist/cjs/handlers/PanelHandler.js.map +1 -1
  17. package/dist/cjs/handlers/SectionHandler.js +1 -2
  18. package/dist/cjs/handlers/SectionHandler.js.map +1 -1
  19. package/dist/cjs/index.js +10 -10
  20. package/dist/cjs/index.js.map +1 -1
  21. package/dist/cjs/renderElementAsReact.js +4 -3
  22. package/dist/cjs/renderElementAsReact.js.map +1 -1
  23. package/dist/cjs/styled.js +17 -47
  24. package/dist/cjs/styled.js.map +1 -1
  25. package/dist/cjs/types.js +1 -2
  26. package/dist/cjs/types.js.map +1 -1
  27. package/dist/cjs/useExtensions.js +1 -1
  28. package/dist/cjs/useExtensions.js.map +1 -1
  29. package/dist/cjs/useWebPanelRenderer.js.map +1 -1
  30. package/dist/esm/ExtensionPoint.js.map +1 -1
  31. package/dist/esm/ExtensionPointInfo.js +26 -19
  32. package/dist/esm/ExtensionPointInfo.js.map +1 -1
  33. package/dist/esm/ExtensionsObservable.js.map +1 -1
  34. package/dist/esm/handlers/AsyncPanelHandler.js.map +1 -1
  35. package/dist/esm/handlers/ButtonHandler.js.map +1 -1
  36. package/dist/esm/handlers/LinkHandler.js.map +1 -1
  37. package/dist/esm/handlers/ModalHandler.js +5 -5
  38. package/dist/esm/handlers/ModalHandler.js.map +1 -1
  39. package/dist/esm/handlers/PanelHandler.js.map +1 -1
  40. package/dist/esm/handlers/SectionHandler.js +0 -1
  41. package/dist/esm/handlers/SectionHandler.js.map +1 -1
  42. package/dist/esm/renderElementAsReact.js +3 -2
  43. package/dist/esm/renderElementAsReact.js.map +1 -1
  44. package/dist/esm/styled.js +14 -44
  45. package/dist/esm/styled.js.map +1 -1
  46. package/dist/esm/useExtensions.js.map +1 -1
  47. package/dist/esm/useWebPanelRenderer.js.map +1 -1
  48. package/dist/types/ExtensionPointInfo.d.ts +1 -1
  49. package/dist/types/ExtensionPointInfo.d.ts.map +1 -1
  50. package/dist/types/ExtensionsObservable.d.ts.map +1 -1
  51. package/dist/types/debug/types.d.ts +1 -1
  52. package/dist/types/debug/types.d.ts.map +1 -1
  53. package/dist/types/debug/useDebug.d.ts.map +1 -1
  54. package/dist/types/debug/useDiscovery.d.ts.map +1 -1
  55. package/dist/types/debug/useLogging.d.ts.map +1 -1
  56. package/dist/types/debug/useValidation.d.ts.map +1 -1
  57. package/dist/types/handlers/AsyncPanelHandler.d.ts +1 -1
  58. package/dist/types/handlers/AsyncPanelHandler.d.ts.map +1 -1
  59. package/dist/types/handlers/ButtonHandler.d.ts +2 -0
  60. package/dist/types/handlers/ButtonHandler.d.ts.map +1 -1
  61. package/dist/types/handlers/LinkHandler.d.ts +2 -0
  62. package/dist/types/handlers/LinkHandler.d.ts.map +1 -1
  63. package/dist/types/handlers/ModalHandler.d.ts +2 -1
  64. package/dist/types/handlers/ModalHandler.d.ts.map +1 -1
  65. package/dist/types/handlers/SectionHandler.d.ts +6 -1
  66. package/dist/types/handlers/SectionHandler.d.ts.map +1 -1
  67. package/dist/types/renderElementAsReact.d.ts +2 -1
  68. package/dist/types/renderElementAsReact.d.ts.map +1 -1
  69. package/dist/types/styled.d.ts +33 -14
  70. package/dist/types/styled.d.ts.map +1 -1
  71. package/dist/types/types.d.ts +4 -4
  72. package/dist/types/types.d.ts.map +1 -1
  73. package/dist/types/useExtensions.d.ts.map +1 -1
  74. package/lib/ExtensionPoint.test.tsx +1 -1
  75. package/lib/ExtensionPointInfo.test.tsx +1 -1
  76. package/lib/ExtensionPointInfo.tsx +51 -24
  77. package/lib/ExtensionsObservable.test.ts +1 -1
  78. package/lib/__snapshots__/ExtensionPointInfo.test.tsx.snap +203 -124
  79. package/lib/debug/useDebug.test.ts +2 -2
  80. package/lib/debug/useDiscovery.test.ts +2 -2
  81. package/lib/debug/useLogging.test.ts +2 -2
  82. package/lib/debug/useValidation.test.ts +2 -2
  83. package/lib/handlers/ButtonHandler.test.tsx +5 -1
  84. package/lib/handlers/ButtonHandler.tsx +3 -1
  85. package/lib/handlers/LinkHandler.test.tsx +5 -1
  86. package/lib/handlers/LinkHandler.tsx +1 -0
  87. package/lib/handlers/ModalHandler.test.tsx +9 -7
  88. package/lib/handlers/ModalHandler.tsx +11 -9
  89. package/lib/handlers/SectionHandler.test.tsx +1 -1
  90. package/lib/handlers/SectionHandler.tsx +5 -1
  91. package/lib/renderElementAsReact.test.tsx +7 -6
  92. package/lib/renderElementAsReact.tsx +12 -3
  93. package/lib/styled.ts +15 -46
  94. package/lib/useExtensions.test.ts +49 -43
  95. package/package.json +25 -24
@@ -1 +1 @@
1
- {"version":3,"file":"AsyncPanelHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/AsyncPanelHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE5E,OAAO,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ChC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,yBAAyB,CAAC;IAC1C,eAAe,CAAC,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;CAC5C;AA6CD,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,sBAAsB,CAmEvE,CAAC"}
@@ -1,6 +1,8 @@
1
+ import React from 'react';
1
2
  import type { FunctionComponent } from 'react';
2
3
  import type { OnClickHandler } from './types';
3
4
  export interface ButtonHandlerProps extends OnClickHandler {
5
+ children?: React.ReactNode;
4
6
  }
5
7
  export declare const ButtonHandler: FunctionComponent<ButtonHandlerProps>;
6
8
  //# sourceMappingURL=ButtonHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/ButtonHandler.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,kBAAmB,SAAQ,cAAc;CAAG;AAE7D,eAAO,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,CA2B/D,CAAC"}
1
+ {"version":3,"file":"ButtonHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/ButtonHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACtD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,eAAO,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,CA2B/D,CAAC"}
@@ -1,7 +1,9 @@
1
+ import React from 'react';
1
2
  import type { FunctionComponent } from 'react';
2
3
  import type { OnClickHandler } from './types';
3
4
  export interface LinkHandlerProps extends Partial<OnClickHandler> {
4
5
  href: string;
6
+ children?: React.ReactNode;
5
7
  }
6
8
  export declare const LinkHandler: FunctionComponent<LinkHandlerProps>;
7
9
  //# sourceMappingURL=LinkHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LinkHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/LinkHandler.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,gBAAiB,SAAQ,OAAO,CAAC,cAAc,CAAC;IAC7D,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,CA4B3D,CAAC"}
1
+ {"version":3,"file":"LinkHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/LinkHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,gBAAiB,SAAQ,OAAO,CAAC,cAAc,CAAC;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,CA4B3D,CAAC"}
@@ -1,5 +1,5 @@
1
- import type { FunctionComponent } from 'react';
2
1
  import { ModalExtension } from '@atlassian/clientside-extensions';
2
+ import type { FunctionComponent, ReactNode } from 'react';
3
3
  import type { OnClickHandler } from './types';
4
4
  export interface ModalHandlerProps {
5
5
  render: ModalExtension.ModalRenderExtension;
@@ -10,6 +10,7 @@ export interface ModalHandlerProps {
10
10
  }
11
11
  export declare const ModalHandler: FunctionComponent<ModalHandlerProps>;
12
12
  export interface ModalWithActionHandlerProps extends Omit<OnClickHandler, 'onAction'> {
13
+ children?: ReactNode;
13
14
  render: ModalExtension.ModalRenderExtension;
14
15
  __withoutTransition?: boolean;
15
16
  __disableFocusLock?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"ModalHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/ModalHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI/C,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAuB9C,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,cAAc,CAAC,oBAAoB,CAAC;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CA0D7D,CAAC;AAEF,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC;IACjF,MAAM,EAAE,cAAc,CAAC,oBAAoB,CAAC;IAC5C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,CAAC,2BAA2B,CAmDjF,CAAC"}
1
+ {"version":3,"file":"ModalHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/ModalHandler.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAsB9C,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,cAAc,CAAC,oBAAoB,CAAC;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CA0D7D,CAAC;AAEF,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC;IACjF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC,oBAAoB,CAAC;IAC5C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,CAAC,2BAA2B,CAmDjF,CAAC"}
@@ -1,3 +1,8 @@
1
+ import React from 'react';
1
2
  import type { FunctionComponent } from 'react';
2
- export declare const SectionHandler: FunctionComponent;
3
+ interface SectionHandlerProps {
4
+ children: React.ReactNode;
5
+ }
6
+ export declare const SectionHandler: FunctionComponent<SectionHandlerProps>;
7
+ export {};
3
8
  //# sourceMappingURL=SectionHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/SectionHandler.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,eAAO,MAAM,cAAc,EAAE,iBAE5B,CAAC"}
1
+ {"version":3,"file":"SectionHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/SectionHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,UAAU,mBAAmB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,CAEjE,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import type { ComponentType } from 'react';
2
+ import React from 'react';
2
3
  import type { MountableExtension } from '@atlassian/clientside-extensions';
3
- declare function renderElementAsReact<PropsT>(renderApi: MountableExtension, RenderElement: ComponentType<PropsT>, additionalProps?: PropsT): void;
4
+ declare function renderElementAsReact<PropsT extends React.JSX.IntrinsicAttributes>(renderApi: MountableExtension, RenderElement: ComponentType<PropsT>, additionalProps?: unknown): void;
4
5
  export default renderElementAsReact;
5
6
  //# sourceMappingURL=renderElementAsReact.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderElementAsReact.d.ts","sourceRoot":"","sources":["../../lib/renderElementAsReact.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,iBAAS,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC,EAAE,MAAM,QASlI;AAED,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"renderElementAsReact.d.ts","sourceRoot":"","sources":["../../lib/renderElementAsReact.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,iBAAS,oBAAoB,CAAC,MAAM,SAAS,KAAK,CAAC,GAAG,CAAC,mBAAmB,EACtE,SAAS,EAAE,kBAAkB,EAC7B,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,EACpC,eAAe,CAAC,EAAE,OAAO,QAe5B;AAED,eAAe,oBAAoB,CAAC"}
@@ -1,15 +1,34 @@
1
- /// <reference types="react" />
2
- export declare const BlinkerContainer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Pick<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>, keyof import("react").HTMLAttributes<HTMLSpanElement>>, object>;
3
- export declare const Blinker: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Pick<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>, keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>>, object>;
4
- export declare const Table: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, Pick<import("react").ClassAttributes<HTMLTableElement> & import("react").TableHTMLAttributes<HTMLTableElement>, keyof import("react").TableHTMLAttributes<HTMLTableElement>>, object>;
5
- export declare const HeadRow: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, Pick<import("@emotion/styled-base/types/helper").Overwrapped<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, import("@atlaskit/theme/dist/types/types").ThemeProps | undefined>, never>, {
6
- __ATLASKIT_THEME__: import("@atlaskit/theme/dist/types/types").Theme;
7
- }>;
8
- export declare const HeadCell: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, Pick<import("@emotion/styled-base/types/helper").Overwrapped<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, import("@atlaskit/theme/dist/types/types").ThemeProps | undefined>, never>, {
9
- __ATLASKIT_THEME__: import("@atlaskit/theme/dist/types/types").Theme;
10
- }>;
11
- export declare const TableRow: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, Pick<import("@emotion/styled-base/types/helper").Overwrapped<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, import("@atlaskit/theme/dist/types/types").ThemeProps | undefined>, never>, {
12
- __ATLASKIT_THEME__: import("@atlaskit/theme/dist/types/types").Theme;
13
- }>;
14
- export declare const TableCell: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, Pick<import("react").ClassAttributes<HTMLTableDataCellElement> & import("react").TdHTMLAttributes<HTMLTableDataCellElement>, keyof import("react").TdHTMLAttributes<HTMLTableDataCellElement>>, object>;
1
+ export declare const GRID_SIZE = 8;
2
+ export declare const BlinkerContainer: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme;
4
+ as?: React.ElementType;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
6
+ export declare const Blinker: import("@emotion/styled").StyledComponent<{
7
+ theme?: import("@emotion/react").Theme;
8
+ as?: React.ElementType;
9
+ }, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
10
+ export declare const Table: import("@emotion/styled").StyledComponent<{
11
+ theme?: import("@emotion/react").Theme;
12
+ as?: React.ElementType;
13
+ }, import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, {}>;
14
+ export declare const HeadRow: import("@emotion/styled").StyledComponent<{
15
+ theme?: import("@emotion/react").Theme;
16
+ as?: React.ElementType;
17
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, {}>;
18
+ export declare const HeadCell: import("@emotion/styled").StyledComponent<{
19
+ theme?: import("@emotion/react").Theme;
20
+ as?: React.ElementType;
21
+ }, import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, {}>;
22
+ export declare const TableRow: import("@emotion/styled").StyledComponent<{
23
+ theme?: import("@emotion/react").Theme;
24
+ as?: React.ElementType;
25
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, {}>;
26
+ export declare const TableCell: import("@emotion/styled").StyledComponent<{
27
+ theme?: import("@emotion/react").Theme;
28
+ as?: React.ElementType;
29
+ }, import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, {}>;
30
+ export declare const HeadingWrapper: import("@emotion/styled").StyledComponent<{
31
+ theme?: import("@emotion/react").Theme;
32
+ as?: React.ElementType;
33
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
15
34
  //# sourceMappingURL=styled.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../lib/styled.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,gBAAgB,8TAE5B,CAAC;AAYF,eAAO,MAAM,OAAO,0VAsBnB,CAAC;AAmBF,eAAO,MAAM,KAAK,kVAGjB,CAAC;AAEF,eAAO,MAAM,OAAO;;EAEnB,CAAC;AAEF,eAAO,MAAM,QAAQ;;EAmBpB,CAAC;AAIF,eAAO,MAAM,QAAQ;;EASpB,CAAC;AAEF,eAAO,MAAM,SAAS,iXAWrB,CAAC"}
1
+ {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../lib/styled.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,IAAI,CAAC;AAE3B,eAAO,MAAM,gBAAgB;;SAmBzB,MAAI,WAAW;2GAjBlB,CAAC;AAaF,eAAO,MAAM,OAAO;;eAIZ,WAAW;qHAkBlB,CAAC;AAKF,eAAO,MAAM,KAAK;;eAvBV,WAAW;kHA0BlB,CAAC;AAEF,eAAO,MAAM,OAAO;;eA5BZ,WAAW;mHA8BlB,CAAC;AAEF,eAAO,MAAM,QAAQ;;eAhCb,WAAW;mIA0ClB,CAAC;AAEF,eAAO,MAAM,QAAQ;;eA5Cb,WAAW;mHAiDlB,CAAC;AAEF,eAAO,MAAM,SAAS;;eAnDd,WAAW;+HAuDlB,CAAC;AAEF,eAAO,MAAM,cAAc;;eAzDnB,WAAW;yGA2DlB,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { ExtensionAttributes, ExtensionDescriptor } from '@atlassian/clientside-extensions-registry';
3
3
  import type { Validator } from '@atlassian/clientside-extensions-schema';
4
- export declare type ExtensionState<T extends ExtensionAttributes> = [ExtensionDescriptor<T>[], ExtensionDescriptor<T>[], boolean];
5
- export declare type ExtensionPointCallback<T> = (supportedDescriptors: T[], unsupportedDescriptors: T[], loading: boolean) => ReactNode;
6
- export declare type ExtensionPointState<T extends ExtensionAttributes = ExtensionAttributes> = {
4
+ export type ExtensionState<T extends ExtensionAttributes> = [ExtensionDescriptor<T>[], ExtensionDescriptor<T>[], boolean];
5
+ export type ExtensionPointCallback<T> = (supportedDescriptors: T[], unsupportedDescriptors: T[], loading: boolean) => ReactNode;
6
+ export type ExtensionPointState<T extends ExtensionAttributes = ExtensionAttributes> = {
7
7
  descriptors: ExtensionDescriptor<T>[];
8
8
  loadingState: boolean;
9
9
  };
10
- export declare type ExtensionPointUpdate<T extends ExtensionAttributes = ExtensionAttributes> = {
10
+ export type ExtensionPointUpdate<T extends ExtensionAttributes = ExtensionAttributes> = {
11
11
  state: ExtensionPointState<T>;
12
12
  update: ExtensionDescriptor<T>[];
13
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAG1G,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,oBAAY,cAAc,CAAC,CAAC,SAAS,mBAAmB,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;AAC1H,oBAAY,sBAAsB,CAAC,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,EAAE,EAAE,sBAAsB,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,KAAK,SAAS,CAAC;AAChI,oBAAY,mBAAmB,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,IAAI;IACnF,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC;IACtC,YAAY,EAAE,OAAO,CAAC;CACzB,CAAC;AACF,oBAAY,oBAAoB,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,IAAI;IACpF,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IAC9B,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC;CACpC,CAAC;AAEF,MAAM,WAAW,OAAO;IACpB,kBAAkB,EAAE,SAAS,CAAC;IAC9B,gBAAgB,CAAC,EAAE,SAAS,CAAC;CAChC;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,SAAS,GAAG,CAAC,GAAG,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I,SACnC,WAAW,SAAS,mBAAmB,8BAEjC,MAAM,WACH,QAAQ,WACR,OAAO,YAInB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { mocked } from 'ts-jest/utils';
2
+ import { mocked } from 'jest-mock';
3
3
  import { act, render } from '@testing-library/react';
4
4
  import type { ExtensionDescriptor } from '@atlassian/clientside-extensions-registry';
5
5
  import registry from '@atlassian/clientside-extensions-registry';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { mocked } from 'ts-jest/utils';
2
+ import { mocked } from 'jest-mock';
3
3
  import { render, fireEvent, screen, findByRole as findByRoleInContainer } from '@testing-library/react';
4
4
 
5
5
  import type { SerializedDocument } from '@atlassian/clientside-extensions-schema';
@@ -1,8 +1,9 @@
1
+ import Button from '@atlaskit/button/new';
2
+ import Heading from '@atlaskit/heading';
3
+ import Modal, { ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
1
4
  import type { FunctionComponent } from 'react';
2
5
  import React, { memo, useState } from 'react';
3
- import Button from '@atlaskit/button/standard-button';
4
- import Modal, { ModalTransition, ModalTitle, ModalHeader, ModalFooter } from '@atlaskit/modal-dialog';
5
- import { Link, Element } from 'react-scroll';
6
+ import { Element, Link } from 'react-scroll';
6
7
 
7
8
  import type {
8
9
  SerializedDocument,
@@ -13,9 +14,8 @@ import type {
13
14
  // We only import types here
14
15
  // eslint-disable-next-line node/no-unpublished-import
15
16
  } from '@atlassian/clientside-extensions-schema';
16
- import { gridSize } from '@atlaskit/theme/constants';
17
17
  import useDiscovery from './debug/useDiscovery';
18
- import { Table, TableCell, TableRow, HeadRow, HeadCell, Blinker, BlinkerContainer } from './styled';
18
+ import { Blinker, BlinkerContainer, GRID_SIZE, HeadCell, HeadingWrapper, HeadRow, Table, TableCell, TableRow } from './styled';
19
19
 
20
20
  export type ExtensionPointInfoProps = {
21
21
  name: string;
@@ -28,7 +28,8 @@ const LinkToElement = ({ to }: { to: string }) => {
28
28
  const cleanTo = to.replace(/[^a-zA-Z0-9]/g, '');
29
29
 
30
30
  return (
31
- // eslint-disable-next-line jsx-a11y/anchor-is-valid
31
+ // eslint-disable-next-line jsx-a11y/anchor-is-valid, @typescript-eslint/ban-ts-comment
32
+ // @ts-ignore: react-scroll types are not up to date with the latest react version
32
33
  <Link to={cleanTo} href="" containerId="___cse_info_container" offset={-20} smooth>
33
34
  {to}
34
35
  </Link>
@@ -65,9 +66,13 @@ const TypeRenderer: FunctionComponent<{ objectType: SerializedObjectType }> = ({
65
66
 
66
67
  const EnumTypeRenderer = ({ enumType }: { enumType: SerializedEnumType }) => (
67
68
  <>
68
- <h3>
69
- <Element name={enumType.name}>{enumType.name}</Element>
70
- </h3>
69
+ <HeadingWrapper>
70
+ <Heading size="small" as="h3">
71
+ {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
72
+ {/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}
73
+ <Element id={enumType.name}>{enumType.name}</Element>
74
+ </Heading>
75
+ </HeadingWrapper>
71
76
  {enumType.description ? (
72
77
  <p>{enumType.description}</p>
73
78
  ) : (
@@ -80,9 +85,13 @@ const EnumTypeRenderer = ({ enumType }: { enumType: SerializedEnumType }) => (
80
85
 
81
86
  const UnionTypeRenderer = ({ unionType }: { unionType: SerializedUnionType }) => (
82
87
  <>
83
- <h3>
84
- <Element name={unionType.name}>{unionType.name}</Element>
85
- </h3>
88
+ <HeadingWrapper>
89
+ <Heading size="small" as="h3">
90
+ {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
91
+ {/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}
92
+ <Element id={unionType.name}>{unionType.name}</Element>
93
+ </Heading>
94
+ </HeadingWrapper>
86
95
  {unionType.description ? (
87
96
  <p>{unionType.description}</p>
88
97
  ) : (
@@ -101,9 +110,13 @@ const UnionTypeRenderer = ({ unionType }: { unionType: SerializedUnionType }) =>
101
110
 
102
111
  const ScalarRenderer = ({ scalar }: { scalar: SerializedScalar }) => (
103
112
  <>
104
- <h3>
105
- <Element name={scalar.name}>{scalar.name}</Element>
106
- </h3>
113
+ <HeadingWrapper>
114
+ <Heading size="small" as="h3">
115
+ {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
116
+ {/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}
117
+ <Element id={scalar.name}>{scalar.name}</Element>
118
+ </Heading>
119
+ </HeadingWrapper>
107
120
  <p>{scalar.description}</p>
108
121
  </>
109
122
  );
@@ -130,7 +143,9 @@ const SchemasRenderer = ({ schemaDocuments: { schema, contextSchema } }: Omit<Ex
130
143
 
131
144
  return (
132
145
  <>
133
- <h2>Attributes</h2>
146
+ <Heading size="medium" as="h2">
147
+ Attributes
148
+ </Heading>
134
149
  {attributesDocument ? (
135
150
  <>
136
151
  <p>List of attributes supported by this extension point.</p>
@@ -140,7 +155,11 @@ const SchemasRenderer = ({ schemaDocuments: { schema, contextSchema } }: Omit<Ex
140
155
  <p>No attributes information provided for this extension point.</p>
141
156
  )}
142
157
 
143
- <h2>Context</h2>
158
+ <HeadingWrapper>
159
+ <Heading size="medium" as="h2">
160
+ Context
161
+ </Heading>
162
+ </HeadingWrapper>
144
163
  {contextDocument ? (
145
164
  <>
146
165
  <p>List of values provided by this extension point as context.</p>
@@ -150,13 +169,21 @@ const SchemasRenderer = ({ schemaDocuments: { schema, contextSchema } }: Omit<Ex
150
169
  <p>No context information provided for this extension point.</p>
151
170
  )}
152
171
 
153
- <h2>Types reference</h2>
172
+ <HeadingWrapper>
173
+ <Heading size="medium" as="h2">
174
+ Types reference
175
+ </Heading>
176
+ </HeadingWrapper>
154
177
  {objectTypeEntries &&
155
178
  objectTypeEntries.map((objectType) => (
156
179
  <React.Fragment key={objectType.name}>
157
- <h3>
158
- <Element name={objectType.name}>{objectType.name}</Element>
159
- </h3>
180
+ <HeadingWrapper>
181
+ <Heading size="small" as="h3">
182
+ {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
183
+ {/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}
184
+ <Element id={objectType.name}>{objectType.name}</Element>
185
+ </Heading>
186
+ </HeadingWrapper>
160
187
  <TypeRenderer objectType={objectType} />
161
188
  </React.Fragment>
162
189
  ))}
@@ -175,11 +202,11 @@ const bodyStyles: React.CSSProperties = {
175
202
  overflowY: 'auto',
176
203
  overflowX: 'hidden',
177
204
  // The rest of the styles are copied from the @atlaskit/modal-dialog/dist/esm/modal-body.js
178
- padding: gridSize() * 3,
205
+ padding: GRID_SIZE * 3,
179
206
  flex: '1 1 auto',
180
207
  };
181
208
 
182
- const CustomModalBody: React.FC = ({ children }) => {
209
+ const CustomModalBody: React.FC<{ children: React.ReactNode }> = ({ children }) => {
183
210
  return (
184
211
  <div id="___cse_info_container" style={bodyStyles}>
185
212
  {children}
@@ -198,7 +225,7 @@ const ExtensionPointInfo: React.FC<ExtensionPointInfoProps> = ({ name, schemaDoc
198
225
  <ModalTransition>
199
226
  {dialogOpen && (
200
227
  <Modal onClose={closeDialog} width="x-large">
201
- <ModalHeader>
228
+ <ModalHeader hasCloseButton>
202
229
  <ModalTitle>{`Extension point: ${name}`}</ModalTitle>
203
230
  </ModalHeader>
204
231
 
@@ -1,4 +1,4 @@
1
- import { mocked } from 'ts-jest/utils';
1
+ import { mocked } from 'jest-mock';
2
2
  import registry from '@atlassian/clientside-extensions-registry';
3
3
  import * as debug from '@atlassian/clientside-extensions-debug';
4
4
  import type { ExtensionAPI, ExtensionDescriptor } from '@atlassian/clientside-extensions-registry';