@atlaskit/editor-plugin-table 7.6.2 → 7.6.4

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 (119) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/commands/misc.js +3 -2
  3. package/dist/cjs/nodeviews/TableComponent.js +25 -11
  4. package/dist/cjs/nodeviews/TableComponentWithSharedState.js +87 -0
  5. package/dist/cjs/nodeviews/TableContainer.js +37 -21
  6. package/dist/cjs/nodeviews/TableResizer.js +40 -29
  7. package/dist/cjs/nodeviews/table.js +21 -1
  8. package/dist/cjs/plugin.js +25 -2
  9. package/dist/cjs/toolbar.js +5 -4
  10. package/dist/cjs/types.js +3 -0
  11. package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +16 -16
  12. package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +3 -3
  13. package/dist/cjs/ui/FloatingDragMenu/DropdownMenu.js +21 -28
  14. package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +6 -2
  15. package/dist/cjs/ui/TableFloatingColumnControls/index.js +5 -2
  16. package/dist/cjs/ui/TableFloatingControls/CornerControls/DragCornerControls.js +48 -1
  17. package/dist/cjs/ui/TableFloatingControls/CornerControls/index.js +6 -0
  18. package/dist/cjs/ui/TableFloatingControls/FloatingControlsWithSelection.js +47 -0
  19. package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +3 -2
  20. package/dist/cjs/ui/TableFloatingControls/index.js +25 -3
  21. package/dist/cjs/ui/common-styles.js +11 -6
  22. package/dist/cjs/utils/guidelines.js +1 -1
  23. package/dist/es2019/commands/misc.js +6 -2
  24. package/dist/es2019/nodeviews/TableComponent.js +27 -12
  25. package/dist/es2019/nodeviews/TableComponentWithSharedState.js +83 -0
  26. package/dist/es2019/nodeviews/TableContainer.js +24 -6
  27. package/dist/es2019/nodeviews/TableResizer.js +27 -19
  28. package/dist/es2019/nodeviews/table.js +21 -1
  29. package/dist/es2019/plugin.js +26 -3
  30. package/dist/es2019/toolbar.js +5 -4
  31. package/dist/es2019/types.js +3 -0
  32. package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +16 -16
  33. package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +3 -3
  34. package/dist/es2019/ui/FloatingDragMenu/DropdownMenu.js +20 -27
  35. package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +7 -2
  36. package/dist/es2019/ui/TableFloatingColumnControls/index.js +5 -2
  37. package/dist/es2019/ui/TableFloatingControls/CornerControls/DragCornerControls.js +55 -0
  38. package/dist/es2019/ui/TableFloatingControls/CornerControls/index.js +1 -1
  39. package/dist/es2019/ui/TableFloatingControls/FloatingControlsWithSelection.js +42 -0
  40. package/dist/es2019/ui/TableFloatingControls/RowControls/ClassicControls.js +3 -2
  41. package/dist/es2019/ui/TableFloatingControls/index.js +26 -4
  42. package/dist/es2019/ui/common-styles.js +589 -588
  43. package/dist/es2019/utils/guidelines.js +1 -1
  44. package/dist/esm/commands/misc.js +3 -2
  45. package/dist/esm/nodeviews/TableComponent.js +25 -11
  46. package/dist/esm/nodeviews/TableComponentWithSharedState.js +80 -0
  47. package/dist/esm/nodeviews/TableContainer.js +37 -21
  48. package/dist/esm/nodeviews/TableResizer.js +41 -30
  49. package/dist/esm/nodeviews/table.js +21 -1
  50. package/dist/esm/plugin.js +26 -3
  51. package/dist/esm/toolbar.js +5 -4
  52. package/dist/esm/types.js +3 -0
  53. package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +16 -16
  54. package/dist/esm/ui/FloatingDragMenu/DragMenu.js +3 -3
  55. package/dist/esm/ui/FloatingDragMenu/DropdownMenu.js +21 -28
  56. package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +6 -2
  57. package/dist/esm/ui/TableFloatingColumnControls/index.js +5 -2
  58. package/dist/esm/ui/TableFloatingControls/CornerControls/DragCornerControls.js +47 -0
  59. package/dist/esm/ui/TableFloatingControls/CornerControls/index.js +1 -1
  60. package/dist/esm/ui/TableFloatingControls/FloatingControlsWithSelection.js +40 -0
  61. package/dist/esm/ui/TableFloatingControls/RowControls/ClassicControls.js +3 -2
  62. package/dist/esm/ui/TableFloatingControls/index.js +26 -4
  63. package/dist/esm/ui/common-styles.js +10 -5
  64. package/dist/esm/utils/guidelines.js +1 -1
  65. package/dist/types/commands/misc.d.ts +2 -1
  66. package/dist/types/nodeviews/TableComponent.d.ts +7 -2
  67. package/dist/types/nodeviews/TableComponentWithSharedState.d.ts +27 -0
  68. package/dist/types/nodeviews/TableContainer.d.ts +4 -2
  69. package/dist/types/nodeviews/TableResizer.d.ts +4 -1
  70. package/dist/types/nodeviews/types.d.ts +1 -0
  71. package/dist/types/plugin.d.ts +11 -7
  72. package/dist/types/types.d.ts +13 -4
  73. package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +113 -1
  74. package/dist/types/ui/TableFloatingColumnControls/index.d.ts +3 -2
  75. package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +223 -0
  76. package/dist/types/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
  77. package/dist/types/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +20 -0
  78. package/dist/types/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +2 -0
  79. package/dist/types/ui/TableFloatingControls/index.d.ts +113 -1
  80. package/dist/types/ui/common-styles.d.ts +3 -0
  81. package/dist/types-ts4.5/commands/misc.d.ts +2 -1
  82. package/dist/types-ts4.5/nodeviews/TableComponent.d.ts +7 -2
  83. package/dist/types-ts4.5/nodeviews/TableComponentWithSharedState.d.ts +27 -0
  84. package/dist/types-ts4.5/nodeviews/TableContainer.d.ts +4 -2
  85. package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +4 -1
  86. package/dist/types-ts4.5/nodeviews/types.d.ts +1 -0
  87. package/dist/types-ts4.5/plugin.d.ts +11 -7
  88. package/dist/types-ts4.5/types.d.ts +13 -4
  89. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +144 -1
  90. package/dist/types-ts4.5/ui/TableFloatingColumnControls/index.d.ts +3 -2
  91. package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +285 -0
  92. package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
  93. package/dist/types-ts4.5/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +20 -0
  94. package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +2 -0
  95. package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +144 -1
  96. package/dist/types-ts4.5/ui/common-styles.d.ts +3 -0
  97. package/package.json +6 -6
  98. package/src/commands/misc.ts +6 -3
  99. package/src/nodeviews/TableComponent.tsx +36 -7
  100. package/src/nodeviews/TableComponentWithSharedState.tsx +125 -0
  101. package/src/nodeviews/TableContainer.tsx +24 -3
  102. package/src/nodeviews/TableResizer.tsx +36 -21
  103. package/src/nodeviews/table.tsx +22 -1
  104. package/src/nodeviews/types.ts +1 -0
  105. package/src/plugin.tsx +47 -6
  106. package/src/toolbar.tsx +20 -19
  107. package/src/types.ts +33 -4
  108. package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +66 -112
  109. package/src/ui/FloatingDragMenu/DragMenu.tsx +3 -12
  110. package/src/ui/FloatingDragMenu/DropdownMenu.tsx +19 -28
  111. package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +10 -2
  112. package/src/ui/TableFloatingColumnControls/index.tsx +13 -1
  113. package/src/ui/TableFloatingControls/CornerControls/DragCornerControls.tsx +58 -0
  114. package/src/ui/TableFloatingControls/CornerControls/index.tsx +4 -1
  115. package/src/ui/TableFloatingControls/FloatingControlsWithSelection.tsx +68 -0
  116. package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +4 -1
  117. package/src/ui/TableFloatingControls/index.tsx +42 -8
  118. package/src/ui/common-styles.ts +611 -610
  119. package/src/utils/guidelines.ts +5 -4
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
+ import type { TablePlugin } from '../../plugin';
5
+ type FloatingControlsWithSelectionProps = {
6
+ editorView: EditorView;
7
+ tableRef: HTMLTableElement;
8
+ isInDanger?: boolean;
9
+ isResizing?: boolean;
10
+ isHeaderRowEnabled?: boolean;
11
+ isHeaderColumnEnabled?: boolean;
12
+ hoveredRows?: number[];
13
+ stickyTop?: number;
14
+ hoverRows: (rows: number[]) => void;
15
+ selectRow: (row: number, expand: boolean) => void;
16
+ tableActive: boolean;
17
+ api?: ExtractInjectionAPI<TablePlugin>;
18
+ };
19
+ export declare const FloatingControlsWithSelection: ({ editorView, tableRef, isInDanger, isResizing, isHeaderRowEnabled, isHeaderColumnEnabled, hoveredRows, stickyTop, hoverRows, selectRow, tableActive, api, }: FloatingControlsWithSelectionProps) => JSX.Element;
20
+ export {};
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { WrappedComponentProps } from 'react-intl-next';
3
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
3
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
5
  export interface Props {
5
6
  editorView: EditorView;
@@ -11,6 +12,7 @@ export interface Props {
11
12
  isResizing?: boolean;
12
13
  insertRowButtonIndex?: number;
13
14
  stickyTop?: number;
15
+ selection?: Selection;
14
16
  }
15
17
  export declare const RowControls: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
16
18
  WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
@@ -1,8 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import type { TableColumnOrdering } from '@atlaskit/custom-steps';
3
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
4
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
4
5
  import type { Selection } from '@atlaskit/editor-prosemirror/state';
5
6
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
+ import type { TablePlugin } from '../../plugin';
6
8
  import type { RowStickyState } from '../../pm-plugins/sticky-headers';
7
9
  import type { CellHoverMeta } from '../../types';
8
10
  export interface TableFloatingControlsProps {
@@ -27,5 +29,115 @@ export interface TableFloatingControlsProps {
27
29
  insertRowButtonIndex?: number;
28
30
  tableWrapperWidth?: number;
29
31
  }
30
- export declare const TableFloatingControls: ({ editorView, tableRef, tableNode, isInDanger, isResizing, isNumberColumnEnabled, isHeaderRowEnabled, isHeaderColumnEnabled, tableActive, hasHeaderRow, hoveredRows, stickyHeader, isDragAndDropEnabled, hoveredCell, isTableHovered, tableWrapperWidth, }: TableFloatingControlsProps) => JSX.Element | null;
32
+ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode, isInDanger, isResizing, isNumberColumnEnabled, isHeaderRowEnabled, isHeaderColumnEnabled, tableActive, hasHeaderRow, hoveredRows, stickyHeader, isDragAndDropEnabled, hoveredCell, isTableHovered, tableWrapperWidth, api, }: TableFloatingControlsProps & {
33
+ api?: import("@atlaskit/editor-common/types").PublicPluginAPI<[import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"table", {
34
+ pluginConfiguration: import("../../plugin").TablePluginOptions | undefined;
35
+ actions: {
36
+ insertTable: (analyticsPayload: import("@atlaskit/editor-common/analytics").AnalyticsEventPayload) => import("@atlaskit/editor-common/types").Command;
37
+ };
38
+ sharedState?: import("../../types").TableSharedState | undefined;
39
+ commands: {
40
+ insertTableWithSize: (rowsCount: number, colsCount: number, inputMethod?: import("@atlaskit/editor-common/analytics").INPUT_METHOD.PICKER | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
41
+ };
42
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
43
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
44
+ sharedState: {
45
+ createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
46
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
47
+ performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
48
+ };
49
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
50
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
51
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
52
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
53
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
54
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contentInsertion", {
55
+ actions: import("@atlaskit/editor-plugin-content-insertion").InsertNodeAPI;
56
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
57
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
58
+ sharedState: {
59
+ createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
60
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
61
+ performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
62
+ };
63
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
64
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
65
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
66
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
67
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
68
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>];
69
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
70
+ sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
71
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"guideline", {
72
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
73
+ sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
74
+ }, undefined>];
75
+ sharedState: import("@atlaskit/editor-common/guideline").GuidelinePluginState | null;
76
+ actions: {
77
+ displayGuideline: import("@atlaskit/editor-common/guideline").DisplayGuideline;
78
+ };
79
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
80
+ pluginConfiguration: import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined;
81
+ actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
82
+ commands: {
83
+ displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
84
+ };
85
+ sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
86
+ }, import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"media", {
87
+ pluginConfiguration: any;
88
+ dependencies: any;
89
+ sharedState: any;
90
+ actions: any;
91
+ }, any>>];
92
+ }, import("../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
93
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
94
+ sharedState: {
95
+ createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
96
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
97
+ performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
98
+ };
99
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
100
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
101
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
102
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
103
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
104
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contentInsertion", {
105
+ actions: import("@atlaskit/editor-plugin-content-insertion").InsertNodeAPI;
106
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
107
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
108
+ sharedState: {
109
+ createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
110
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
111
+ performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
112
+ };
113
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
114
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
115
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
116
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
117
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
118
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>];
119
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
120
+ sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
121
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"guideline", {
122
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
123
+ sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
124
+ }, undefined>];
125
+ sharedState: import("@atlaskit/editor-common/guideline").GuidelinePluginState | null;
126
+ actions: {
127
+ displayGuideline: import("@atlaskit/editor-common/guideline").DisplayGuideline;
128
+ };
129
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
130
+ pluginConfiguration: import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined;
131
+ actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
132
+ commands: {
133
+ displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
134
+ };
135
+ sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
136
+ }, import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"media", {
137
+ pluginConfiguration: any;
138
+ dependencies: any;
139
+ sharedState: any;
140
+ actions: any;
141
+ }, any>>]> | undefined;
142
+ }) => JSX.Element | null;
31
143
  export default TableFloatingControls;
