@atlaskit/editor-plugin-table 7.6.2 → 7.6.3

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 (93) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/nodeviews/TableComponent.js +25 -11
  3. package/dist/cjs/nodeviews/TableComponentWithSharedState.js +87 -0
  4. package/dist/cjs/nodeviews/TableContainer.js +8 -4
  5. package/dist/cjs/nodeviews/TableResizer.js +4 -5
  6. package/dist/cjs/nodeviews/table.js +21 -1
  7. package/dist/cjs/plugin.js +24 -2
  8. package/dist/cjs/types.js +3 -0
  9. package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +6 -2
  10. package/dist/cjs/ui/TableFloatingColumnControls/index.js +5 -2
  11. package/dist/cjs/ui/TableFloatingControls/CornerControls/DragCornerControls.js +48 -1
  12. package/dist/cjs/ui/TableFloatingControls/CornerControls/index.js +6 -0
  13. package/dist/cjs/ui/TableFloatingControls/FloatingControlsWithSelection.js +47 -0
  14. package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +3 -2
  15. package/dist/cjs/ui/TableFloatingControls/index.js +25 -3
  16. package/dist/cjs/ui/common-styles.js +11 -6
  17. package/dist/es2019/nodeviews/TableComponent.js +27 -12
  18. package/dist/es2019/nodeviews/TableComponentWithSharedState.js +83 -0
  19. package/dist/es2019/nodeviews/TableContainer.js +8 -4
  20. package/dist/es2019/nodeviews/TableResizer.js +2 -4
  21. package/dist/es2019/nodeviews/table.js +21 -1
  22. package/dist/es2019/plugin.js +25 -3
  23. package/dist/es2019/types.js +3 -0
  24. package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +7 -2
  25. package/dist/es2019/ui/TableFloatingColumnControls/index.js +5 -2
  26. package/dist/es2019/ui/TableFloatingControls/CornerControls/DragCornerControls.js +55 -0
  27. package/dist/es2019/ui/TableFloatingControls/CornerControls/index.js +1 -1
  28. package/dist/es2019/ui/TableFloatingControls/FloatingControlsWithSelection.js +42 -0
  29. package/dist/es2019/ui/TableFloatingControls/RowControls/ClassicControls.js +3 -2
  30. package/dist/es2019/ui/TableFloatingControls/index.js +26 -4
  31. package/dist/es2019/ui/common-styles.js +589 -588
  32. package/dist/esm/nodeviews/TableComponent.js +25 -11
  33. package/dist/esm/nodeviews/TableComponentWithSharedState.js +80 -0
  34. package/dist/esm/nodeviews/TableContainer.js +8 -4
  35. package/dist/esm/nodeviews/TableResizer.js +4 -5
  36. package/dist/esm/nodeviews/table.js +21 -1
  37. package/dist/esm/plugin.js +25 -3
  38. package/dist/esm/types.js +3 -0
  39. package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +6 -2
  40. package/dist/esm/ui/TableFloatingColumnControls/index.js +5 -2
  41. package/dist/esm/ui/TableFloatingControls/CornerControls/DragCornerControls.js +47 -0
  42. package/dist/esm/ui/TableFloatingControls/CornerControls/index.js +1 -1
  43. package/dist/esm/ui/TableFloatingControls/FloatingControlsWithSelection.js +40 -0
  44. package/dist/esm/ui/TableFloatingControls/RowControls/ClassicControls.js +3 -2
  45. package/dist/esm/ui/TableFloatingControls/index.js +26 -4
  46. package/dist/esm/ui/common-styles.js +10 -5
  47. package/dist/types/nodeviews/TableComponent.d.ts +7 -2
  48. package/dist/types/nodeviews/TableComponentWithSharedState.d.ts +27 -0
  49. package/dist/types/nodeviews/TableContainer.d.ts +4 -2
  50. package/dist/types/nodeviews/TableResizer.d.ts +2 -1
  51. package/dist/types/nodeviews/types.d.ts +1 -0
  52. package/dist/types/plugin.d.ts +11 -7
  53. package/dist/types/types.d.ts +8 -2
  54. package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +113 -1
  55. package/dist/types/ui/TableFloatingColumnControls/index.d.ts +3 -2
  56. package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +223 -0
  57. package/dist/types/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
  58. package/dist/types/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +20 -0
  59. package/dist/types/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +2 -0
  60. package/dist/types/ui/TableFloatingControls/index.d.ts +113 -1
  61. package/dist/types/ui/common-styles.d.ts +3 -0
  62. package/dist/types-ts4.5/nodeviews/TableComponent.d.ts +7 -2
  63. package/dist/types-ts4.5/nodeviews/TableComponentWithSharedState.d.ts +27 -0
  64. package/dist/types-ts4.5/nodeviews/TableContainer.d.ts +4 -2
  65. package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +2 -1
  66. package/dist/types-ts4.5/nodeviews/types.d.ts +1 -0
  67. package/dist/types-ts4.5/plugin.d.ts +11 -7
  68. package/dist/types-ts4.5/types.d.ts +8 -2
  69. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +144 -1
  70. package/dist/types-ts4.5/ui/TableFloatingColumnControls/index.d.ts +3 -2
  71. package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +285 -0
  72. package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
  73. package/dist/types-ts4.5/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +20 -0
  74. package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +2 -0
  75. package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +144 -1
  76. package/dist/types-ts4.5/ui/common-styles.d.ts +3 -0
  77. package/package.json +6 -3
  78. package/src/nodeviews/TableComponent.tsx +36 -7
  79. package/src/nodeviews/TableComponentWithSharedState.tsx +125 -0
  80. package/src/nodeviews/TableContainer.tsx +6 -0
  81. package/src/nodeviews/TableResizer.tsx +2 -1
  82. package/src/nodeviews/table.tsx +22 -1
  83. package/src/nodeviews/types.ts +1 -0
  84. package/src/plugin.tsx +46 -6
  85. package/src/types.ts +27 -2
  86. package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +10 -2
  87. package/src/ui/TableFloatingColumnControls/index.tsx +13 -1
  88. package/src/ui/TableFloatingControls/CornerControls/DragCornerControls.tsx +58 -0
  89. package/src/ui/TableFloatingControls/CornerControls/index.tsx +4 -1
  90. package/src/ui/TableFloatingControls/FloatingControlsWithSelection.tsx +68 -0
  91. package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +4 -1
  92. package/src/ui/TableFloatingControls/index.tsx +42 -8
  93. package/src/ui/common-styles.ts +611 -610
