@atlaskit/editor-core 193.28.0 → 193.28.5
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 +17 -0
- package/afm-jira/tsconfig.json +85 -0
- package/dist/cjs/create-editor/ErrorBoundary.js +1 -1
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/ui/Appearance/Comment/Comment.js +5 -5
- package/dist/cjs/ui/ToolbarFeedback/index.js +3 -3
- package/dist/cjs/utils/document.js +0 -8
- package/dist/cjs/utils/index.js +0 -38
- package/dist/cjs/utils/nodes.js +0 -30
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ErrorBoundary.js +1 -1
- package/dist/es2019/index.js +2 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/es2019/ui/ToolbarFeedback/index.js +1 -1
- package/dist/es2019/utils/document.js +1 -8
- package/dist/es2019/utils/index.js +1 -3
- package/dist/es2019/utils/nodes.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ErrorBoundary.js +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
- package/dist/esm/utils/document.js +1 -8
- package/dist/esm/utils/index.js +1 -3
- package/dist/esm/utils/nodes.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/ErrorBoundary.d.ts +2 -5
- package/dist/types/index.d.ts +2 -1
- package/dist/types/utils/document.d.ts +0 -3
- package/dist/types/utils/index.d.ts +1 -3
- package/dist/types/utils/nodes.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/ErrorBoundary.d.ts +2 -5
- package/dist/types-ts4.5/index.d.ts +2 -1
- package/dist/types-ts4.5/utils/document.d.ts +0 -3
- package/dist/types-ts4.5/utils/index.d.ts +1 -3
- package/dist/types-ts4.5/utils/nodes.d.ts +1 -1
- package/package.json +6 -6
- package/tsconfig.json +2 -1
- package/dist/cjs/utils/clipboard.js +0 -24
- package/dist/cjs/utils/commands.js +0 -22
- package/dist/cjs/utils/dom.js +0 -60
- package/dist/cjs/utils/plugin-state-factory.js +0 -12
- package/dist/cjs/utils/selection.js +0 -38
- package/dist/cjs/utils/slice.js +0 -36
- package/dist/es2019/utils/clipboard.js +0 -1
- package/dist/es2019/utils/commands.js +0 -19
- package/dist/es2019/utils/dom.js +0 -1
- package/dist/es2019/utils/plugin-state-factory.js +0 -1
- package/dist/es2019/utils/selection.js +0 -9
- package/dist/es2019/utils/slice.js +0 -1
- package/dist/esm/utils/clipboard.js +0 -1
- package/dist/esm/utils/commands.js +0 -17
- package/dist/esm/utils/dom.js +0 -1
- package/dist/esm/utils/plugin-state-factory.js +0 -1
- package/dist/esm/utils/selection.js +0 -9
- package/dist/esm/utils/slice.js +0 -1
- package/dist/types/utils/clipboard.d.ts +0 -1
- package/dist/types/utils/commands.d.ts +0 -13
- package/dist/types/utils/dom.d.ts +0 -2
- package/dist/types/utils/plugin-state-factory.d.ts +0 -2
- package/dist/types/utils/selection.d.ts +0 -3
- package/dist/types/utils/slice.d.ts +0 -2
- package/dist/types-ts4.5/utils/clipboard.d.ts +0 -1
- package/dist/types-ts4.5/utils/commands.d.ts +0 -13
- package/dist/types-ts4.5/utils/dom.d.ts +0 -2
- package/dist/types-ts4.5/utils/plugin-state-factory.d.ts +0 -2
- package/dist/types-ts4.5/utils/selection.d.ts +0 -3
- package/dist/types-ts4.5/utils/slice.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 193.28.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#114448](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114448)
|
|
8
|
+
[`68d40145e3e0a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/68d40145e3e0a) -
|
|
9
|
+
Remove unused barrel util files.
|
|
10
|
+
|
|
11
|
+
## 193.28.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#114683](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114683)
|
|
16
|
+
[`ff0815316ab38`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ff0815316ab38) -
|
|
17
|
+
Removes usage of custom theme button in places where its API is not being used and the default
|
|
18
|
+
button is able to be used instead. This should give a slight performance (runtime) improvement.
|
|
19
|
+
|
|
3
20
|
## 193.28.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.jira.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"outDir": "../../../../../tsDist/@atlaskit__editor-core/app",
|
|
7
|
+
"composite": true,
|
|
8
|
+
"rootDir": "../"
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"../src/**/*.ts",
|
|
12
|
+
"../src/**/*.tsx"
|
|
13
|
+
],
|
|
14
|
+
"exclude": [
|
|
15
|
+
"../src/**/__tests__/*",
|
|
16
|
+
"../src/**/*.test.*",
|
|
17
|
+
"../src/**/test.*",
|
|
18
|
+
"../src/stories/*"
|
|
19
|
+
],
|
|
20
|
+
"references": [
|
|
21
|
+
{
|
|
22
|
+
"path": "../../activity-provider/afm-jira/tsconfig.json"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"path": "../../../analytics/analytics-namespaced-context/afm-jira/tsconfig.json"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"path": "../../../analytics/analytics-next/afm-jira/tsconfig.json"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "../../../design-system/button/afm-jira/tsconfig.json"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"path": "../../editor-common/afm-jira/tsconfig.json"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"path": "../../editor-json-transformer/afm-jira/tsconfig.json"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"path": "../../editor-plugins/afm-jira/tsconfig.json"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"path": "../../editor-shared-styles/afm-jira/tsconfig.json"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"path": "../../../elements/emoji/afm-jira/tsconfig.json"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"path": "../../../design-system/icon/afm-jira/tsconfig.json"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"path": "../../../media/media-card/afm-jira/tsconfig.json"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"path": "../../../elements/mention/afm-jira/tsconfig.json"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"path": "../../../design-system/spinner/afm-jira/tsconfig.json"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"path": "../../../elements/task-decision/afm-jira/tsconfig.json"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"path": "../../../design-system/theme/afm-jira/tsconfig.json"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"path": "../../../design-system/tokens/afm-jira/tsconfig.json"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"path": "../../../design-system/tooltip/afm-jira/tsconfig.json"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"path": "../../../design-system/width-detector/afm-jira/tsconfig.json"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"path": "../../../linking-platform/link-provider/afm-jira/tsconfig.json"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"path": "../../../media/media-core/afm-jira/tsconfig.json"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
@@ -134,7 +134,7 @@ var ErrorBoundaryWithEditorView = exports.ErrorBoundaryWithEditorView = /*#__PUR
|
|
|
134
134
|
browserInfo: attributes.browserInfo,
|
|
135
135
|
error: attributes.error.toString(),
|
|
136
136
|
errorInfo: {
|
|
137
|
-
componentStack: attributes.errorInfo.componentStack
|
|
137
|
+
componentStack: attributes.errorInfo.componentStack || undefined
|
|
138
138
|
},
|
|
139
139
|
errorId: attributes.errorId,
|
|
140
140
|
browserExtensions: (_attributes$browserEx = attributes.browserExtensions) === null || _attributes$browserEx === void 0 ? void 0 : _attributes$browserEx.toString(),
|
package/dist/cjs/index.js
CHANGED
|
@@ -157,7 +157,7 @@ Object.defineProperty(exports, "name", {
|
|
|
157
157
|
Object.defineProperty(exports, "setTextSelection", {
|
|
158
158
|
enumerable: true,
|
|
159
159
|
get: function get() {
|
|
160
|
-
return
|
|
160
|
+
return _utils2.setTextSelection;
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
163
|
Object.defineProperty(exports, "version", {
|
|
@@ -181,6 +181,7 @@ var _teamResource = require("@atlaskit/mention/team-resource");
|
|
|
181
181
|
var _annotation = require("@atlaskit/editor-common/annotation");
|
|
182
182
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
183
183
|
var _utils = require("./utils");
|
|
184
|
+
var _utils2 = require("@atlaskit/editor-common/utils");
|
|
184
185
|
var _actions = _interopRequireDefault(require("./actions"));
|
|
185
186
|
var _portalProvider = require("@atlaskit/editor-common/portal-provider");
|
|
186
187
|
var _ContentStyles = require("./ui/ContentStyles");
|
|
@@ -18,8 +18,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
18
18
|
var _react2 = require("@emotion/react");
|
|
19
19
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
20
20
|
var _reactIntlNext = require("react-intl-next");
|
|
21
|
+
var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
21
22
|
var _buttonGroup = _interopRequireDefault(require("@atlaskit/button/button-group"));
|
|
22
|
-
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
23
23
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
24
24
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
25
25
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
@@ -236,12 +236,12 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
236
236
|
}))), showSecondaryToolbar && (0, _react2.jsx)("div", {
|
|
237
237
|
css: secondaryToolbarStyles,
|
|
238
238
|
"data-testid": "ak-editor-secondary-toolbar"
|
|
239
|
-
}, (0, _react2.jsx)(_buttonGroup.default, null, !!onSave && (0, _react2.jsx)(
|
|
239
|
+
}, (0, _react2.jsx)(_buttonGroup.default, null, !!onSave && (0, _react2.jsx)(_button.default, {
|
|
240
240
|
appearance: "primary",
|
|
241
241
|
onClick: _this.handleSave,
|
|
242
242
|
testId: "comment-save-button",
|
|
243
243
|
isDisabled: disabled || mediaState && !mediaState.allUploadsFinished
|
|
244
|
-
}, intl.formatMessage(_messages.default.saveButton)), !!onCancel && (0, _react2.jsx)(
|
|
244
|
+
}, intl.formatMessage(_messages.default.saveButton)), !!onCancel && (0, _react2.jsx)(_button.default, {
|
|
245
245
|
appearance: "subtle",
|
|
246
246
|
onClick: _this.handleCancel,
|
|
247
247
|
isDisabled: disabled
|
|
@@ -435,12 +435,12 @@ var EditorNext = function EditorNext(props) {
|
|
|
435
435
|
}))), showSecondaryToolbar && (0, _react2.jsx)("div", {
|
|
436
436
|
css: secondaryToolbarStyles,
|
|
437
437
|
"data-testid": "ak-editor-secondary-toolbar"
|
|
438
|
-
}, (0, _react2.jsx)(_buttonGroup.default, null, !!onSave && (0, _react2.jsx)(
|
|
438
|
+
}, (0, _react2.jsx)(_buttonGroup.default, null, !!onSave && (0, _react2.jsx)(_button.default, {
|
|
439
439
|
appearance: "primary",
|
|
440
440
|
onClick: handleSave,
|
|
441
441
|
testId: "comment-save-button",
|
|
442
442
|
isDisabled: disabled || saveButtonDisabled
|
|
443
|
-
}, intl.formatMessage(_messages.default.saveButton)), !!onCancel && (0, _react2.jsx)(
|
|
443
|
+
}, intl.formatMessage(_messages.default.saveButton)), !!onCancel && (0, _react2.jsx)(_button.default, {
|
|
444
444
|
appearance: "subtle",
|
|
445
445
|
onClick: handleCancel,
|
|
446
446
|
isDisabled: disabled
|
|
@@ -19,8 +19,8 @@ var _react = require("react");
|
|
|
19
19
|
var _react2 = require("@emotion/react");
|
|
20
20
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
21
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
22
|
+
var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
22
23
|
var _buttonGroup = _interopRequireDefault(require("@atlaskit/button/button-group"));
|
|
23
|
-
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
24
24
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
25
25
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
26
26
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
@@ -193,10 +193,10 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
193
193
|
src: EDITOR_IMAGE_URL
|
|
194
194
|
})), (0, _react2.jsx)("div", {
|
|
195
195
|
css: _styles.confirmationText
|
|
196
|
-
}, (0, _react2.jsx)("div", null, "We are rolling out a new editing experience across Atlassian products. Help us improve by providing feedback."), (0, _react2.jsx)("div", null, "You can opt-out for now by turning off the \"Atlassian Editor\" feature on the Labs page in Bitbucket settings."), (0, _react2.jsx)(_buttonGroup.default, null, (0, _react2.jsx)(
|
|
196
|
+
}, (0, _react2.jsx)("div", null, "We are rolling out a new editing experience across Atlassian products. Help us improve by providing feedback."), (0, _react2.jsx)("div", null, "You can opt-out for now by turning off the \"Atlassian Editor\" feature on the Labs page in Bitbucket settings."), (0, _react2.jsx)(_buttonGroup.default, null, (0, _react2.jsx)(_button.default, {
|
|
197
197
|
appearance: "primary",
|
|
198
198
|
onClick: this.openFeedbackPopup
|
|
199
|
-
}, "Give feedback"), (0, _react2.jsx)(
|
|
199
|
+
}, "Give feedback"), (0, _react2.jsx)(_button.default, {
|
|
200
200
|
appearance: "default",
|
|
201
201
|
onClick: this.openLearnMorePage
|
|
202
202
|
}, "Learn more")))))) : null;
|
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, "isInEmptyLine", {
|
|
|
12
12
|
return _utils.isInEmptyLine;
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
|
-
exports.nodesBetweenChanged = nodesBetweenChanged;
|
|
16
15
|
exports.processRawFragmentValue = processRawFragmentValue;
|
|
17
16
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
18
17
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
@@ -32,13 +31,6 @@ function processRawFragmentValue(schema, value, providerFactory, sanitizePrivate
|
|
|
32
31
|
}
|
|
33
32
|
return _model.Fragment.from(adfEntities);
|
|
34
33
|
}
|
|
35
|
-
function nodesBetweenChanged(tr, f, startPos) {
|
|
36
|
-
var stepRange = (0, _utils.getStepRange)(tr);
|
|
37
|
-
if (!stepRange) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
tr.doc.nodesBetween(stepRange.from, stepRange.to, f, startPos);
|
|
41
|
-
}
|
|
42
34
|
function getNodesCount(node) {
|
|
43
35
|
var count = {};
|
|
44
36
|
node.nodesBetween(0, node.nodeSize - 2, function (node) {
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -59,19 +59,7 @@ Object.defineProperty(exports, "isLastItemMediaGroup", {
|
|
|
59
59
|
return _utils.isLastItemMediaGroup;
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
|
-
Object.defineProperty(exports, "isLinkMark", {
|
|
63
|
-
enumerable: true,
|
|
64
|
-
get: function get() {
|
|
65
|
-
return _nodes.isLinkMark;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
62
|
exports.isMarkTypeAllowedInCurrentSelection = isMarkTypeAllowedInCurrentSelection;
|
|
69
|
-
Object.defineProperty(exports, "isParagraph", {
|
|
70
|
-
enumerable: true,
|
|
71
|
-
get: function get() {
|
|
72
|
-
return _nodes.isParagraph;
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
63
|
Object.defineProperty(exports, "isSelectionInsideLastNodeInDocument", {
|
|
76
64
|
enumerable: true,
|
|
77
65
|
get: function get() {
|
|
@@ -79,12 +67,6 @@ Object.defineProperty(exports, "isSelectionInsideLastNodeInDocument", {
|
|
|
79
67
|
}
|
|
80
68
|
});
|
|
81
69
|
exports.isTemporary = void 0;
|
|
82
|
-
Object.defineProperty(exports, "isText", {
|
|
83
|
-
enumerable: true,
|
|
84
|
-
get: function get() {
|
|
85
|
-
return _nodes.isText;
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
70
|
Object.defineProperty(exports, "isTextSelection", {
|
|
89
71
|
enumerable: true,
|
|
90
72
|
get: function get() {
|
|
@@ -103,30 +85,12 @@ Object.defineProperty(exports, "nodeToJSON", {
|
|
|
103
85
|
return _utils.nodeToJSON;
|
|
104
86
|
}
|
|
105
87
|
});
|
|
106
|
-
Object.defineProperty(exports, "nodesBetweenChanged", {
|
|
107
|
-
enumerable: true,
|
|
108
|
-
get: function get() {
|
|
109
|
-
return _document.nodesBetweenChanged;
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
88
|
Object.defineProperty(exports, "nonNullable", {
|
|
113
89
|
enumerable: true,
|
|
114
90
|
get: function get() {
|
|
115
91
|
return _utils.nonNullable;
|
|
116
92
|
}
|
|
117
93
|
});
|
|
118
|
-
Object.defineProperty(exports, "setNodeSelection", {
|
|
119
|
-
enumerable: true,
|
|
120
|
-
get: function get() {
|
|
121
|
-
return _selection.setNodeSelection;
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
Object.defineProperty(exports, "setTextSelection", {
|
|
125
|
-
enumerable: true,
|
|
126
|
-
get: function get() {
|
|
127
|
-
return _selection.setTextSelection;
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
94
|
exports.stringRepeat = stringRepeat;
|
|
131
95
|
exports.sum = sum;
|
|
132
96
|
Object.defineProperty(exports, "toJSON", {
|
|
@@ -140,8 +104,6 @@ var _commands = require("@atlaskit/editor-prosemirror/commands");
|
|
|
140
104
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
141
105
|
var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
142
106
|
var _document = require("./document");
|
|
143
|
-
var _nodes = require("./nodes");
|
|
144
|
-
var _selection = require("./selection");
|
|
145
107
|
var _measureEnum = _interopRequireDefault(require("./performance/measure-enum"));
|
|
146
108
|
var _steps = require("@atlaskit/adf-schema/steps");
|
|
147
109
|
function isMarkTypeCompatibleWithMark(markType, mark) {
|
package/dist/cjs/utils/nodes.js
CHANGED
|
@@ -15,42 +15,12 @@ Object.defineProperty(exports, "findChangedNodesFromTransaction", {
|
|
|
15
15
|
return _utils.findChangedNodesFromTransaction;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
Object.defineProperty(exports, "isLinkMark", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _utils.isLinkMark;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
18
|
Object.defineProperty(exports, "isNodeSelectedOrInRange", {
|
|
25
19
|
enumerable: true,
|
|
26
20
|
get: function get() {
|
|
27
21
|
return _utils.isNodeSelectedOrInRange;
|
|
28
22
|
}
|
|
29
23
|
});
|
|
30
|
-
Object.defineProperty(exports, "isParagraph", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _utils.isParagraph;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "isSupportedInParent", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function get() {
|
|
39
|
-
return _utils.isSupportedInParent;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "isText", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function get() {
|
|
45
|
-
return _utils.isText;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "isType", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function get() {
|
|
51
|
-
return _utils.isType;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
24
|
Object.defineProperty(exports, "validNode", {
|
|
55
25
|
enumerable: true,
|
|
56
26
|
get: function get() {
|
|
@@ -85,7 +85,7 @@ export class ErrorBoundaryWithEditorView extends React.Component {
|
|
|
85
85
|
browserInfo: attributes.browserInfo,
|
|
86
86
|
error: attributes.error.toString(),
|
|
87
87
|
errorInfo: {
|
|
88
|
-
componentStack: attributes.errorInfo.componentStack
|
|
88
|
+
componentStack: attributes.errorInfo.componentStack || undefined
|
|
89
89
|
},
|
|
90
90
|
errorId: attributes.errorId,
|
|
91
91
|
browserExtensions: (_attributes$browserEx = attributes.browserExtensions) === null || _attributes$browserEx === void 0 ? void 0 : _attributes$browserEx.toString(),
|
package/dist/es2019/index.js
CHANGED
|
@@ -30,7 +30,8 @@ export { AnnotationUpdateEmitter } from '@atlaskit/editor-common/annotation';
|
|
|
30
30
|
|
|
31
31
|
export { INPUT_METHOD, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
32
32
|
// Used in editor-test-helpers and mobile bridge
|
|
33
|
-
export {
|
|
33
|
+
export { getNodesCount, measurements } from './utils';
|
|
34
|
+
export { setTextSelection } from '@atlaskit/editor-common/utils';
|
|
34
35
|
export { default as EditorActions } from './actions';
|
|
35
36
|
// Re-export from provider factory to not cause a breaking change
|
|
36
37
|
|
|
@@ -6,8 +6,8 @@ import React, { Fragment, useCallback, useEffect, useMemo, useState } from 'reac
|
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
7
7
|
import classnames from 'classnames';
|
|
8
8
|
import { injectIntl } from 'react-intl-next';
|
|
9
|
+
import Button from '@atlaskit/button';
|
|
9
10
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
10
|
-
import Button from '@atlaskit/button/custom-theme-button';
|
|
11
11
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
12
12
|
import { GRID_GUTTER } from '@atlaskit/editor-common/styles';
|
|
13
13
|
import { WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
@@ -7,8 +7,8 @@ import { PureComponent } from 'react';
|
|
|
7
7
|
import { jsx } from '@emotion/react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import ReactDOM from 'react-dom';
|
|
10
|
+
import Button from '@atlaskit/button';
|
|
10
11
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
11
|
-
import Button from '@atlaskit/button/custom-theme-button';
|
|
12
12
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
13
13
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
14
14
|
import { analyticsEventKey } from '@atlaskit/editor-common/utils';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { processRawValue } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { getBreakoutMode } from './node-width';
|
|
4
4
|
export { isInEmptyLine } from '@atlaskit/editor-common/utils';
|
|
@@ -12,13 +12,6 @@ export function processRawFragmentValue(schema, value, providerFactory, sanitize
|
|
|
12
12
|
}
|
|
13
13
|
return Fragment.from(adfEntities);
|
|
14
14
|
}
|
|
15
|
-
export function nodesBetweenChanged(tr, f, startPos) {
|
|
16
|
-
const stepRange = getStepRange(tr);
|
|
17
|
-
if (!stepRange) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
tr.doc.nodesBetween(stepRange.from, stepRange.to, f, startPos);
|
|
21
|
-
}
|
|
22
15
|
export function getNodesCount(node) {
|
|
23
16
|
let count = {};
|
|
24
17
|
node.nodesBetween(0, node.nodeSize - 2, node => {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { toggleMark } from '@atlaskit/editor-prosemirror/commands';
|
|
2
2
|
export { isEmptyNode, isSelectionInsideLastNodeInDocument, checkNodeDown, insideTableCell, isInListItem, toJSON, nodeToJSON } from '@atlaskit/editor-common/utils';
|
|
3
3
|
export { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
4
|
-
export {
|
|
5
|
-
export { isParagraph, isText, isLinkMark } from './nodes';
|
|
6
|
-
export { setNodeSelection, setTextSelection } from './selection';
|
|
4
|
+
export { getNodesCount } from './document';
|
|
7
5
|
export { default as measurements } from './performance/measure-enum';
|
|
8
6
|
function isMarkTypeCompatibleWithMark(markType, mark) {
|
|
9
7
|
return !mark.type.excludes(markType) && !markType.excludes(mark.type);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { findChangedNodesFromTransaction, validNode, validateNodes,
|
|
1
|
+
export { findChangedNodesFromTransaction, validNode, validateNodes, SelectedState, isNodeSelectedOrInRange } from '@atlaskit/editor-common/utils';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "193.28.
|
|
2
|
+
export const version = "193.28.5";
|
|
@@ -127,7 +127,7 @@ export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component
|
|
|
127
127
|
browserInfo: attributes.browserInfo,
|
|
128
128
|
error: attributes.error.toString(),
|
|
129
129
|
errorInfo: {
|
|
130
|
-
componentStack: attributes.errorInfo.componentStack
|
|
130
|
+
componentStack: attributes.errorInfo.componentStack || undefined
|
|
131
131
|
},
|
|
132
132
|
errorId: attributes.errorId,
|
|
133
133
|
browserExtensions: (_attributes$browserEx = attributes.browserExtensions) === null || _attributes$browserEx === void 0 ? void 0 : _attributes$browserEx.toString(),
|
package/dist/esm/index.js
CHANGED
|
@@ -30,7 +30,8 @@ export { AnnotationUpdateEmitter } from '@atlaskit/editor-common/annotation';
|
|
|
30
30
|
|
|
31
31
|
export { INPUT_METHOD, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
32
32
|
// Used in editor-test-helpers and mobile bridge
|
|
33
|
-
export {
|
|
33
|
+
export { getNodesCount, measurements } from './utils';
|
|
34
|
+
export { setTextSelection } from '@atlaskit/editor-common/utils';
|
|
34
35
|
export { default as EditorActions } from './actions';
|
|
35
36
|
// Re-export from provider factory to not cause a breaking change
|
|
36
37
|
|
|
@@ -15,8 +15,8 @@ import React, { Fragment, useCallback, useEffect, useMemo, useState } from 'reac
|
|
|
15
15
|
import { css, jsx } from '@emotion/react';
|
|
16
16
|
import classnames from 'classnames';
|
|
17
17
|
import { injectIntl } from 'react-intl-next';
|
|
18
|
+
import Button from '@atlaskit/button';
|
|
18
19
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
19
|
-
import Button from '@atlaskit/button/custom-theme-button';
|
|
20
20
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
21
21
|
import { GRID_GUTTER } from '@atlaskit/editor-common/styles';
|
|
22
22
|
import { WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
@@ -19,8 +19,8 @@ import { PureComponent } from 'react';
|
|
|
19
19
|
import { jsx } from '@emotion/react';
|
|
20
20
|
import PropTypes from 'prop-types';
|
|
21
21
|
import ReactDOM from 'react-dom';
|
|
22
|
+
import Button from '@atlaskit/button';
|
|
22
23
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
23
|
-
import Button from '@atlaskit/button/custom-theme-button';
|
|
24
24
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
25
25
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
26
26
|
import { analyticsEventKey } from '@atlaskit/editor-common/utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import {
|
|
2
|
+
import { processRawValue } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { getBreakoutMode } from './node-width';
|
|
5
5
|
export { isInEmptyLine } from '@atlaskit/editor-common/utils';
|
|
@@ -17,13 +17,6 @@ export function processRawFragmentValue(schema, value, providerFactory, sanitize
|
|
|
17
17
|
}
|
|
18
18
|
return Fragment.from(adfEntities);
|
|
19
19
|
}
|
|
20
|
-
export function nodesBetweenChanged(tr, f, startPos) {
|
|
21
|
-
var stepRange = getStepRange(tr);
|
|
22
|
-
if (!stepRange) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
tr.doc.nodesBetween(stepRange.from, stepRange.to, f, startPos);
|
|
26
|
-
}
|
|
27
20
|
export function getNodesCount(node) {
|
|
28
21
|
var count = {};
|
|
29
22
|
node.nodesBetween(0, node.nodeSize - 2, function (node) {
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { toggleMark } from '@atlaskit/editor-prosemirror/commands';
|
|
2
2
|
export { isEmptyNode, isSelectionInsideLastNodeInDocument, checkNodeDown, insideTableCell, isInListItem, toJSON, nodeToJSON } from '@atlaskit/editor-common/utils';
|
|
3
3
|
export { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
4
|
-
export {
|
|
5
|
-
export { isParagraph, isText, isLinkMark } from './nodes';
|
|
6
|
-
export { setNodeSelection, setTextSelection } from './selection';
|
|
4
|
+
export { getNodesCount } from './document';
|
|
7
5
|
export { default as measurements } from './performance/measure-enum';
|
|
8
6
|
function isMarkTypeCompatibleWithMark(markType, mark) {
|
|
9
7
|
return !mark.type.excludes(markType) && !markType.excludes(mark.type);
|
package/dist/esm/utils/nodes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { findChangedNodesFromTransaction, validNode, validateNodes,
|
|
1
|
+
export { findChangedNodesFromTransaction, validNode, validateNodes, SelectedState, isNodeSelectedOrInRange } from '@atlaskit/editor-common/utils';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "193.28.
|
|
2
|
+
export var version = "193.28.5";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { type ErrorInfo } from 'react';
|
|
2
2
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
@@ -17,9 +17,6 @@ export type ErrorBoundaryProps = {
|
|
|
17
17
|
export type ErrorBoundaryState = {
|
|
18
18
|
error?: Error;
|
|
19
19
|
};
|
|
20
|
-
type AnalyticsErrorBoundaryErrorInfo = {
|
|
21
|
-
componentStack: string;
|
|
22
|
-
};
|
|
23
20
|
export declare class ErrorBoundaryWithEditorView extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
24
21
|
featureFlags: FeatureFlags;
|
|
25
22
|
browserExtensions?: UserBrowserExtensionResults;
|
|
@@ -36,7 +33,7 @@ export declare class ErrorBoundaryWithEditorView extends React.Component<ErrorBo
|
|
|
36
33
|
private getProductName;
|
|
37
34
|
private fireAnalyticsEvent;
|
|
38
35
|
private getExperienceMetadata;
|
|
39
|
-
componentDidCatch(error: Error, errorInfo:
|
|
36
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
40
37
|
componentDidMount(): Promise<void>;
|
|
41
38
|
render(): JSX.Element;
|
|
42
39
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -29,7 +29,8 @@ export type { AnnotationProviders, InlineCommentAnnotationProvider, InlineCommen
|
|
|
29
29
|
export type { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
|
|
30
30
|
export { INPUT_METHOD, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, } from '@atlaskit/editor-common/analytics';
|
|
31
31
|
export type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
32
|
-
export {
|
|
32
|
+
export { getNodesCount, measurements } from './utils';
|
|
33
|
+
export { setTextSelection } from '@atlaskit/editor-common/utils';
|
|
33
34
|
export type { Command, EditorPlugin, EditorProps, EditorInstance, CommandDispatch } from './types';
|
|
34
35
|
export { default as EditorActions } from './actions';
|
|
35
36
|
export type { MacroProvider, MacroAttributes, ExtensionType, CardProvider, } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -4,11 +4,8 @@ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
|
4
4
|
import type { ReplaceRawValue, Transformer } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
7
|
-
import type { ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
8
7
|
export { isInEmptyLine } from '@atlaskit/editor-common/utils';
|
|
9
8
|
export declare function processRawFragmentValue(schema: Schema, value?: ReplaceRawValue[], providerFactory?: ProviderFactory, sanitizePrivateContent?: boolean, contentTransformer?: Transformer<string>, dispatchAnalyticsEvent?: DispatchAnalyticsEvent): Fragment | undefined;
|
|
10
|
-
export type ChangedFn = (node: Node, pos: number, parent: Node | null, index: number) => boolean | void;
|
|
11
|
-
export declare function nodesBetweenChanged(tr: Transaction | ReadonlyTransaction, f: ChangedFn, startPos?: number): void;
|
|
12
9
|
export declare function getNodesCount(node: Node): Record<string, number>;
|
|
13
10
|
/**
|
|
14
11
|
* Returns a set of active child breakout modes
|
|
@@ -3,9 +3,7 @@ import type { MarkType, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
export { isEmptyNode, isSelectionInsideLastNodeInDocument, checkNodeDown, insideTableCell, isInListItem, toJSON, nodeToJSON, } from '@atlaskit/editor-common/utils';
|
|
5
5
|
export { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
6
|
-
export {
|
|
7
|
-
export { isParagraph, isText, isLinkMark } from './nodes';
|
|
8
|
-
export { setNodeSelection, setTextSelection } from './selection';
|
|
6
|
+
export { getNodesCount } from './document';
|
|
9
7
|
export type { JSONDocNode };
|
|
10
8
|
export { default as measurements } from './performance/measure-enum';
|
|
11
9
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { findChangedNodesFromTransaction, validNode, validateNodes,
|
|
1
|
+
export { findChangedNodesFromTransaction, validNode, validateNodes, SelectedState, isNodeSelectedOrInRange, } from '@atlaskit/editor-common/utils';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { type ErrorInfo } from 'react';
|
|
2
2
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
@@ -17,9 +17,6 @@ export type ErrorBoundaryProps = {
|
|
|
17
17
|
export type ErrorBoundaryState = {
|
|
18
18
|
error?: Error;
|
|
19
19
|
};
|
|
20
|
-
type AnalyticsErrorBoundaryErrorInfo = {
|
|
21
|
-
componentStack: string;
|
|
22
|
-
};
|
|
23
20
|
export declare class ErrorBoundaryWithEditorView extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
24
21
|
featureFlags: FeatureFlags;
|
|
25
22
|
browserExtensions?: UserBrowserExtensionResults;
|
|
@@ -36,7 +33,7 @@ export declare class ErrorBoundaryWithEditorView extends React.Component<ErrorBo
|
|
|
36
33
|
private getProductName;
|
|
37
34
|
private fireAnalyticsEvent;
|
|
38
35
|
private getExperienceMetadata;
|
|
39
|
-
componentDidCatch(error: Error, errorInfo:
|
|
36
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
40
37
|
componentDidMount(): Promise<void>;
|
|
41
38
|
render(): JSX.Element;
|
|
42
39
|
}
|
|
@@ -29,7 +29,8 @@ export type { AnnotationProviders, InlineCommentAnnotationProvider, InlineCommen
|
|
|
29
29
|
export type { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
|
|
30
30
|
export { INPUT_METHOD, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, } from '@atlaskit/editor-common/analytics';
|
|
31
31
|
export type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
32
|
-
export {
|
|
32
|
+
export { getNodesCount, measurements } from './utils';
|
|
33
|
+
export { setTextSelection } from '@atlaskit/editor-common/utils';
|
|
33
34
|
export type { Command, EditorPlugin, EditorProps, EditorInstance, CommandDispatch } from './types';
|
|
34
35
|
export { default as EditorActions } from './actions';
|
|
35
36
|
export type { MacroProvider, MacroAttributes, ExtensionType, CardProvider, } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -4,11 +4,8 @@ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
|
4
4
|
import type { ReplaceRawValue, Transformer } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
7
|
-
import type { ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
8
7
|
export { isInEmptyLine } from '@atlaskit/editor-common/utils';
|
|
9
8
|
export declare function processRawFragmentValue(schema: Schema, value?: ReplaceRawValue[], providerFactory?: ProviderFactory, sanitizePrivateContent?: boolean, contentTransformer?: Transformer<string>, dispatchAnalyticsEvent?: DispatchAnalyticsEvent): Fragment | undefined;
|
|
10
|
-
export type ChangedFn = (node: Node, pos: number, parent: Node | null, index: number) => boolean | void;
|
|
11
|
-
export declare function nodesBetweenChanged(tr: Transaction | ReadonlyTransaction, f: ChangedFn, startPos?: number): void;
|
|
12
9
|
export declare function getNodesCount(node: Node): Record<string, number>;
|
|
13
10
|
/**
|
|
14
11
|
* Returns a set of active child breakout modes
|
|
@@ -3,9 +3,7 @@ import type { MarkType, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
export { isEmptyNode, isSelectionInsideLastNodeInDocument, checkNodeDown, insideTableCell, isInListItem, toJSON, nodeToJSON, } from '@atlaskit/editor-common/utils';
|
|
5
5
|
export { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
6
|
-
export {
|
|
7
|
-
export { isParagraph, isText, isLinkMark } from './nodes';
|
|
8
|
-
export { setNodeSelection, setTextSelection } from './selection';
|
|
6
|
+
export { getNodesCount } from './document';
|
|
9
7
|
export type { JSONDocNode };
|
|
10
8
|
export { default as measurements } from './performance/measure-enum';
|
|
11
9
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { findChangedNodesFromTransaction, validNode, validateNodes,
|
|
1
|
+
export { findChangedNodesFromTransaction, validNode, validateNodes, SelectedState, isNodeSelectedOrInRange, } from '@atlaskit/editor-common/utils';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "193.28.
|
|
3
|
+
"version": "193.28.5",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
46
46
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
47
47
|
"@atlaskit/button": "^18.0.0",
|
|
48
|
-
"@atlaskit/editor-common": "^82.
|
|
48
|
+
"@atlaskit/editor-common": "^82.14.0",
|
|
49
49
|
"@atlaskit/editor-json-transformer": "^8.14.0",
|
|
50
50
|
"@atlaskit/editor-plugins": "^3.3.0",
|
|
51
51
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@af/editor-examples-helpers": "0.0.
|
|
84
|
+
"@af/editor-examples-helpers": "0.0.8",
|
|
85
85
|
"@af/editor-libra": "*",
|
|
86
86
|
"@af/visual-regression": "*",
|
|
87
87
|
"@atlaskit/adf-utils": "^19.3.0",
|
|
@@ -99,9 +99,9 @@
|
|
|
99
99
|
"@atlaskit/media-integration-test-helpers": "^3.0.0",
|
|
100
100
|
"@atlaskit/media-test-helpers": "^33.0.27",
|
|
101
101
|
"@atlaskit/modal-dialog": "^12.14.0",
|
|
102
|
-
"@atlaskit/primitives": "^8.
|
|
103
|
-
"@atlaskit/renderer": "^109.
|
|
104
|
-
"@atlaskit/smart-card": "^27.
|
|
102
|
+
"@atlaskit/primitives": "^8.2.0",
|
|
103
|
+
"@atlaskit/renderer": "^109.36.0",
|
|
104
|
+
"@atlaskit/smart-card": "^27.7.0",
|
|
105
105
|
"@atlaskit/synchrony-test-helpers": "^2.4.0",
|
|
106
106
|
"@atlaskit/toggle": "^13.2.0",
|
|
107
107
|
"@atlaskit/util-data-test": "^17.9.0",
|
package/tsconfig.json
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"./examples/**/*.tsx",
|
|
10
10
|
"./example-helpers/**/*.ts",
|
|
11
11
|
"./example-helpers/**/*.tsx",
|
|
12
|
-
"./playwright/**/*.ts"
|
|
12
|
+
"./playwright/**/*.ts"
|
|
13
|
+
],
|
|
13
14
|
"compilerOptions": {
|
|
14
15
|
"baseUrl": "./",
|
|
15
16
|
"noErrorTruncation": true
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "copyHTMLToClipboard", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _clipboard.copyHTMLToClipboard;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "copyHTMLToClipboardPolyfill", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _clipboard.copyHTMLToClipboardPolyfill;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "copyToClipboard", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _clipboard.copyToClipboard;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
var _clipboard = require("@atlaskit/editor-common/clipboard");
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isNthParentOfType = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* Creates a filter that checks if the node at a given number of parents above the current
|
|
9
|
-
* selection is of the correct node type.
|
|
10
|
-
*
|
|
11
|
-
* @param nodeType The node type to compare the nth parent against
|
|
12
|
-
* @param depthAway How many levels above the current node to check against. 0 refers to
|
|
13
|
-
* the current selection's parent, which will be the containing node when the selection
|
|
14
|
-
* is usually inside the text content.
|
|
15
|
-
*/
|
|
16
|
-
var isNthParentOfType = exports.isNthParentOfType = function isNthParentOfType(nodeType, depthAway) {
|
|
17
|
-
return function (state) {
|
|
18
|
-
var $from = state.selection.$from;
|
|
19
|
-
var parent = $from.node($from.depth - depthAway);
|
|
20
|
-
return !!parent && parent.type === state.schema.nodes[nodeType];
|
|
21
|
-
};
|
|
22
|
-
};
|
package/dist/cjs/utils/dom.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "closest", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _utils.closest;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "closestElement", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _utils.closestElement;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "containsClassName", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _utils.containsClassName;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "mapElem", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _utils.mapElem;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "maphElem", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _utils.maphElem;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "parsePx", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function get() {
|
|
39
|
-
return _utils.parsePx;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "removeNestedEmptyEls", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function get() {
|
|
45
|
-
return _utils.removeNestedEmptyEls;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "unwrap", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function get() {
|
|
51
|
-
return _utils.unwrap;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, "walkUpTreeUntil", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function get() {
|
|
57
|
-
return _utils.walkUpTreeUntil;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "pluginFactory", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _utils.pluginFactory;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isValidPosition = void 0;
|
|
7
|
-
Object.defineProperty(exports, "setAllSelection", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function get() {
|
|
10
|
-
return _utils.setAllSelection;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "setCellSelection", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function get() {
|
|
16
|
-
return _utils.setCellSelection;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "setNodeSelection", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function get() {
|
|
22
|
-
return _utils.setNodeSelection;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(exports, "setTextSelection", {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function get() {
|
|
28
|
-
return _utils.setTextSelection;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
32
|
-
// checks if the given position is within the ProseMirror document
|
|
33
|
-
var isValidPosition = exports.isValidPosition = function isValidPosition(pos, state) {
|
|
34
|
-
if (pos >= 0 && pos <= state.doc.resolve(0).end()) {
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
return false;
|
|
38
|
-
};
|
package/dist/cjs/utils/slice.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "flatmap", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _utils.flatmap;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "getFragmentBackingArray", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _utils.getFragmentBackingArray;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "mapChildren", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _utils.mapChildren;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "mapFragment", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _utils.mapFragment;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "mapSlice", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _utils.mapSlice;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { copyToClipboard, copyHTMLToClipboard, copyHTMLToClipboardPolyfill } from '@atlaskit/editor-common/clipboard';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates a filter that checks if the node at a given number of parents above the current
|
|
3
|
-
* selection is of the correct node type.
|
|
4
|
-
*
|
|
5
|
-
* @param nodeType The node type to compare the nth parent against
|
|
6
|
-
* @param depthAway How many levels above the current node to check against. 0 refers to
|
|
7
|
-
* the current selection's parent, which will be the containing node when the selection
|
|
8
|
-
* is usually inside the text content.
|
|
9
|
-
*/
|
|
10
|
-
const isNthParentOfType = (nodeType, depthAway) => {
|
|
11
|
-
return state => {
|
|
12
|
-
const {
|
|
13
|
-
$from
|
|
14
|
-
} = state.selection;
|
|
15
|
-
const parent = $from.node($from.depth - depthAway);
|
|
16
|
-
return !!parent && parent.type === state.schema.nodes[nodeType];
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export { isNthParentOfType };
|
package/dist/es2019/utils/dom.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { walkUpTreeUntil, unwrap, removeNestedEmptyEls, containsClassName, closest, closestElement, parsePx, mapElem, maphElem } from '@atlaskit/editor-common/utils';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { setNodeSelection, setTextSelection, setAllSelection, setCellSelection } from '@atlaskit/editor-common/utils';
|
|
2
|
-
|
|
3
|
-
// checks if the given position is within the ProseMirror document
|
|
4
|
-
export const isValidPosition = (pos, state) => {
|
|
5
|
-
if (pos >= 0 && pos <= state.doc.resolve(0).end()) {
|
|
6
|
-
return true;
|
|
7
|
-
}
|
|
8
|
-
return false;
|
|
9
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { getFragmentBackingArray, mapFragment, mapSlice, flatmap, mapChildren } from '@atlaskit/editor-common/utils';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { copyToClipboard, copyHTMLToClipboard, copyHTMLToClipboardPolyfill } from '@atlaskit/editor-common/clipboard';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates a filter that checks if the node at a given number of parents above the current
|
|
3
|
-
* selection is of the correct node type.
|
|
4
|
-
*
|
|
5
|
-
* @param nodeType The node type to compare the nth parent against
|
|
6
|
-
* @param depthAway How many levels above the current node to check against. 0 refers to
|
|
7
|
-
* the current selection's parent, which will be the containing node when the selection
|
|
8
|
-
* is usually inside the text content.
|
|
9
|
-
*/
|
|
10
|
-
var isNthParentOfType = function isNthParentOfType(nodeType, depthAway) {
|
|
11
|
-
return function (state) {
|
|
12
|
-
var $from = state.selection.$from;
|
|
13
|
-
var parent = $from.node($from.depth - depthAway);
|
|
14
|
-
return !!parent && parent.type === state.schema.nodes[nodeType];
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export { isNthParentOfType };
|
package/dist/esm/utils/dom.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { walkUpTreeUntil, unwrap, removeNestedEmptyEls, containsClassName, closest, closestElement, parsePx, mapElem, maphElem } from '@atlaskit/editor-common/utils';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { setNodeSelection, setTextSelection, setAllSelection, setCellSelection } from '@atlaskit/editor-common/utils';
|
|
2
|
-
|
|
3
|
-
// checks if the given position is within the ProseMirror document
|
|
4
|
-
export var isValidPosition = function isValidPosition(pos, state) {
|
|
5
|
-
if (pos >= 0 && pos <= state.doc.resolve(0).end()) {
|
|
6
|
-
return true;
|
|
7
|
-
}
|
|
8
|
-
return false;
|
|
9
|
-
};
|
package/dist/esm/utils/slice.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { getFragmentBackingArray, mapFragment, mapSlice, flatmap, mapChildren } from '@atlaskit/editor-common/utils';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { copyToClipboard, copyHTMLToClipboard, copyHTMLToClipboardPolyfill, } from '@atlaskit/editor-common/clipboard';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
/**
|
|
4
|
-
* Creates a filter that checks if the node at a given number of parents above the current
|
|
5
|
-
* selection is of the correct node type.
|
|
6
|
-
*
|
|
7
|
-
* @param nodeType The node type to compare the nth parent against
|
|
8
|
-
* @param depthAway How many levels above the current node to check against. 0 refers to
|
|
9
|
-
* the current selection's parent, which will be the containing node when the selection
|
|
10
|
-
* is usually inside the text content.
|
|
11
|
-
*/
|
|
12
|
-
declare const isNthParentOfType: (nodeType: string, depthAway: number) => (state: EditorState, view?: EditorView) => boolean;
|
|
13
|
-
export { isNthParentOfType };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
export { setNodeSelection, setTextSelection, setAllSelection, setCellSelection, } from '@atlaskit/editor-common/utils';
|
|
3
|
-
export declare const isValidPosition: (pos: number, state: EditorState) => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { copyToClipboard, copyHTMLToClipboard, copyHTMLToClipboardPolyfill, } from '@atlaskit/editor-common/clipboard';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
/**
|
|
4
|
-
* Creates a filter that checks if the node at a given number of parents above the current
|
|
5
|
-
* selection is of the correct node type.
|
|
6
|
-
*
|
|
7
|
-
* @param nodeType The node type to compare the nth parent against
|
|
8
|
-
* @param depthAway How many levels above the current node to check against. 0 refers to
|
|
9
|
-
* the current selection's parent, which will be the containing node when the selection
|
|
10
|
-
* is usually inside the text content.
|
|
11
|
-
*/
|
|
12
|
-
declare const isNthParentOfType: (nodeType: string, depthAway: number) => (state: EditorState, view?: EditorView) => boolean;
|
|
13
|
-
export { isNthParentOfType };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
export { setNodeSelection, setTextSelection, setAllSelection, setCellSelection, } from '@atlaskit/editor-common/utils';
|
|
3
|
-
export declare const isValidPosition: (pos: number, state: EditorState) => boolean;
|