@atlaskit/renderer 114.11.1 → 114.12.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 (72) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/dist/cjs/react/marks/alignment.js +3 -15
  4. package/dist/cjs/react/nodes/blockCard.js +24 -8
  5. package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +3 -10
  6. package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +8 -53
  7. package/dist/cjs/react/nodes/layoutColumn.js +3 -11
  8. package/dist/cjs/react/nodes/media/index.js +28 -58
  9. package/dist/cjs/react/nodes/panel.js +2 -26
  10. package/dist/cjs/react/nodes/table/colgroup.js +5 -2
  11. package/dist/cjs/react/nodes/table/sticky.js +3 -57
  12. package/dist/cjs/react/nodes/table/table.js +6 -1
  13. package/dist/cjs/react/nodes/table.js +51 -23
  14. package/dist/cjs/react/nodes/tableNew.js +550 -0
  15. package/dist/cjs/ui/Expand.js +12 -62
  16. package/dist/cjs/ui/Renderer/RendererStyleContainer.js +19 -42
  17. package/dist/cjs/ui/Renderer/breakout-ssr.js +22 -22
  18. package/dist/cjs/ui/Renderer/index.js +4 -2
  19. package/dist/cjs/ui/Renderer/style.js +2 -208
  20. package/dist/cjs/ui/annotations/draft/component.js +2 -17
  21. package/dist/cjs/ui/annotations/element/mark.js +12 -61
  22. package/dist/es2019/react/marks/alignment.js +2 -17
  23. package/dist/es2019/react/nodes/blockCard.js +24 -8
  24. package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +2 -39
  25. package/dist/es2019/react/nodes/codeBlock/components/lightWeightCodeBlock.js +5 -50
  26. package/dist/es2019/react/nodes/layoutColumn.js +4 -12
  27. package/dist/es2019/react/nodes/media/index.js +3 -36
  28. package/dist/es2019/react/nodes/panel.js +2 -41
  29. package/dist/es2019/react/nodes/table/colgroup.js +5 -2
  30. package/dist/es2019/react/nodes/table/sticky.js +3 -70
  31. package/dist/es2019/react/nodes/table/table.js +6 -1
  32. package/dist/es2019/react/nodes/table.js +50 -22
  33. package/dist/es2019/react/nodes/tableNew.js +501 -0
  34. package/dist/es2019/ui/Expand.js +11 -67
  35. package/dist/es2019/ui/Renderer/RendererStyleContainer.js +20 -43
  36. package/dist/es2019/ui/Renderer/breakout-ssr.js +22 -22
  37. package/dist/es2019/ui/Renderer/index.js +4 -2
  38. package/dist/es2019/ui/Renderer/style.js +1 -889
  39. package/dist/es2019/ui/annotations/draft/component.js +2 -15
  40. package/dist/es2019/ui/annotations/element/mark.js +9 -71
  41. package/dist/esm/react/marks/alignment.js +2 -16
  42. package/dist/esm/react/nodes/blockCard.js +24 -8
  43. package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +2 -11
  44. package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +7 -52
  45. package/dist/esm/react/nodes/layoutColumn.js +4 -12
  46. package/dist/esm/react/nodes/media/index.js +28 -58
  47. package/dist/esm/react/nodes/panel.js +3 -27
  48. package/dist/esm/react/nodes/table/colgroup.js +5 -2
  49. package/dist/esm/react/nodes/table/sticky.js +3 -57
  50. package/dist/esm/react/nodes/table/table.js +6 -1
  51. package/dist/esm/react/nodes/table.js +51 -21
  52. package/dist/esm/react/nodes/tableNew.js +544 -0
  53. package/dist/esm/ui/Expand.js +12 -62
  54. package/dist/esm/ui/Renderer/RendererStyleContainer.js +20 -43
  55. package/dist/esm/ui/Renderer/breakout-ssr.js +22 -22
  56. package/dist/esm/ui/Renderer/index.js +4 -2
  57. package/dist/esm/ui/Renderer/style.js +1 -203
  58. package/dist/esm/ui/annotations/draft/component.js +2 -17
  59. package/dist/esm/ui/annotations/element/mark.js +9 -56
  60. package/dist/types/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +1 -1
  61. package/dist/types/react/nodes/table.d.ts +35 -254
  62. package/dist/types/react/nodes/tableNew.d.ts +83 -0
  63. package/dist/types/ui/Renderer/breakout-ssr.d.ts +1 -2
  64. package/dist/types/ui/Renderer/style.d.ts +0 -11
  65. package/dist/types/ui/annotations/element/mark.d.ts +30 -6
  66. package/dist/types-ts4.5/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +1 -1
  67. package/dist/types-ts4.5/react/nodes/table.d.ts +35 -254
  68. package/dist/types-ts4.5/react/nodes/tableNew.d.ts +83 -0
  69. package/dist/types-ts4.5/ui/Renderer/breakout-ssr.d.ts +1 -2
  70. package/dist/types-ts4.5/ui/Renderer/style.d.ts +0 -11
  71. package/dist/types-ts4.5/ui/annotations/element/mark.d.ts +30 -6
  72. package/package.json +14 -7
