@atlaskit/editor-common 78.26.2 → 78.26.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.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/keymaps/index.js +1 -1
- package/dist/cjs/messages/help-dialog.js +15 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/node-width/index.js +2 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/keymaps/index.js +1 -1
- package/dist/es2019/messages/help-dialog.js +15 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/node-width/index.js +2 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/keymaps/index.js +1 -1
- package/dist/esm/messages/help-dialog.js +15 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/node-width/index.js +2 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/messages/help-dialog.d.ts +15 -0
- package/dist/types/node-width/index.d.ts +1 -1
- package/dist/types/types/next-editor-plugin.d.ts +13 -1
- package/dist/types-ts4.5/messages/help-dialog.d.ts +15 -0
- package/dist/types-ts4.5/node-width/index.d.ts +1 -1
- package/dist/types-ts4.5/types/next-editor-plugin.d.ts +13 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 78.26.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#86368](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/86368) [`ecf368bbb0d4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ecf368bbb0d4) - Remove table layout model and fix tests
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 78.26.3
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#89712](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/89712) [`4a94bc155219`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4a94bc155219) - Improve error messaging for SafePresetCheck
|
|
15
|
+
|
|
3
16
|
## 78.26.2
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -183,7 +183,7 @@ var moveRowDown = exports.moveRowDown = makeKeyMapWithCommon('Move Row Down', 'C
|
|
|
183
183
|
var moveRowUp = exports.moveRowUp = makeKeyMapWithCommon('Move Row Up', 'Ctrl-Alt-Shift-ArrowUp');
|
|
184
184
|
var deleteColumn = exports.deleteColumn = makeKeyMapWithCommon('Delete Column', 'Ctrl-Backspace');
|
|
185
185
|
var deleteRow = exports.deleteRow = makeKeyMapWithCommon('Delete Row', 'Ctrl-Backspace');
|
|
186
|
-
var startColumnResizing = exports.startColumnResizing = makeKeyMapWithCommon('Activate Column Resize', 'Mod-Alt-Shift-
|
|
186
|
+
var startColumnResizing = exports.startColumnResizing = makeKeyMapWithCommon('Activate Column Resize', 'Mod-Alt-Shift-c');
|
|
187
187
|
var cut = exports.cut = makeKeyMapWithCommon('Cut', 'Mod-x');
|
|
188
188
|
var copy = exports.copy = makeKeyMapWithCommon('Copy', 'Mod-c');
|
|
189
189
|
var paste = exports.paste = makeKeyMapWithCommon('Paste', 'Mod-v');
|
|
@@ -51,6 +51,21 @@ var helpDialogMessages = exports.helpDialogMessages = (0, _reactIntlNext.defineM
|
|
|
51
51
|
defaultMessage: 'Select table column',
|
|
52
52
|
description: 'Hint for selecting a table column using a shortcut'
|
|
53
53
|
},
|
|
54
|
+
selectColumnResize: {
|
|
55
|
+
id: 'fabric.editor.selectColumnResize',
|
|
56
|
+
defaultMessage: 'Select column resize',
|
|
57
|
+
description: 'Hint for selecting a column resize a shortcut'
|
|
58
|
+
},
|
|
59
|
+
increaseColumnSize: {
|
|
60
|
+
id: 'fabric.editor.increaseColumnSize',
|
|
61
|
+
defaultMessage: 'Increase column size',
|
|
62
|
+
description: 'Hint for increasing a column size shortcut'
|
|
63
|
+
},
|
|
64
|
+
decreaseColumnSize: {
|
|
65
|
+
id: 'fabric.editor.decreaseColumnSize',
|
|
66
|
+
defaultMessage: 'Decrease column size',
|
|
67
|
+
description: 'Hint for decreasing a column size shortcut'
|
|
68
|
+
},
|
|
54
69
|
increaseSize: {
|
|
55
70
|
id: 'fabric.editor.increaseSize',
|
|
56
71
|
defaultMessage: 'Increase size',
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "78.26.
|
|
19
|
+
var packageVersion = "78.26.4";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -106,10 +106,10 @@ var calcBreakoutNodeWidth = function calcBreakoutNodeWidth(layout, containerWidt
|
|
|
106
106
|
return isFullWidthModeEnabled ? Math.min(containerWidth.lineLength, _editorSharedStyles.akEditorFullWidthLayoutWidth) : (0, _breakout.absoluteBreakoutWidth)(layout, containerWidth.width);
|
|
107
107
|
};
|
|
108
108
|
var getTableContainerWidth = exports.getTableContainerWidth = function getTableContainerWidth(node) {
|
|
109
|
-
if (node.attrs.width) {
|
|
109
|
+
if (node !== null && node !== void 0 && node.attrs.width) {
|
|
110
110
|
return node.attrs.width;
|
|
111
111
|
}
|
|
112
|
-
return layoutToWidth[node.attrs.layout];
|
|
112
|
+
return layoutToWidth[node === null || node === void 0 ? void 0 : node.attrs.layout] || _editorSharedStyles.akEditorDefaultLayoutWidth;
|
|
113
113
|
};
|
|
114
114
|
var getTableWidthWithNumberColumn = exports.getTableWidthWithNumberColumn = function getTableWidthWithNumberColumn(node, offset) {
|
|
115
115
|
var isNumberColumnEnabled = node.attrs.isNumberColumnEnabled;
|
|
@@ -22,7 +22,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
22
22
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
23
23
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
24
24
|
var packageName = "@atlaskit/editor-common";
|
|
25
|
-
var packageVersion = "78.26.
|
|
25
|
+
var packageVersion = "78.26.4";
|
|
26
26
|
var halfFocusRing = 1;
|
|
27
27
|
var dropOffset = '0, 8';
|
|
28
28
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -71,7 +71,7 @@ export const moveRowDown = makeKeyMapWithCommon('Move Row Down', 'Ctrl-Alt-Shift
|
|
|
71
71
|
export const moveRowUp = makeKeyMapWithCommon('Move Row Up', 'Ctrl-Alt-Shift-ArrowUp');
|
|
72
72
|
export const deleteColumn = makeKeyMapWithCommon('Delete Column', 'Ctrl-Backspace');
|
|
73
73
|
export const deleteRow = makeKeyMapWithCommon('Delete Row', 'Ctrl-Backspace');
|
|
74
|
-
export const startColumnResizing = makeKeyMapWithCommon('Activate Column Resize', 'Mod-Alt-Shift-
|
|
74
|
+
export const startColumnResizing = makeKeyMapWithCommon('Activate Column Resize', 'Mod-Alt-Shift-c');
|
|
75
75
|
export const cut = makeKeyMapWithCommon('Cut', 'Mod-x');
|
|
76
76
|
export const copy = makeKeyMapWithCommon('Copy', 'Mod-c');
|
|
77
77
|
export const paste = makeKeyMapWithCommon('Paste', 'Mod-v');
|
|
@@ -45,6 +45,21 @@ export const helpDialogMessages = defineMessages({
|
|
|
45
45
|
defaultMessage: 'Select table column',
|
|
46
46
|
description: 'Hint for selecting a table column using a shortcut'
|
|
47
47
|
},
|
|
48
|
+
selectColumnResize: {
|
|
49
|
+
id: 'fabric.editor.selectColumnResize',
|
|
50
|
+
defaultMessage: 'Select column resize',
|
|
51
|
+
description: 'Hint for selecting a column resize a shortcut'
|
|
52
|
+
},
|
|
53
|
+
increaseColumnSize: {
|
|
54
|
+
id: 'fabric.editor.increaseColumnSize',
|
|
55
|
+
defaultMessage: 'Increase column size',
|
|
56
|
+
description: 'Hint for increasing a column size shortcut'
|
|
57
|
+
},
|
|
58
|
+
decreaseColumnSize: {
|
|
59
|
+
id: 'fabric.editor.decreaseColumnSize',
|
|
60
|
+
defaultMessage: 'Decrease column size',
|
|
61
|
+
description: 'Hint for decreasing a column size shortcut'
|
|
62
|
+
},
|
|
48
63
|
increaseSize: {
|
|
49
64
|
id: 'fabric.editor.increaseSize',
|
|
50
65
|
defaultMessage: 'Increase size',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
2
2
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
3
|
-
const packageVersion = "78.26.
|
|
3
|
+
const packageVersion = "78.26.4";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -101,10 +101,10 @@ const calcBreakoutNodeWidth = (layout, containerWidth, isFullWidthModeEnabled) =
|
|
|
101
101
|
return isFullWidthModeEnabled ? Math.min(containerWidth.lineLength, akEditorFullWidthLayoutWidth) : absoluteBreakoutWidth(layout, containerWidth.width);
|
|
102
102
|
};
|
|
103
103
|
export const getTableContainerWidth = node => {
|
|
104
|
-
if (node.attrs.width) {
|
|
104
|
+
if (node !== null && node !== void 0 && node.attrs.width) {
|
|
105
105
|
return node.attrs.width;
|
|
106
106
|
}
|
|
107
|
-
return layoutToWidth[node.attrs.layout];
|
|
107
|
+
return layoutToWidth[node === null || node === void 0 ? void 0 : node.attrs.layout] || akEditorDefaultLayoutWidth;
|
|
108
108
|
};
|
|
109
109
|
export const getTableWidthWithNumberColumn = (node, offset) => {
|
|
110
110
|
const isNumberColumnEnabled = node.attrs.isNumberColumnEnabled;
|
|
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
7
7
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
8
8
|
import Layer from '../Layer';
|
|
9
9
|
const packageName = "@atlaskit/editor-common";
|
|
10
|
-
const packageVersion = "78.26.
|
|
10
|
+
const packageVersion = "78.26.4";
|
|
11
11
|
const halfFocusRing = 1;
|
|
12
12
|
const dropOffset = '0, 8';
|
|
13
13
|
class DropList extends Component {
|
|
@@ -72,7 +72,7 @@ export var moveRowDown = makeKeyMapWithCommon('Move Row Down', 'Ctrl-Alt-Shift-A
|
|
|
72
72
|
export var moveRowUp = makeKeyMapWithCommon('Move Row Up', 'Ctrl-Alt-Shift-ArrowUp');
|
|
73
73
|
export var deleteColumn = makeKeyMapWithCommon('Delete Column', 'Ctrl-Backspace');
|
|
74
74
|
export var deleteRow = makeKeyMapWithCommon('Delete Row', 'Ctrl-Backspace');
|
|
75
|
-
export var startColumnResizing = makeKeyMapWithCommon('Activate Column Resize', 'Mod-Alt-Shift-
|
|
75
|
+
export var startColumnResizing = makeKeyMapWithCommon('Activate Column Resize', 'Mod-Alt-Shift-c');
|
|
76
76
|
export var cut = makeKeyMapWithCommon('Cut', 'Mod-x');
|
|
77
77
|
export var copy = makeKeyMapWithCommon('Copy', 'Mod-c');
|
|
78
78
|
export var paste = makeKeyMapWithCommon('Paste', 'Mod-v');
|
|
@@ -45,6 +45,21 @@ export var helpDialogMessages = defineMessages({
|
|
|
45
45
|
defaultMessage: 'Select table column',
|
|
46
46
|
description: 'Hint for selecting a table column using a shortcut'
|
|
47
47
|
},
|
|
48
|
+
selectColumnResize: {
|
|
49
|
+
id: 'fabric.editor.selectColumnResize',
|
|
50
|
+
defaultMessage: 'Select column resize',
|
|
51
|
+
description: 'Hint for selecting a column resize a shortcut'
|
|
52
|
+
},
|
|
53
|
+
increaseColumnSize: {
|
|
54
|
+
id: 'fabric.editor.increaseColumnSize',
|
|
55
|
+
defaultMessage: 'Increase column size',
|
|
56
|
+
description: 'Hint for increasing a column size shortcut'
|
|
57
|
+
},
|
|
58
|
+
decreaseColumnSize: {
|
|
59
|
+
id: 'fabric.editor.decreaseColumnSize',
|
|
60
|
+
defaultMessage: 'Decrease column size',
|
|
61
|
+
description: 'Hint for decreasing a column size shortcut'
|
|
62
|
+
},
|
|
48
63
|
increaseSize: {
|
|
49
64
|
id: 'fabric.editor.increaseSize',
|
|
50
65
|
defaultMessage: 'Increase size',
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "78.26.
|
|
9
|
+
var packageVersion = "78.26.4";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -99,10 +99,10 @@ var calcBreakoutNodeWidth = function calcBreakoutNodeWidth(layout, containerWidt
|
|
|
99
99
|
return isFullWidthModeEnabled ? Math.min(containerWidth.lineLength, akEditorFullWidthLayoutWidth) : absoluteBreakoutWidth(layout, containerWidth.width);
|
|
100
100
|
};
|
|
101
101
|
export var getTableContainerWidth = function getTableContainerWidth(node) {
|
|
102
|
-
if (node.attrs.width) {
|
|
102
|
+
if (node !== null && node !== void 0 && node.attrs.width) {
|
|
103
103
|
return node.attrs.width;
|
|
104
104
|
}
|
|
105
|
-
return layoutToWidth[node.attrs.layout];
|
|
105
|
+
return layoutToWidth[node === null || node === void 0 ? void 0 : node.attrs.layout] || akEditorDefaultLayoutWidth;
|
|
106
106
|
};
|
|
107
107
|
export var getTableWidthWithNumberColumn = function getTableWidthWithNumberColumn(node, offset) {
|
|
108
108
|
var isNumberColumnEnabled = node.attrs.isNumberColumnEnabled;
|
|
@@ -17,7 +17,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
17
17
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
18
18
|
import Layer from '../Layer';
|
|
19
19
|
var packageName = "@atlaskit/editor-common";
|
|
20
|
-
var packageVersion = "78.26.
|
|
20
|
+
var packageVersion = "78.26.4";
|
|
21
21
|
var halfFocusRing = 1;
|
|
22
22
|
var dropOffset = '0, 8';
|
|
23
23
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -44,6 +44,21 @@ export declare const helpDialogMessages: {
|
|
|
44
44
|
defaultMessage: string;
|
|
45
45
|
description: string;
|
|
46
46
|
};
|
|
47
|
+
selectColumnResize: {
|
|
48
|
+
id: string;
|
|
49
|
+
defaultMessage: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
increaseColumnSize: {
|
|
53
|
+
id: string;
|
|
54
|
+
defaultMessage: string;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
decreaseColumnSize: {
|
|
58
|
+
id: string;
|
|
59
|
+
defaultMessage: string;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
47
62
|
increaseSize: {
|
|
48
63
|
id: string;
|
|
49
64
|
defaultMessage: string;
|
|
@@ -11,5 +11,5 @@ export declare const layoutToWidth: {
|
|
|
11
11
|
* If current node selection is not nested will return undefined
|
|
12
12
|
*/
|
|
13
13
|
export declare const getParentNodeWidth: (pos: number | undefined, state: EditorState, containerWidth: EditorContainerWidth, isFullWidthModeEnabled?: boolean) => any;
|
|
14
|
-
export declare const getTableContainerWidth: (node
|
|
14
|
+
export declare const getTableContainerWidth: (node?: PMNode) => number;
|
|
15
15
|
export declare const getTableWidthWithNumberColumn: (node: PMNode, offset: number) => number;
|
|
@@ -116,10 +116,22 @@ ExtractPluginDependencies<Plugin>[number] extends (ExtractPluginDependencies<Plu
|
|
|
116
116
|
* unwrapping `Plugins` via `ExtractNextEditorPlugin`
|
|
117
117
|
*/
|
|
118
118
|
| (ExtractPluginDependencies<Plugin>[number] & ExtractNextEditorPlugin<PluginsStack[number]>) ? Plugin : never;
|
|
119
|
+
type FilterExistingPlugins<T extends DependencyPlugin[], PluginsStack extends AllEditorPresetPluginTypes[]> = T extends [
|
|
120
|
+
infer CurrentPluginDependency,
|
|
121
|
+
...infer RemainingPluginDependencies
|
|
122
|
+
] ? RemainingPluginDependencies extends DependencyPlugin[] ? CurrentPluginDependency extends PluginsStack[number] ? FilterExistingPlugins<RemainingPluginDependencies, PluginsStack> : [
|
|
123
|
+
CurrentPluginDependency,
|
|
124
|
+
...FilterExistingPlugins<RemainingPluginDependencies, PluginsStack>
|
|
125
|
+
] : T : T;
|
|
126
|
+
type DependencyErrorMessage<Message extends string> = {
|
|
127
|
+
errorMessage: Message;
|
|
128
|
+
};
|
|
129
|
+
type ExtractRequiredDependencies<Plugin, PluginsStack extends AllEditorPresetPluginTypes[]> = Plugin extends NextEditorPlugin<infer PluginName, infer Metadata> ? Metadata['dependencies'] extends undefined ? DependencyErrorMessage<'No found dependencies'> : Metadata['dependencies'] extends DependencyPlugin[] ? FilterOptionalPlugins<FilterExistingPlugins<Metadata['dependencies'], PluginsStack>>[number] extends NextEditorPlugin<infer Name, any> ? Name : DependencyErrorMessage<`Invalid dependency for ${PluginName}`> : DependencyErrorMessage<`Invalid dependencies for ${PluginName}`> : DependencyErrorMessage<'Plugin is not NextEditorPlugin'>;
|
|
130
|
+
type GetDependencyErrorMessage<Plugin, StackPlugins extends AllEditorPresetPluginTypes[]> = ExtractRequiredDependencies<Plugin, StackPlugins> extends string ? DependencyErrorMessage<`Missing dependency: ${ExtractRequiredDependencies<Plugin, StackPlugins>}Plugin`> : ExtractRequiredDependencies<Plugin, StackPlugins>;
|
|
119
131
|
/**
|
|
120
132
|
* Used to check if a plugin being added can be added to a Preset/builder
|
|
121
133
|
*/
|
|
122
|
-
export type SafePresetCheck<Plugin, StackPlugins extends AllEditorPresetPluginTypes[]> = Plugin extends Plugin & VerifyPluginDependencies<Plugin, StackPlugins> ? Plugin extends NextEditorPlugin<any, any> ? CheckBasicPlugin<Plugin> : never :
|
|
134
|
+
export type SafePresetCheck<Plugin, StackPlugins extends AllEditorPresetPluginTypes[]> = Plugin extends Plugin & VerifyPluginDependencies<Plugin, StackPlugins> ? Plugin extends NextEditorPlugin<any, any> ? CheckBasicPlugin<Plugin> : never : GetDependencyErrorMessage<Plugin, StackPlugins>;
|
|
123
135
|
type CheckTupleRequirements<Plugin, Config, ArrayType> = unknown extends Config ? Plugin | ArrayType : undefined extends Config ? Plugin | ArrayType : [
|
|
124
136
|
Config
|
|
125
137
|
] extends [never] ? Plugin : ArrayType;
|
|
@@ -44,6 +44,21 @@ export declare const helpDialogMessages: {
|
|
|
44
44
|
defaultMessage: string;
|
|
45
45
|
description: string;
|
|
46
46
|
};
|
|
47
|
+
selectColumnResize: {
|
|
48
|
+
id: string;
|
|
49
|
+
defaultMessage: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
increaseColumnSize: {
|
|
53
|
+
id: string;
|
|
54
|
+
defaultMessage: string;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
decreaseColumnSize: {
|
|
58
|
+
id: string;
|
|
59
|
+
defaultMessage: string;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
47
62
|
increaseSize: {
|
|
48
63
|
id: string;
|
|
49
64
|
defaultMessage: string;
|
|
@@ -11,5 +11,5 @@ export declare const layoutToWidth: {
|
|
|
11
11
|
* If current node selection is not nested will return undefined
|
|
12
12
|
*/
|
|
13
13
|
export declare const getParentNodeWidth: (pos: number | undefined, state: EditorState, containerWidth: EditorContainerWidth, isFullWidthModeEnabled?: boolean) => any;
|
|
14
|
-
export declare const getTableContainerWidth: (node
|
|
14
|
+
export declare const getTableContainerWidth: (node?: PMNode) => number;
|
|
15
15
|
export declare const getTableWidthWithNumberColumn: (node: PMNode, offset: number) => number;
|
|
@@ -131,10 +131,22 @@ ExtractPluginDependencies<Plugin>[number] extends (ExtractPluginDependencies<Plu
|
|
|
131
131
|
* unwrapping `Plugins` via `ExtractNextEditorPlugin`
|
|
132
132
|
*/
|
|
133
133
|
| (ExtractPluginDependencies<Plugin>[number] & ExtractNextEditorPlugin<PluginsStack[number]>) ? Plugin : never;
|
|
134
|
+
type FilterExistingPlugins<T extends DependencyPlugin[], PluginsStack extends AllEditorPresetPluginTypes[]> = T extends [
|
|
135
|
+
infer CurrentPluginDependency,
|
|
136
|
+
...infer RemainingPluginDependencies
|
|
137
|
+
] ? RemainingPluginDependencies extends DependencyPlugin[] ? CurrentPluginDependency extends PluginsStack[number] ? FilterExistingPlugins<RemainingPluginDependencies, PluginsStack> : [
|
|
138
|
+
CurrentPluginDependency,
|
|
139
|
+
...FilterExistingPlugins<RemainingPluginDependencies, PluginsStack>
|
|
140
|
+
] : T : T;
|
|
141
|
+
type DependencyErrorMessage<Message extends string> = {
|
|
142
|
+
errorMessage: Message;
|
|
143
|
+
};
|
|
144
|
+
type ExtractRequiredDependencies<Plugin, PluginsStack extends AllEditorPresetPluginTypes[]> = Plugin extends NextEditorPlugin<infer PluginName, infer Metadata> ? Metadata['dependencies'] extends undefined ? DependencyErrorMessage<'No found dependencies'> : Metadata['dependencies'] extends DependencyPlugin[] ? FilterOptionalPlugins<FilterExistingPlugins<Metadata['dependencies'], PluginsStack>>[number] extends NextEditorPlugin<infer Name, any> ? Name : DependencyErrorMessage<`Invalid dependency for ${PluginName}`> : DependencyErrorMessage<`Invalid dependencies for ${PluginName}`> : DependencyErrorMessage<'Plugin is not NextEditorPlugin'>;
|
|
145
|
+
type GetDependencyErrorMessage<Plugin, StackPlugins extends AllEditorPresetPluginTypes[]> = ExtractRequiredDependencies<Plugin, StackPlugins> extends string ? DependencyErrorMessage<`Missing dependency: ${ExtractRequiredDependencies<Plugin, StackPlugins>}Plugin`> : ExtractRequiredDependencies<Plugin, StackPlugins>;
|
|
134
146
|
/**
|
|
135
147
|
* Used to check if a plugin being added can be added to a Preset/builder
|
|
136
148
|
*/
|
|
137
|
-
export type SafePresetCheck<Plugin, StackPlugins extends AllEditorPresetPluginTypes[]> = Plugin extends Plugin & VerifyPluginDependencies<Plugin, StackPlugins> ? Plugin extends NextEditorPlugin<any, any> ? CheckBasicPlugin<Plugin> : never :
|
|
149
|
+
export type SafePresetCheck<Plugin, StackPlugins extends AllEditorPresetPluginTypes[]> = Plugin extends Plugin & VerifyPluginDependencies<Plugin, StackPlugins> ? Plugin extends NextEditorPlugin<any, any> ? CheckBasicPlugin<Plugin> : never : GetDependencyErrorMessage<Plugin, StackPlugins>;
|
|
138
150
|
type CheckTupleRequirements<Plugin, Config, ArrayType> = unknown extends Config ? Plugin | ArrayType : undefined extends Config ? Plugin | ArrayType : [
|
|
139
151
|
Config
|
|
140
152
|
] extends [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "78.26.
|
|
3
|
+
"version": "78.26.4",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"@atlaskit/icon": "^22.1.0",
|
|
114
114
|
"@atlaskit/icon-object": "^6.3.0",
|
|
115
115
|
"@atlaskit/in-product-testing": "^0.2.0",
|
|
116
|
-
"@atlaskit/link-datasource": "^1.
|
|
116
|
+
"@atlaskit/link-datasource": "^1.27.0",
|
|
117
117
|
"@atlaskit/link-picker": "^1.34.0",
|
|
118
118
|
"@atlaskit/media-card": "^77.11.0",
|
|
119
119
|
"@atlaskit/media-client": "^26.3.0",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"@atlaskit/primitives": "^5.5.0",
|
|
130
130
|
"@atlaskit/profilecard": "^19.11.0",
|
|
131
131
|
"@atlaskit/section-message": "^6.4.0",
|
|
132
|
-
"@atlaskit/smart-card": "^26.
|
|
132
|
+
"@atlaskit/smart-card": "^26.54.0",
|
|
133
133
|
"@atlaskit/smart-user-picker": "^6.9.0",
|
|
134
134
|
"@atlaskit/spinner": "^16.0.0",
|
|
135
135
|
"@atlaskit/task-decision": "^17.9.0",
|