@@ -1,6 +1,9 @@
1
1
  import type { FeatureFlags } from '@atlaskit/editor-common/types';
2
2
  export declare const insertColumnButtonOffset: number;
3
3
  export declare const tableRowHeight = 44;
4
+ export declare const baseTableStyles: (props: {
5
+ featureFlags?: FeatureFlags;
6
+ }) => import("@emotion/react").SerializedStyles;
4
7
  export declare const tableStyles: (props: {
5
8
  featureFlags?: FeatureFlags;
6
9
  }) => import("@emotion/react").SerializedStyles;
@@ -3,6 +3,7 @@ import type { Node as PMNode, Schema, Slice } from '@atlaskit/editor-prosemirror
3
3
  import type { EditorState, Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
4
4
  import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
5
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
+ import type { WidthToWidest } from '../types';
6
7
  export declare const setEditorFocus: (editorHasFocus: boolean) => Command;
7
8
  export declare const setTableRef: (ref?: HTMLTableElement) => Command;
8
9
  export declare const setCellAttr: (name: string, value: any) => Command;
@@ -33,4 +34,4 @@ export declare const autoSizeTable: (view: EditorView, node: PMNode, table: HTML
33
34
  containerWidth: number;
34
35
  }) => boolean;
35
36
  export declare const addBoldInEmptyHeaderCells: (tableCellHeader: ContentNodeWithPos) => Command;