@@ -12,5 +12,5 @@ export declare const LightWeightCodeBlockCssClassName: {
12
12
  * @deprecated styles are moved to RendererStyleContainer
13
13
  */
14
14
  export declare const getLightWeightCodeBlockStylesForRootRendererStyleSheet: () => import("@emotion/react").SerializedStyles;
15
- declare const LightWeightCodeBlock: React.FC<Omit<Pick<CodeBlockProps, "text" | "className" | "codeBidiWarningTooltipEnabled"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
+ declare const LightWeightCodeBlock: React.ForwardRefExoticComponent<Pick<CodeBlockProps, "text" | "className" | "codeBidiWarningTooltipEnabled"> & React.RefAttributes<HTMLDivElement>>;
16
16
  export default LightWeightCodeBlock;
@@ -8,9 +8,19 @@ import type { StickyMode } from './table/sticky';
8
8
  import { OverflowParent } from './table/sticky';
9
9
  import type { SharedTableProps } from './table/types';
10
10
  import { TableStickyScrollbar } from './TableStickyScrollbar';
11
+ export type TableArrayMapped = {
12
+ rowNodes: Array<PMNode | null>;
13
+ rowReact: React.ReactElement;
14
+ };
11
15
  export declare const isTableResizingEnabled: (appearance: RendererAppearance) => boolean;
12
16
  export declare const isStickyScrollbarEnabled: (appearance: RendererAppearance) => boolean;
13
- type TableProps = SharedTableProps & {
17
+ export declare const orderChildren: (children: React.ReactElement[], tableNode: PMNode, smartCardStorage: WithSmartCardStorageProps['smartCardStorage'], tableOrderStatus?: TableOrderStatus) => React.ReactElement[];
18
+ export declare const hasRowspan: (row: PMNode) => boolean;
19
+ export declare const getRefTop: (refElement: HTMLElement) => number;
20
+ export declare const shouldHeaderStick: (scrollTop: number, tableTop: number, tableBottom: number, rowHeight: number) => boolean;
21
+ export declare const shouldHeaderPinBottom: (scrollTop: number, tableBottom: number, rowHeight: number) => boolean;
22
+ export declare const addSortableColumn: (rows: React.ReactElement<any>[], tableOrderStatus: TableOrderStatus | undefined, onSorting: (columnIndex: number, sortOrder: SortOrder) => void) => React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
23
+ export type TableProps = SharedTableProps & {
14
24
  children: React.ReactElement<any> | Array<React.ReactElement<any>>;
15
25
  tableNode?: PMNode;
16
26
  rendererAppearance?: RendererAppearance;
@@ -20,11 +30,13 @@ type TableProps = SharedTableProps & {
20
30
  allowTableResizing?: boolean;
21
31
  isPresentational?: boolean;
22
32
  };
23
- interface TableOrderStatus {
33
+ export declare const isHeaderRowEnabled: (rows: (React.ReactChild | React.ReactFragment | React.ReactPortal)[]) => any;
34
+ export declare const tableCanBeSticky: (node: PMNode | undefined, children: (React.ReactChild | React.ReactFragment | React.ReactPortal)[]) => any;
35
+ export interface TableOrderStatus {
24
36
  columnIndex: number;
25
37
  order: SortOrder;
26
38
  }
27
- interface TableState {
39
+ export interface TableState {
28
40
  stickyMode: StickyMode;
29
41
  wrapperWidth: number;
30
42
  headerRowHeight: number;
@@ -67,282 +79,51 @@ export declare class TableProcessor extends React.Component<TableProps & Overflo
67
79
  private addNumberColumnIndexes;
68
80
  }
69
81
  declare const _default: {
70
- new (props: import("@atlaskit/editor-common/utils").Diff<{
71
- renderWidth?: number | undefined;
72
- } & Omit<SharedTableProps & {
73
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
74
- tableNode?: PMNode | undefined;
75
- rendererAppearance?: RendererAppearance;
76
- allowColumnSorting?: boolean | undefined;
77
- stickyHeaders?: StickyHeaderConfig | undefined;
78
- allowTableAlignment?: boolean | undefined;
79
- allowTableResizing?: boolean | undefined;
80
- isPresentational?: boolean | undefined;
81
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps> | Readonly<import("@atlaskit/editor-common/utils").Diff<{
82
- renderWidth?: number | undefined;
83
- } & Omit<SharedTableProps & {
84
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
85
- tableNode?: PMNode | undefined;
86
- rendererAppearance?: RendererAppearance;
87
- allowColumnSorting?: boolean | undefined;
88
- stickyHeaders?: StickyHeaderConfig | undefined;
89
- allowTableAlignment?: boolean | undefined;
90
- allowTableResizing?: boolean | undefined;
91
- isPresentational?: boolean | undefined;
92
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>): {
82
+ new (props: import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps> | Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>): {
93
83
  render(): React.JSX.Element;
94
84
  context: unknown;
95
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@atlaskit/editor-common/utils").Diff<{
96
- renderWidth?: number | undefined;
97
- } & Omit<SharedTableProps & {
98
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
99
- tableNode?: PMNode | undefined;
100
- rendererAppearance?: RendererAppearance;
101
- allowColumnSorting?: boolean | undefined;
102
- stickyHeaders?: StickyHeaderConfig | undefined;
103
- allowTableAlignment?: boolean | undefined;
104
- allowTableResizing?: boolean | undefined;
105
- isPresentational?: boolean | undefined;
106
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
85
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
107
86
  forceUpdate(callback?: (() => void) | undefined): void;
108
- readonly props: Readonly<import("@atlaskit/editor-common/utils").Diff<{
109
- renderWidth?: number | undefined;
110
- } & Omit<SharedTableProps & {
111
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
112
- tableNode?: PMNode | undefined;
113
- rendererAppearance?: RendererAppearance;
114
- allowColumnSorting?: boolean | undefined;
115
- stickyHeaders?: StickyHeaderConfig | undefined;
116
- allowTableAlignment?: boolean | undefined;
117
- allowTableResizing?: boolean | undefined;
118
- isPresentational?: boolean | undefined;
119
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>;
87
+ readonly props: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>;
120
88
  state: Readonly<{}>;
121
89
  refs: {
122
90
  [key: string]: React.ReactInstance;
123
91
  };
124
92
  componentDidMount?(): void;
125
- shouldComponentUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
126
- renderWidth?: number | undefined;
127
- } & Omit<SharedTableProps & {
128
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
129
- tableNode?: PMNode | undefined;
130
- rendererAppearance?: RendererAppearance;
131
- allowColumnSorting?: boolean | undefined;
132
- stickyHeaders?: StickyHeaderConfig | undefined;
133
- allowTableAlignment?: boolean | undefined;
134
- allowTableResizing?: boolean | undefined;
135
- isPresentational?: boolean | undefined;
136
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): boolean;
93
+ shouldComponentUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): boolean;
137
94
  componentWillUnmount?(): void;
138
95
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
139
- getSnapshotBeforeUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
140
- renderWidth?: number | undefined;
141
- } & Omit<SharedTableProps & {
142
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
143
- tableNode?: PMNode | undefined;
144
- rendererAppearance?: RendererAppearance;
145
- allowColumnSorting?: boolean | undefined;
146
- stickyHeaders?: StickyHeaderConfig | undefined;
147
- allowTableAlignment?: boolean | undefined;
148
- allowTableResizing?: boolean | undefined;
149
- isPresentational?: boolean | undefined;
150
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, prevState: Readonly<{}>): any;
151
- componentDidUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
152
- renderWidth?: number | undefined;
153
- } & Omit<SharedTableProps & {
154
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
155
- tableNode?: PMNode | undefined;
156
- rendererAppearance?: RendererAppearance;
157
- allowColumnSorting?: boolean | undefined;
158
- stickyHeaders?: StickyHeaderConfig | undefined;
159
- allowTableAlignment?: boolean | undefined;
160
- allowTableResizing?: boolean | undefined;
161
- isPresentational?: boolean | undefined;
162
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, prevState: Readonly<{}>, snapshot?: any): void;
96
+ getSnapshotBeforeUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, prevState: Readonly<{}>): any;
97
+ componentDidUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, prevState: Readonly<{}>, snapshot?: any): void;
163
98
  componentWillMount?(): void;
164
99
  UNSAFE_componentWillMount?(): void;
165
- componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
166
- renderWidth?: number | undefined;
167
- } & Omit<SharedTableProps & {
168
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
169
- tableNode?: PMNode | undefined;
170
- rendererAppearance?: RendererAppearance;
171
- allowColumnSorting?: boolean | undefined;
172
- stickyHeaders?: StickyHeaderConfig | undefined;
173
- allowTableAlignment?: boolean | undefined;
174
- allowTableResizing?: boolean | undefined;
175
- isPresentational?: boolean | undefined;
176
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextContext: any): void;
177
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
178
- renderWidth?: number | undefined;
179
- } & Omit<SharedTableProps & {
180
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
181
- tableNode?: PMNode | undefined;
182
- rendererAppearance?: RendererAppearance;
183
- allowColumnSorting?: boolean | undefined;
184
- stickyHeaders?: StickyHeaderConfig | undefined;
185
- allowTableAlignment?: boolean | undefined;
186
- allowTableResizing?: boolean | undefined;
187
- isPresentational?: boolean | undefined;
188
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextContext: any): void;
189
- componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
190
- renderWidth?: number | undefined;
191
- } & Omit<SharedTableProps & {
192
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
193
- tableNode?: PMNode | undefined;
194
- rendererAppearance?: RendererAppearance;
195
- allowColumnSorting?: boolean | undefined;
196
- stickyHeaders?: StickyHeaderConfig | undefined;
197
- allowTableAlignment?: boolean | undefined;
198
- allowTableResizing?: boolean | undefined;
199
- isPresentational?: boolean | undefined;
200
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
201
- UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
202
- renderWidth?: number | undefined;
203
- } & Omit<SharedTableProps & {
204
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
205
- tableNode?: PMNode | undefined;
206
- rendererAppearance?: RendererAppearance;
207
- allowColumnSorting?: boolean | undefined;
208
- stickyHeaders?: StickyHeaderConfig | undefined;
209
- allowTableAlignment?: boolean | undefined;
210
- allowTableResizing?: boolean | undefined;
211
- isPresentational?: boolean | undefined;
212
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
100
+ componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextContext: any): void;
101
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextContext: any): void;
102
+ componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
103
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
213
104
  };