@@ -1,6 +1,229 @@
1
1
  import React from 'react';
2
2
  import type { WrappedComponentProps } from 'react-intl-next';
3
3
  import type { CornerControlProps } from './types';
4
+ export declare const DragCornerControlsWithSelection: React.FC<import("react-intl-next").WithIntlProps<CornerControlProps & WrappedComponentProps & {
5
+ api?: import("@atlaskit/editor-common/types").PublicPluginAPI<[import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"table", {
6
+ pluginConfiguration: import("../../../plugin").TablePluginOptions | undefined;
7
+ actions: {
8
+ insertTable: (analyticsPayload: import("@atlaskit/editor-common/analytics").AnalyticsEventPayload) => import("@atlaskit/editor-common/types").Command;
9
+ };
10
+ sharedState?: import("../../../types").TableSharedState | undefined;
11
+ commands: {
12
+ insertTableWithSize: (rowsCount: number, colsCount: number, inputMethod?: import("@atlaskit/editor-common/analytics").INPUT_METHOD.PICKER | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
13
+ };
14
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
15
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
16
+ sharedState: {
17
+ createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
18
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
19
+ performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
20
+ };
21
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
22
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
23
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
24
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
25
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
26
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contentInsertion", {
27
+ actions: import("@atlaskit/editor-plugin-content-insertion").InsertNodeAPI;
28
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
29
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
30
+ sharedState: {
31
+ createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
32
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
33
+ performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
34
+ };
35
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
36
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
37
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
38
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
39
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
40
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>];
41
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
42
+ sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
43
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"guideline", {
44
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
45
+ sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
46
+ }, undefined>];
47
+ sharedState: import("@atlaskit/editor-common/guideline").GuidelinePluginState | null;
48
+ actions: {
49
+ displayGuideline: import("@atlaskit/editor-common/guideline").DisplayGuideline;
50
+ };
51
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
52
+ pluginConfiguration: import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined;
53
+ actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
54
+ commands: {
55
+ displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
56
+ };
57
+ sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
58
+ }, import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"media", {
59
+ pluginConfiguration: any;
60
+ dependencies: any;
61
+ sharedState: any;
62
+ actions: any;
63
+ }, any>>];
64
+ }, import("../../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
65
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
66
+ sharedState: {
67
+ createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
68
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
69
+ performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
70
+ };
71
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
72
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
73
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
74
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
75
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
76
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contentInsertion", {
77
+ actions: import("@atlaskit/editor-plugin-content-insertion").InsertNodeAPI;
78
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
79
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
80
+ sharedState: {
81
+ createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
82
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
83
+ performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
84
+ };
85
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
86
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
87
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
88
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
89
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
90
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>];
91
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
92
+ sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
93
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"guideline", {
94
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
95
+ sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
96
+ }, undefined>];
97
+ sharedState: import("@atlaskit/editor-common/guideline").GuidelinePluginState | null;
98
+ actions: {
99
+ displayGuideline: import("@atlaskit/editor-common/guideline").DisplayGuideline;
100
+ };
101
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
102
+ pluginConfiguration: import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined;
103
+ actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
104
+ commands: {
105
+ displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
106
+ };
107
+ sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
108
+ }, import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"media", {
109
+ pluginConfiguration: any;
110
+ dependencies: any;
111
+ sharedState: any;
112
+ actions: any;
113
+ }, any>>]> | undefined;
114
+ }>> & {
115
+ WrappedComponent: React.ComponentType<CornerControlProps & WrappedComponentProps & {
116
+ api?: import("@atlaskit/editor-common/types").PublicPluginAPI<[import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"table", {
117
+ pluginConfiguration: import("../../../plugin").TablePluginOptions | undefined;
118
+ actions: {
119
+ insertTable: (analyticsPayload: import("@atlaskit/editor-common/analytics").AnalyticsEventPayload) => import("@atlaskit/editor-common/types").Command;
120
+ };
121
+ sharedState?: import("../../../types").TableSharedState | undefined;
122
+ commands: {
123
+ insertTableWithSize: (rowsCount: number, colsCount: number, inputMethod?: import("@atlaskit/editor-common/analytics").INPUT_METHOD.PICKER | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
124
+ };
125
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
126
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
127
+ sharedState: {
128
+ createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
129
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
130
+ performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
131
+ };
132
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
133
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
134
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
135
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
136
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
137
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contentInsertion", {
138
+ actions: import("@atlaskit/editor-plugin-content-insertion").InsertNodeAPI;
139
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
140
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
141
+ sharedState: {
142
+ createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
143
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
144
+ performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
145
+ };
146
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
147
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
148
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
149
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
150
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
151
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>];
152
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
153
+ sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
154
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"guideline", {
155
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
156
+ sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
157
+ }, undefined>];
158
+ sharedState: import("@atlaskit/editor-common/guideline").GuidelinePluginState | null;
159
+ actions: {
160
+ displayGuideline: import("@atlaskit/editor-common/guideline").DisplayGuideline;
161
+ };
162
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
163
+ pluginConfiguration: import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined;
164
+ actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
165
+ commands: {
166
+ displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
167
+ };
168
+ sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
169
+ }, import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"media", {
170
+ pluginConfiguration: any;
171
+ dependencies: any;
172
+ sharedState: any;
173
+ actions: any;
174
+ }, any>>];
175
+ }, import("../../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
176
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
177
+ sharedState: {
178
+ createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
179
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
180
+ performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
181
+ };
182
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
183
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
184
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
185
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
186
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
187
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contentInsertion", {
188
+ actions: import("@atlaskit/editor-plugin-content-insertion").InsertNodeAPI;
189
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
190
+ pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
191
+ sharedState: {
192
+ createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
193
+ attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
194
+ performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
195
+ };
196
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
197
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
198
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
199
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
200
+ actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
201
+ }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>];
202
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
203
+ sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
204
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"guideline", {
205
+ dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
206
+ sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
207
+ }, undefined>];
208
+ sharedState: import("@atlaskit/editor-common/guideline").GuidelinePluginState | null;
209
+ actions: {
210
+ displayGuideline: import("@atlaskit/editor-common/guideline").DisplayGuideline;
211
+ };
212
+ }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
213
+ pluginConfiguration: import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined;
214
+ actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
215
+ commands: {
216
+ displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
217
+ };
218
+ sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
219
+ }, import("@atlaskit/editor-plugin-selection/types").SelectionPluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"media", {
220
+ pluginConfiguration: any;
221
+ dependencies: any;
222
+ sharedState: any;
223
+ actions: any;
224
+ }, any>>]> | undefined;
225
+ }>;
226
+ };
4
227
  export declare const DragCornerControls: React.FC<import("react-intl-next").WithIntlProps<CornerControlProps & WrappedComponentProps>> & {
5
228
  WrappedComponent: React.ComponentType<CornerControlProps & WrappedComponentProps>;
6
229
  };
@@ -1,2 +1,2 @@
1
1
  export { CornerControls } from './ClassicCornerControls';
2
- export { DragCornerControls } from './DragCornerControls';
2
+ export { DragCornerControls, DragCornerControlsWithSelection, } from './DragCornerControls';
@@ -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;
@@ -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 {};
@@ -17,10 +17,11 @@ interface TableResizerProps {
17
17
  attachAnalyticsEvent: (payload: TableEventPayload) => ((tr: Transaction) => boolean) | undefined;
18
18
  displayGapCursor: (toggle: boolean) => boolean;
19
19
  isTableScalingEnabled?: boolean;
20
+ isWholeTableInDanger?: boolean;
20
21
  }
21
22
  export interface TableResizerImprovementProps extends TableResizerProps {
22
23
  onResizeStop?: () => void;
23
24
  onResizeStart?: () => void;
24
25
  }
25
- export declare const TableResizer: ({ children, width, maxWidth, containerWidth, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, }: PropsWithChildren<TableResizerImprovementProps>) => JSX.Element;
26
+ export declare const TableResizer: ({ children, width, maxWidth, containerWidth, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, isWholeTableInDanger, }: PropsWithChildren<TableResizerImprovementProps>) => JSX.Element;
26
27
  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'> & {
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;