36
- export declare const updateWidthToWidest: (widthToWidest: boolean) => Command;
37
+ export declare const updateWidthToWidest: (widthToWidest: WidthToWidest) => Command;
@@ -6,7 +6,7 @@ import type { EditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/edit
6
6
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
7
7
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
8
  import type { RowStickyState, StickyPluginState } from '../pm-plugins/sticky-headers';
9
- import type { PluginInjectionAPI } from '../types';
9
+ import type { CellHoverMeta, PluginInjectionAPI } from '../types';
10
10
  import { ShadowEvent } from '../types';
11
11
  import type { TableOptions } from './types';
12
12
  export interface ComponentProps {
@@ -25,11 +25,16 @@ export interface ComponentProps {
25
25
  isDragAndDropEnabled?: boolean;
26
26
  isTableScalingEnabled?: boolean;
27
27
  tableActive: boolean;
28
- ordering: TableColumnOrdering;
28
+ ordering?: TableColumnOrdering;
29
29
  isResizing?: boolean;
30
30
  getEditorFeatureFlags: GetEditorFeatureFlags;
31
31
  dispatchAnalyticsEvent: DispatchAnalyticsEvent;
32
32
  pluginInjectionApi?: PluginInjectionAPI;
33
+ isInDanger?: boolean;
34
+ hoveredRows?: number[];
35
+ hoveredCell?: CellHoverMeta;
36
+ isTableHovered?: boolean;
37
+ isWholeTableInDanger?: boolean;
33
38
  }
34
39
  interface TableState {
35
40
  scroll: number;
@@ -0,0 +1,27 @@
1
+ /// <reference types="react" />
2
+ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
+ import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
4
+ import type { GetEditorFeatureFlags, getPosHandlerNode } from '@atlaskit/editor-common/types';
5
+ import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
6
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
+ import type { PluginInjectionAPI } from '../types';
8
+ import type { TableOptions } from './types';
9
+ type ForwardRef = (node: HTMLElement | null) => any;
10
+ type TableComponentWithSharedStateProps = {
11
+ view: EditorView;
12
+ options?: TableOptions;
13
+ getNode: () => PmNode;
14
+ dispatchAnalyticsEvent: DispatchAnalyticsEvent;
15
+ getEditorFeatureFlags: GetEditorFeatureFlags;
16
+ api?: PluginInjectionAPI;
17
+ eventDispatcher: EventDispatcher;
18
+ forwardRef: ForwardRef;
19
+ getPos: getPosHandlerNode;
20
+ allowColumnResizing?: boolean;
21
+ allowControls?: boolean;
22
+ };
23
+ /**
24
+ * Use useSharedPluginState to control re-renders from plugin dependencies
25
+ */
26
+ export declare const TableComponentWithSharedState: ({ view, options, getNode, dispatchAnalyticsEvent, api, getEditorFeatureFlags, eventDispatcher, allowColumnResizing, allowControls, getPos, forwardRef, }: TableComponentWithSharedStateProps) => JSX.Element | null;
27
+ export {};
@@ -26,8 +26,9 @@ type ResizableTableContainerProps = {
26
26
  pluginInjectionApi?: PluginInjectionAPI;
27
27
  isTableScalingEnabled?: boolean;
28
28
  tableWrapperHeight?: number;
29
+ isWholeTableInDanger?: boolean;
29
30
  };
30
- export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, editorView, getPos, tableRef, isResizing, pluginInjectionApi, isTableScalingEnabled, tableWrapperHeight, }: PropsWithChildren<ResizableTableContainerProps>) => JSX.Element>;
31
+ export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, editorView, getPos, tableRef, isResizing, pluginInjectionApi, isTableScalingEnabled, tableWrapperHeight, isWholeTableInDanger, }: PropsWithChildren<ResizableTableContainerProps>) => JSX.Element>;
31
32
  type TableContainerProps = {
32
33
  node: PMNode;
33
34
  className: string;
@@ -42,6 +43,7 @@ type TableContainerProps = {
42
43
  pluginInjectionApi?: PluginInjectionAPI;
43
44
  isTableScalingEnabled?: boolean;
44
45
  tableWrapperHeight?: number;
46
+ isWholeTableInDanger?: boolean;
45
47
  };
46
- export declare const TableContainer: ({ children, node, className, containerWidth: { lineLength, width: editorWidth }, isTableResizingEnabled, isBreakoutEnabled, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isTableScalingEnabled, }: PropsWithChildren<TableContainerProps>) => JSX.Element;
48
+ export declare const TableContainer: ({ children, node, className, containerWidth: { lineLength, width: editorWidth }, isTableResizingEnabled, isBreakoutEnabled, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isTableScalingEnabled, isWholeTableInDanger, }: PropsWithChildren<TableContainerProps>) => JSX.Element;
47
49
  export {};
@@ -4,6 +4,7 @@ import type { GuidelineConfig } from '@atlaskit/editor-common/guideline';
4
4
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
5
5
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
6
6
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
+ import type { PluginInjectionAPI } from '../types';
7
8
  interface TableResizerProps {
8
9
  width: number;
9
10
  maxWidth: number;
@@ -16,11 +17,13 @@ interface TableResizerProps {
16
17
  displayGuideline: (guideline: GuidelineConfig[]) => boolean;
17
18
  attachAnalyticsEvent: (payload: TableEventPayload) => ((tr: Transaction) => boolean) | undefined;
18
19
  displayGapCursor: (toggle: boolean) => boolean;
20
+ pluginInjectionApi?: PluginInjectionAPI;
19
21
  isTableScalingEnabled?: boolean;
22
+ isWholeTableInDanger?: boolean;
20
23
  }
21
24
  export interface TableResizerImprovementProps extends TableResizerProps {
22
25
  onResizeStop?: () => void;
23
26
  onResizeStart?: () => void;
24
27
  }
25
- export declare const TableResizer: ({ children, width, maxWidth, containerWidth, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, }: PropsWithChildren<TableResizerImprovementProps>) => JSX.Element;
28
+ export declare const TableResizer: ({ children, width, maxWidth, containerWidth, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, isWholeTableInDanger, pluginInjectionApi, }: PropsWithChildren<TableResizerImprovementProps>) => JSX.Element;
26
29
  export {};
@@ -17,6 +17,7 @@ export interface Props {
17
17
  node: PmNode;
18
18
  view: EditorView;
19
19
  allowColumnResizing?: boolean;
20
+ allowControls?: boolean;
20
21
  cellMinWidth?: number;
21
22
  portalProviderAPI: PortalProviderAPI;
22
23
  eventDispatcher: EventDispatcher;
@@ -1,12 +1,12 @@
1
1
  import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
2
2
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
- import type { Command, EditorCommand, GetEditorFeatureFlags, NextEditorPlugin } from '@atlaskit/editor-common/types';
3
+ import type { Command, EditorCommand, GetEditorFeatureFlags, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
4
4
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
5
  import type { ContentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
6
6
  import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
7
7
  import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
8
8
  import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
9
- import type { PluginConfig } from './types';
9
+ import type { PluginConfig, TableSharedState } from './types';
10
10
  export interface TablePluginOptions {
11
11
  tableOptions: PluginConfig;
12
12
  tableResizingEnabled?: boolean;
@@ -19,15 +19,18 @@ export interface TablePluginOptions {
19
19
  isTableScalingEnabled?: boolean;
20
20
  }
21
21
  type InsertTableAction = (analyticsPayload: AnalyticsEventPayload) => Command;
22
+ type MediaPlugin = NextEditorPlugin<'media', {
23
+ pluginConfiguration: any;
24
+ dependencies: any;
25
+ sharedState: any;
26
+ actions: any;
27
+ }>;
22
28
  export type TablePlugin = NextEditorPlugin<'table', {
23
29
  pluginConfiguration: TablePluginOptions | undefined;
24
30
  actions: {
25
31
  insertTable: InsertTableAction;
26
32
  };
27
- sharedState: {
28
- isFullWidthModeEnabled: boolean;
29
- wasFullWidthModeEnabled: boolean;
30
- };
33
+ sharedState?: TableSharedState;
31
34
  commands: {
32
35
  insertTableWithSize: (rowsCount: number, colsCount: number, inputMethod?: INPUT_METHOD.PICKER) => EditorCommand;
33
36
  };
@@ -36,7 +39,8 @@ export type TablePlugin = NextEditorPlugin<'table', {
36
39
  ContentInsertionPlugin,
37
40
  WidthPlugin,
38
41
  GuidelinePlugin,
39
- SelectionPlugin
42
+ SelectionPlugin,
43
+ OptionalPlugin<MediaPlugin>
40
44
  ];
41
45
  }>;
42
46
  /**
@@ -8,7 +8,7 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
8
8
  import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
9
9
  import type { Rect } from '@atlaskit/editor-tables/table-map';
10
10
  import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
11
- import type tablePlugin from './plugin';
11
+ import type { TablePlugin } from './plugin';
12
12
  export declare const RESIZE_HANDLE_AREA_DECORATION_GAP = 30;
13
13
  export type RowInsertPosition = 'TOP' | 'BOTTOM';
14
14
  /**
@@ -25,7 +25,13 @@ export interface InsertRowOptions {
25
25
  index: number;
26
26
  moveCursorToInsertedRow: boolean;
27
27
  }
28
- export type PluginInjectionAPI = ExtractInjectionAPI<typeof tablePlugin>;
28
+ export type PluginInjectionAPI = ExtractInjectionAPI<TablePlugin>;
29
+ export type TableSharedStateInternal = Pick<TablePluginState, 'isFullWidthModeEnabled' | 'wasFullWidthModeEnabled' | 'isHeaderRowEnabled' | 'isHeaderColumnEnabled' | 'ordering' | 'isInDanger' | 'hoveredRows' | 'hoveredCell' | 'isTableHovered' | 'tableNode' | 'widthToWidest'> & {
30
+ isResizing: boolean;
31
+ isTableResizing?: boolean;
32
+ isWholeTableInDanger?: boolean;
33
+ };
34
+ export type TableSharedState = Pick<TablePluginState, 'isFullWidthModeEnabled' | 'wasFullWidthModeEnabled'>;
29
35
  export type InsertRowMethods = INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.SHORTCUT | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU;
30
36
  export interface PluginConfig {
31
37
  advanced?: boolean;
@@ -54,6 +60,9 @@ export interface CellHoverMeta {
54
60
  colIndex?: number;
55
61
  rowIndex?: number;
56
62
  }
63
+ export interface WidthToWidest {
64
+ [tableLocalId: string]: boolean;
65
+ }
57
66
  export interface TablePluginState {
58
67
  editorHasFocus?: boolean;
59
68
  hoveredColumns: number[];
@@ -83,7 +92,7 @@ export interface TablePluginState {
83
92
  isKeyboardResize?: boolean;
84
93
  isTableCollapsed?: boolean;
85
94
  canCollapseTable?: boolean;
86
- widthToWidest?: boolean;
95
+ widthToWidest?: WidthToWidest;
87
96
  getIntl: () => IntlShape;
88
97
  isBreakoutEnabled?: boolean;
89
98
  wasFullWidthModeEnabled?: boolean;
@@ -172,7 +181,7 @@ export type TablePluginAction = {
172
181
  } | {
173
182
  type: 'UPDATE_TABLE_WIDTH_TO_WIDEST';
174
183
  data: {
175
- widthToWidest: boolean | undefined;
184
+ widthToWidest: WidthToWidest | undefined;
176
185
  };
177
186
  } | {
178
187
  type: 'REMOVE_RESIZE_HANDLE_DECORATIONS';
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
+ import type { TablePlugin } from '../../../plugin';
3
5
  import type { CellHoverMeta } from '../../../types';
4
6
  export interface ColumnControlsProps {
5
7
  editorView: EditorView;
@@ -18,5 +20,146 @@ export interface ColumnControlsProps {
18
20
  isDragging?: boolean;
19
21
  getScrollOffset?: () => number;
20
22
  }
21
- export declare const ColumnControls: ({ editorView, tableActive, tableRef, hoveredCell, stickyTop, localId, isInDanger, rowHeights, colWidths, hasHeaderColumn, isTableHovered, tableContainerWidth, isNumberColumnEnabled, isDragging, getScrollOffset, }: ColumnControlsProps) => JSX.Element;
23
+ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hoveredCell, stickyTop, localId, isInDanger, rowHeights, colWidths, hasHeaderColumn, isTableHovered, tableContainerWidth, isNumberColumnEnabled, isDragging, getScrollOffset, api, }: ColumnControlsProps & {
24
+ api?: import("@atlaskit/editor-common/types").PublicPluginAPI<[
25
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"table", {
26
+ pluginConfiguration: import("../../../plugin").TablePluginOptions | undefined;
27
+ actions: {
28
+ insertTable: (analyticsPayload: import("@atlaskit/editor-common/analytics").AnalyticsEventPayload) => import("@atlaskit/editor-common/types").Command;
29
+ };
30
+ sharedState?: import("../../../types").TableSharedState | undefined;
31
+ commands: {
32
+ insertTableWithSize: (rowsCount: number, colsCount: number, inputMethod?: import("@atlaskit/editor-common/analytics").INPUT_METHOD.PICKER | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
33
+ };
34
+ dependencies: [
35
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
36
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
37
+ sharedState: {
38
+ createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
39
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
40
+ performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
41
+ };
42
+ dependencies: [
43
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
44
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
45
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
46
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>
47
+ ];
48
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
49
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>,
50
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contentInsertion", {
51
+ actions: import("@atlaskit/editor-plugin-content-insertion").InsertNodeAPI;
52
+ dependencies: [
53
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
54
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
55
+ sharedState: {
56
+ createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
57
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
58
+ performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
59
+ };
60
+ dependencies: [
61
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
62
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
63
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
64
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>
65
+ ];
66
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
67
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>
68
+ ];
69
+ }, undefined>,
70
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
71
+ sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
72
+ }, undefined>,
73
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"guideline", {
74
+ dependencies: [
75
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
76
+ sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
77
+ }, undefined>
78
+ ];
79
+ sharedState: import("@atlaskit/editor-common/guideline").GuidelinePluginState | null;
80
+ actions: {
81
+ displayGuideline: import("@atlaskit/editor-common/guideline").DisplayGuideline;
82
+ };
83
+ }, undefined>,
84
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
85
+ pluginConfiguration: import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined;
86
+ actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
87
+ commands: {
88
+ displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
89
+ };
90
+ sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
91
+ }, import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined>,
92
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"media", {
93
+ pluginConfiguration: any;
94
+ dependencies: any;
95
+ sharedState: any;
96
+ actions: any;
97
+ }, any>>
98
+ ];
99
+ }, import("../../../plugin").TablePluginOptions | undefined>,
100
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
101
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
102
+ sharedState: {
103
+ createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
104
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
105
+ performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
106
+ };
107
+ dependencies: [
108
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
109
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
110
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
111
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>
112
+ ];
113
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
114
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>,
115
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contentInsertion", {
116
+ actions: import("@atlaskit/editor-plugin-content-insertion").InsertNodeAPI;
117
+ dependencies: [
118
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
119
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
120
+ sharedState: {
121
+ createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
122
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
123
+ performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
124
+ };
125
+ dependencies: [
126
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
127
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
128
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
129
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>
130
+ ];
131
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
132
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>
133
+ ];
134
+ }, undefined>,
135
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
136
+ sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
137
+ }, undefined>,
138
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"guideline", {
139
+ dependencies: [
140
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
141
+ sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
142
+ }, undefined>
143
+ ];
144
+ sharedState: import("@atlaskit/editor-common/guideline").GuidelinePluginState | null;
145
+ actions: {
146
+ displayGuideline: import("@atlaskit/editor-common/guideline").DisplayGuideline;
147
+ };
148
+ }, undefined>,
149
+ import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
150
+ pluginConfiguration: import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined;
151
+ actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
152
+ commands: {
153
+ displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
154
+ };
155
+ sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
156
+ }, import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined>,
157
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"media", {
158
+ pluginConfiguration: any;
159
+ dependencies: any;
160
+ sharedState: any;
161
+ actions: any;
162
+ }, any>>
163
+ ]> | undefined;
164
+ }) => JSX.Element;
22
165
  export default ColumnControls;
@@ -5,7 +5,7 @@ import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
5
5
  import type { Selection } from '@atlaskit/editor-prosemirror/state';
6
6
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
7
  import type { RowStickyState } from '../../pm-plugins/sticky-headers';
8
- import type { CellHoverMeta } from '../../types';
8
+ import type { CellHoverMeta, PluginInjectionAPI } from '../../types';
9
9
  export interface Props {
10
10
  editorView: EditorView;
11
11
  getEditorFeatureFlags: GetEditorFeatureFlags;
@@ -26,6 +26,7 @@ export interface Props {
26
26
  isNumberColumnEnabled?: boolean;
27
27
  getScrollOffset?: () => number;
28
28
  tableWrapperHeight?: number;
29
+ api?: PluginInjectionAPI;
29
30
  }
30
- export declare const TableFloatingColumnControls: ({ editorView, tableRef, getNode, tableActive, hasHeaderRow, hoveredCell, isResizing, stickyHeader, selection, isInDanger, isTableHovered, tableContainerWidth, isNumberColumnEnabled, getScrollOffset, tableWrapperHeight, }: Props) => JSX.Element | null;
31
+ export declare const TableFloatingColumnControls: ({ editorView, tableRef, getNode, tableActive, hasHeaderRow, hoveredCell, isResizing, stickyHeader, selection, isInDanger, isTableHovered, tableContainerWidth, isNumberColumnEnabled, getScrollOffset, tableWrapperHeight, api, }: Props) => JSX.Element | null;
31
32
  export default TableFloatingColumnControls;