214
- new (props: import("@atlaskit/editor-common/utils").Diff<{
215
- renderWidth?: number | undefined;
216
- } & Omit<SharedTableProps & {
217
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
218
- tableNode?: PMNode | undefined;
219
- rendererAppearance?: RendererAppearance;
220
- allowColumnSorting?: boolean | undefined;
221
- stickyHeaders?: StickyHeaderConfig | undefined;
222
- allowTableAlignment?: boolean | undefined;
223
- allowTableResizing?: boolean | undefined;
224
- isPresentational?: boolean | undefined;
225
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>, context: any): {
105
+ new (props: import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>, context: any): {
226
106
  render(): React.JSX.Element;
227
107
  context: unknown;
228
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@atlaskit/editor-common/utils").Diff<{
229
- renderWidth?: number | undefined;
230
- } & Omit<SharedTableProps & {
231
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
232
- tableNode?: PMNode | undefined;
233
- rendererAppearance?: RendererAppearance;
234
- allowColumnSorting?: boolean | undefined;
235
- stickyHeaders?: StickyHeaderConfig | undefined;
236
- allowTableAlignment?: boolean | undefined;
237
- allowTableResizing?: boolean | undefined;
238
- isPresentational?: boolean | undefined;
239
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
108
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
240
109
  forceUpdate(callback?: (() => void) | undefined): void;
241
- readonly props: Readonly<import("@atlaskit/editor-common/utils").Diff<{
242
- renderWidth?: number | undefined;
243
- } & Omit<SharedTableProps & {
244
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
245
- tableNode?: PMNode | undefined;
246
- rendererAppearance?: RendererAppearance;
247
- allowColumnSorting?: boolean | undefined;
248
- stickyHeaders?: StickyHeaderConfig | undefined;
249
- allowTableAlignment?: boolean | undefined;
250
- allowTableResizing?: boolean | undefined;
251
- isPresentational?: boolean | undefined;
252
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>;
110
+ readonly props: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>;
253
111
  state: Readonly<{}>;
254
112
  refs: {
255
113
  [key: string]: React.ReactInstance;
256
114
  };
257
115
  componentDidMount?(): void;
258
- shouldComponentUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
259
- renderWidth?: number | undefined;
260
- } & Omit<SharedTableProps & {
261
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
262
- tableNode?: PMNode | undefined;
263
- rendererAppearance?: RendererAppearance;
264
- allowColumnSorting?: boolean | undefined;
265
- stickyHeaders?: StickyHeaderConfig | undefined;
266
- allowTableAlignment?: boolean | undefined;
267
- allowTableResizing?: boolean | undefined;
268
- isPresentational?: boolean | undefined;
269
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): boolean;
116
+ shouldComponentUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): boolean;
270
117
  componentWillUnmount?(): void;
271
118
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
272
- getSnapshotBeforeUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
273
- renderWidth?: number | undefined;
274
- } & Omit<SharedTableProps & {
275
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
276
- tableNode?: PMNode | undefined;
277
- rendererAppearance?: RendererAppearance;
278
- allowColumnSorting?: boolean | undefined;
279
- stickyHeaders?: StickyHeaderConfig | undefined;
280
- allowTableAlignment?: boolean | undefined;
281
- allowTableResizing?: boolean | undefined;
282
- isPresentational?: boolean | undefined;
283
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, prevState: Readonly<{}>): any;
284
- componentDidUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
285
- renderWidth?: number | undefined;
286
- } & Omit<SharedTableProps & {
287
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
288
- tableNode?: PMNode | undefined;
289
- rendererAppearance?: RendererAppearance;
290
- allowColumnSorting?: boolean | undefined;
291
- stickyHeaders?: StickyHeaderConfig | undefined;
292
- allowTableAlignment?: boolean | undefined;
293
- allowTableResizing?: boolean | undefined;
294
- isPresentational?: boolean | undefined;
295
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, prevState: Readonly<{}>, snapshot?: any): void;
119
+ getSnapshotBeforeUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, prevState: Readonly<{}>): any;
120
+ componentDidUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, prevState: Readonly<{}>, snapshot?: any): void;
296
121
  componentWillMount?(): void;
