@atlaskit/editor-core 175.0.1 → 175.0.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.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/plugins/extension/ui/styles.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/extension/ui/styles.js +42 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/extension/ui/styles.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/ReactEditorView.d.ts +8 -8
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 175.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c1d2045d68f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c1d2045d68f) - [ux] Fix margins for extensions with fragment marks
|
|
8
|
+
|
|
9
|
+
## 175.0.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`560af4b794c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/560af4b794c) - Preventing ReactEditorView declaration file from being generated with cypress types by changing the shape of the interface.
|
|
14
|
+
|
|
3
15
|
## 175.0.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -17,5 +17,5 @@ var _tokens = require("@atlaskit/tokens");
|
|
|
17
17
|
|
|
18
18
|
var _templateObject;
|
|
19
19
|
|
|
20
|
-
var extensionStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .extensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n"])), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedBorderSize, (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteBorder), (0, _tokens.token)('color.background.danger', _editorSharedStyles.akEditorDeleteBackground));
|
|
20
|
+
var extensionStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .extensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n\n [data-mark-type='fragment'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n }\n\n &:first-child {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n }\n }\n\n &:nth-last-of-type(-n + 2):not(:first-of-type) {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n }\n }\n }\n"])), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedBorderSize, (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteBorder), (0, _tokens.token)('color.background.danger', _editorSharedStyles.akEditorDeleteBackground), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin);
|
|
21
21
|
exports.extensionStyles = extensionStyles;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "175.0.
|
|
9
|
+
var version = "175.0.3";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
|
|
12
12
|
var nextMajorVersion = function nextMajorVersion() {
|
package/dist/cjs/version.json
CHANGED
|
@@ -41,4 +41,46 @@ export const extensionStyles = css`
|
|
|
41
41
|
width: 100%;
|
|
42
42
|
max-width: 100%; // ensure width can't go over 100%;
|
|
43
43
|
}
|
|
44
|
+
|
|
45
|
+
[data-mark-type='fragment'] {
|
|
46
|
+
& > .extensionView-content-wrap,
|
|
47
|
+
& > .bodiedExtensionView-content-wrap {
|
|
48
|
+
margin: ${blockNodesVerticalMargin} 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
& > [data-mark-type='dataConsumer'] {
|
|
52
|
+
& > .extensionView-content-wrap,
|
|
53
|
+
& > .bodiedExtensionView-content-wrap {
|
|
54
|
+
margin: ${blockNodesVerticalMargin} 0;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:first-child {
|
|
59
|
+
& > .extensionView-content-wrap,
|
|
60
|
+
& > .bodiedExtensionView-content-wrap {
|
|
61
|
+
margin-top: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
& > [data-mark-type='dataConsumer'] {
|
|
65
|
+
& > .extensionView-content-wrap,
|
|
66
|
+
& > .bodiedExtensionView-content-wrap {
|
|
67
|
+
margin-top: 0;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&:nth-last-of-type(-n + 2):not(:first-of-type) {
|
|
73
|
+
& > .extensionView-content-wrap,
|
|
74
|
+
& > .bodiedExtensionView-content-wrap {
|
|
75
|
+
margin-bottom: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
& > [data-mark-type='dataConsumer'] {
|
|
79
|
+
& > .extensionView-content-wrap,
|
|
80
|
+
& > .bodiedExtensionView-content-wrap {
|
|
81
|
+
margin-bottom: 0;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
44
86
|
`;
|
package/dist/es2019/version.json
CHANGED
|
@@ -5,4 +5,4 @@ var _templateObject;
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { blockNodesVerticalMargin, akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackground, SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
7
7
|
import { token } from '@atlaskit/tokens';
|
|
8
|
-
export var extensionStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .extensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n"])), blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow]), akEditorSelectedBorderSize, token('color.border.danger', akEditorDeleteBorder), token('color.background.danger', akEditorDeleteBackground));
|
|
8
|
+
export var extensionStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .extensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n\n [data-mark-type='fragment'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n }\n\n &:first-child {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n }\n }\n\n &:nth-last-of-type(-n + 2):not(:first-of-type) {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n }\n }\n }\n"])), blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow]), akEditorSelectedBorderSize, token('color.border.danger', akEditorDeleteBorder), token('color.background.danger', akEditorDeleteBackground), blockNodesVerticalMargin, blockNodesVerticalMargin);
|
package/dist/esm/version.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import PropTypes from 'prop-types';
|
|
4
3
|
import { EditorState } from 'prosemirror-state';
|
|
@@ -48,6 +47,13 @@ export interface EditorViewProps {
|
|
|
48
47
|
}) => void;
|
|
49
48
|
}
|
|
50
49
|
export declare function shouldReconfigureState(props: EditorProps, nextProps: EditorProps): boolean;
|
|
50
|
+
interface CreateEditorStateOptions {
|
|
51
|
+
props: EditorViewProps;
|
|
52
|
+
context: EditorReactContext;
|
|
53
|
+
doc?: string | Object | PMNode;
|
|
54
|
+
resetting?: boolean;
|
|
55
|
+
selectionAtStart?: boolean;
|
|
56
|
+
}
|
|
51
57
|
export declare class ReactEditorView<T = {}> extends React.Component<EditorViewProps & WrappedComponentProps & T, {}, EditorReactContext> {
|
|
52
58
|
view?: EditorView;
|
|
53
59
|
eventDispatcher: EventDispatcher;
|
|
@@ -90,13 +96,7 @@ export declare class ReactEditorView<T = {}> extends React.Component<EditorViewP
|
|
|
90
96
|
componentWillUnmount(): void;
|
|
91
97
|
private editorPlugins;
|
|
92
98
|
getPlugins(editorProps: EditorProps, prevEditorProps?: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): EditorPlugin[];
|
|
93
|
-
createEditorState: (options:
|
|
94
|
-
props: EditorViewProps;
|
|
95
|
-
context: EditorReactContext;
|
|
96
|
-
doc?: string | Object | PMNode<any> | undefined;
|
|
97
|
-
resetting?: boolean | undefined;
|
|
98
|
-
selectionAtStart?: boolean | undefined;
|
|
99
|
-
}) => EditorState<any>;
|
|
99
|
+
createEditorState: (options: CreateEditorStateOptions) => EditorState<any>;
|
|
100
100
|
private onEditorViewStateUpdated;
|
|
101
101
|
private trackValidTransactions;
|
|
102
102
|
private dispatchTransaction;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "175.0.
|
|
3
|
+
"version": "175.0.3",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/code": "^14.4.0",
|
|
42
42
|
"@atlaskit/date": "^0.9.0",
|
|
43
43
|
"@atlaskit/datetime-picker": "^12.3.0",
|
|
44
|
-
"@atlaskit/editor-common": "^70.
|
|
44
|
+
"@atlaskit/editor-common": "^70.3.0",
|
|
45
45
|
"@atlaskit/editor-json-transformer": "^8.8.0",
|
|
46
46
|
"@atlaskit/editor-markdown-transformer": "^4.1.0",
|
|
47
47
|
"@atlaskit/editor-plugin-table": "^0.1.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@atlaskit/radio": "^5.4.0",
|
|
70
70
|
"@atlaskit/section-message": "^6.3.0",
|
|
71
71
|
"@atlaskit/select": "^15.7.0",
|
|
72
|
-
"@atlaskit/smart-card": "^23.
|
|
72
|
+
"@atlaskit/smart-card": "^23.6.0",
|
|
73
73
|
"@atlaskit/smart-user-picker": "^6.0.0",
|
|
74
74
|
"@atlaskit/spinner": "^15.2.0",
|
|
75
75
|
"@atlaskit/status": "^1.2.0",
|