297
122
  UNSAFE_componentWillMount?(): void;
298
- componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
299
- renderWidth?: number | undefined;
300
- } & Omit<SharedTableProps & {
301
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
302
- tableNode?: PMNode | undefined;
303
- rendererAppearance?: RendererAppearance;
304
- allowColumnSorting?: boolean | undefined;
305
- stickyHeaders?: StickyHeaderConfig | undefined;
306
- allowTableAlignment?: boolean | undefined;
307
- allowTableResizing?: boolean | undefined;
308
- isPresentational?: boolean | undefined;
309
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextContext: any): void;
310
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
311
- renderWidth?: number | undefined;
312
- } & Omit<SharedTableProps & {
313
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
314
- tableNode?: PMNode | undefined;
315
- rendererAppearance?: RendererAppearance;
316
- allowColumnSorting?: boolean | undefined;
317
- stickyHeaders?: StickyHeaderConfig | undefined;
318
- allowTableAlignment?: boolean | undefined;
319
- allowTableResizing?: boolean | undefined;
320
- isPresentational?: boolean | undefined;
321
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextContext: any): void;
322
- componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
323
- renderWidth?: number | undefined;
324
- } & Omit<SharedTableProps & {
325
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
326
- tableNode?: PMNode | undefined;
327
- rendererAppearance?: RendererAppearance;
328
- allowColumnSorting?: boolean | undefined;
329
- stickyHeaders?: StickyHeaderConfig | undefined;
330
- allowTableAlignment?: boolean | undefined;
331
- allowTableResizing?: boolean | undefined;
332
- isPresentational?: boolean | undefined;
333
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
334
- UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
335
- renderWidth?: number | undefined;
336
- } & Omit<SharedTableProps & {
337
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
338
- tableNode?: PMNode | undefined;
339
- rendererAppearance?: RendererAppearance;
340
- allowColumnSorting?: boolean | undefined;
341
- stickyHeaders?: StickyHeaderConfig | undefined;
342
- allowTableAlignment?: boolean | undefined;
343
- allowTableResizing?: boolean | undefined;
344
- isPresentational?: boolean | undefined;
345
- } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
123
+ componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextContext: any): void;
124
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextContext: any): void;
125
+ componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
126
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
346
127
  };
347
128
  contextType?: React.Context<any> | undefined;
348
129
  };
@@ -0,0 +1,83 @@
1
+ import React from 'react';
2
+ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
+ import type { TableLayout } from '@atlaskit/adf-schema';
4
+ import type { OverflowShadowProps } from '@atlaskit/editor-common/ui';
5
+ import { SortOrder } from '@atlaskit/editor-common/types';
6
+ import type { RendererAppearance, StickyHeaderConfig } from '../../ui/Renderer/types';
7
+ import type { WithSmartCardStorageProps } from '../../ui/SmartCardStorage';
8
+ import type { StickyMode } from './table/sticky';
9
+ import { OverflowParent } from './table/sticky';
10
+ import type { SharedTableProps } from './table/types';
11
+ import { TableStickyScrollbar } from './TableStickyScrollbar';
12
+ export type TableArrayMapped = {
13
+ rowNodes: Array<PMNode | null>;
14
+ rowReact: React.ReactElement;
15
+ };
16
+ export declare const isTableResizingEnabled: (appearance: RendererAppearance) => boolean;
17
+ export declare const isStickyScrollbarEnabled: (appearance: RendererAppearance) => boolean;
18
+ export declare const orderChildren: (children: React.ReactElement[], tableNode: PMNode, smartCardStorage: WithSmartCardStorageProps['smartCardStorage'], tableOrderStatus?: TableOrderStatus) => React.ReactElement[];
19
+ export declare const hasRowspan: (row: PMNode) => boolean;
20
+ export declare const getRefTop: (refElement: HTMLElement) => number;
21
+ export declare const shouldHeaderStick: (scrollTop: number, tableTop: number, tableBottom: number, rowHeight: number) => boolean;
22
+ export declare const shouldHeaderPinBottom: (scrollTop: number, tableBottom: number, rowHeight: number) => boolean;
23
+ export declare const addSortableColumn: (rows: React.ReactElement<any>[], tableOrderStatus: TableOrderStatus | undefined, onSorting: (columnIndex: number, sortOrder: SortOrder) => void) => React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
24
+ export type TableProps = SharedTableProps & {
25
+ children: React.ReactElement<any> | Array<React.ReactElement<any>>;
26
+ tableNode?: PMNode;
27
+ rendererAppearance?: RendererAppearance;
28
+ allowColumnSorting?: boolean;
29
+ stickyHeaders?: StickyHeaderConfig;
30
+ allowTableAlignment?: boolean;
31
+ allowTableResizing?: boolean;
32
+ isPresentational?: boolean;
33
+ };
34
+ export declare const isHeaderRowEnabled: (rows: (React.ReactChild | React.ReactFragment | React.ReactPortal)[]) => any;
35
+ export declare const tableCanBeSticky: (node: PMNode | undefined, children: (React.ReactChild | React.ReactFragment | React.ReactPortal)[]) => any;
36
+ export interface TableOrderStatus {
37
+ columnIndex: number;
38
+ order: SortOrder;
39
+ }
40
+ export interface TableState {
41
+ stickyMode: StickyMode;
42
+ wrapperWidth: number;
43
+ headerRowHeight: number;
44
+ }
45
+ export declare class TableContainer extends React.Component<TableProps & OverflowShadowProps & WithSmartCardStorageProps, TableState> {
46
+ state: TableState;
47
+ tableRef: React.RefObject<HTMLTableElement>;
48
+ stickyHeaderRef: React.RefObject<HTMLElement>;
49
+ stickyScrollbarRef: React.RefObject<HTMLDivElement>;
50
+ stickyWrapperRef: React.RefObject<HTMLDivElement>;
51
+ wrapperRef: React.RefObject<HTMLDivElement>;
52
+ stickyScrollbar?: TableStickyScrollbar;
53
+ nextFrame: number | undefined;
54
+ overflowParent: OverflowParent | null;
55
+ updatedLayout: TableLayout | 'custom';
56
+ private resizeObserver;
57
+ private applyResizerChange;
58
+ componentDidMount(): void;
59
+ componentDidUpdate(prevProps: TableProps, prevState: TableState): void;
60
+ componentWillUnmount: () => void;
61
+ getScrollTop: () => number;
62
+ updateSticky: () => void;
63
+ onScroll: () => void;
64
+ onWrapperScrolled: () => void;
65
+ get pinTop(): number | undefined;
66
+ get shouldAddOverflowParentOffsetTop_DO_NOT_USE(): boolean | null | undefined;
67
+ get stickyTop(): number | undefined;
68
+ render(): React.JSX.Element;
69
+ private grabFirstRowRef;
70
+ }
71
+ type TableProcessorState = {
72
+ tableOrderStatus?: TableOrderStatus;
73
+ };
74
+ export declare class TableProcessorWithContainerStyles extends React.Component<TableProps & OverflowShadowProps & WithSmartCardStorageProps, TableProcessorState> {
75
+ state: {
76
+ tableOrderStatus: undefined;
77
+ };
78
+ render(): React.JSX.Element | null;
79
+ private addSortableColumn;
80
+ private changeSortOrder;
81
+ private addNumberColumnIndexes;
82
+ }
83
+ export {};
@@ -7,12 +7,11 @@ declare global {
7
7
  /**
8
8
  * Inline Script that updates breakout node width on client side,
9
9
  * before main JavaScript bundle is ready.
10
- *
11
10
  * More info: https://product-fabric.atlassian.net/wiki/spaces/E/pages/1216218119/Renderer+SSR+for+Breakout+Nodes
12
11
  */
13
12
  export declare function BreakoutSSRInlineScript({ noOpSSRInlineScript }: {
14
13
  noOpSSRInlineScript: Boolean;
15
14
  }): React.JSX.Element | null;
16
- export declare function createBreakoutInlineScript(id: number): string;
15
+ export declare function createBreakoutInlineScript(id: number, optionalFlagArg?: boolean): string;
17
16
  export declare const breakoutInlineScriptContext: string;
18
17
  export declare const calcLineLength: any;
@@ -1,13 +1,2 @@
1
- import type { RendererAppearance } from './types';
2
1
  export declare const FullPagePadding = 32;
3
- type RendererWrapperProps = {
4
- allowAnnotations?: boolean;
5
- appearance?: RendererAppearance;
6
- allowNestedHeaderLinks: boolean;
7
- allowColumnSorting: boolean;
8
- useBlockRenderForCodeBlock: boolean;
9
- allowTableResizing?: boolean;
10
- };
11
2
  export declare const TELEPOINTER_ID = "ai-streaming-telepointer";
12
- export declare const rendererStyles: (wrapperProps: RendererWrapperProps) => (theme: any) => import("@emotion/react").SerializedStyles;
13
- export {};
@@ -17,7 +17,11 @@ type MarkComponentProps = {
17
17
  useBlockLevel?: boolean;
18
18
  };
19
19
  export declare const MarkComponent: ({ annotationParentIds, children, dataAttributes, id, state, hasFocus, isHovered, onClick, useBlockLevel, }: React.PropsWithChildren<MarkComponentProps>) => React.ReactElement<{
20
- css?: {}[] | undefined;
20
+ css?: (false | import("@emotion/react").SerializedStyles)[] | undefined;
21
+ style?: {
22
+ '--ak-renderer-annotation-startmarker': string;
23
+ '--ak-renderer-annotation-endmarker': string;
24
+ } | undefined;
21
25
  'data-mark-type': string;
22
26
  'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
23
27
  'data-id': string;
@@ -25,7 +29,11 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
25
29
  'aria-disabled': boolean;
26
30
  id: string;
27
31
  } | {
28
- css?: {}[] | undefined;
32
+ css?: (false | import("@emotion/react").SerializedStyles)[] | undefined;
33
+ style?: {
34
+ '--ak-renderer-annotation-startmarker': string;
35
+ '--ak-renderer-annotation-endmarker': string;
36
+ } | undefined;
29
37
  'data-mark-annotation-state': AnnotationMarkStates;
30
38
  'data-has-focus': boolean;
31
39
  'data-is-hovered': boolean;
@@ -35,7 +43,11 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
35
43
  'aria-disabled': boolean;
36
44
  id: string;
37
45
  } | {
38
- css?: {}[] | undefined;
46
+ css?: (false | import("@emotion/react").SerializedStyles)[] | undefined;
47
+ style?: {
48
+ '--ak-renderer-annotation-startmarker': string;
49
+ '--ak-renderer-annotation-endmarker': string;
50
+ } | undefined;
39
51
  'data-mark-type': string;
40
52
  'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
41
53
  'data-id': string;
@@ -48,7 +60,11 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
48
60
  'aria-disabled'?: undefined;
49
61
  id: string;
50
62
  } | {
51
- css?: {}[] | undefined;
63
+ css?: (false | import("@emotion/react").SerializedStyles)[] | undefined;
64
+ style?: {
65
+ '--ak-renderer-annotation-startmarker': string;
66
+ '--ak-renderer-annotation-endmarker': string;
67
+ } | undefined;
52
68
  'data-mark-annotation-state': AnnotationMarkStates;
53
69
  'data-has-focus': boolean;
54
70
  'data-is-hovered': boolean;
@@ -63,7 +79,11 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
63
79
  'aria-disabled'?: undefined;
64
80
  id: string;
65
81
  } | {
66
- css?: {}[] | undefined;
82
+ css?: (false | import("@emotion/react").SerializedStyles)[] | undefined;
83
+ style?: {
84
+ '--ak-renderer-annotation-startmarker': string;
85
+ '--ak-renderer-annotation-endmarker': string;
86
+ } | undefined;
67
87
  'data-mark-type': string;
68
88
  'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
69
89
  'data-id': string;
@@ -76,7 +96,11 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
76
96
  'aria-disabled'?: undefined;
77
97
  id: string;
78
98
  } | {
79
- css?: {}[] | undefined;
99
+ css?: (false | import("@emotion/react").SerializedStyles)[] | undefined;
100
+ style?: {
101
+ '--ak-renderer-annotation-startmarker': string;
102
+ '--ak-renderer-annotation-endmarker': string;
103
+ } | undefined;
80
104
  'data-mark-annotation-state': AnnotationMarkStates;
81
105
  'data-has-focus': boolean;
82
106
  'data-is-hovered': boolean;
@@ -12,5 +12,5 @@ export declare const LightWeightCodeBlockCssClassName: {
12
12
  * @deprecated styles are moved to RendererStyleContainer
13
13
  */
14
14
  export declare const getLightWeightCodeBlockStylesForRootRendererStyleSheet: () => import("@emotion/react").SerializedStyles;
15
- declare const LightWeightCodeBlock: React.FC<Omit<Pick<CodeBlockProps, "text" | "className" | "codeBidiWarningTooltipEnabled"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
+ declare const LightWeightCodeBlock: React.ForwardRefExoticComponent<Pick<CodeBlockProps, "text" | "className" | "codeBidiWarningTooltipEnabled"> & React.RefAttributes<HTMLDivElement>>;
16
16
  export default LightWeightCodeBlock;