@atlaskit/editor-common 74.5.2 → 74.7.0
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/analytics/index.js +26 -1
- package/dist/cjs/analytics/linking-utils.js +84 -0
- package/dist/cjs/card/MediaAndEmbedsToolbar/index.js +156 -0
- package/dist/cjs/card/index.js +9 -1
- package/dist/cjs/messages/index.js +14 -0
- package/dist/cjs/messages/link-toolbar.js +60 -0
- package/dist/cjs/messages/media-and-embed-toolbar.js +20 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/node-width/index.js +16 -2
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +225 -0
- package/dist/cjs/react-node-view/index.js +13 -0
- package/dist/cjs/{ui/Resizer/index.js → resizer/Resizer.js} +6 -3
- package/dist/cjs/{resizer.js → resizer/index.js} +1 -1
- package/dist/cjs/resizer/utils.js +21 -0
- package/dist/cjs/styles/shared/resizer.js +1 -1
- package/dist/cjs/styles/shared/table.js +5 -4
- package/dist/cjs/types/hyperlink.js +5 -0
- package/dist/cjs/types/resizable-media-single.js +5 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/LinkSearch/const.js +14 -0
- package/dist/cjs/ui/ResizerLegacy/index.js +210 -0
- package/dist/cjs/ui/ResizerLegacy/styled.js +15 -0
- package/dist/cjs/ui/ResizerLegacy/types.js +5 -0
- package/dist/cjs/ui/ResizerLegacy/utils.js +21 -0
- package/dist/cjs/ui/index.js +58 -0
- package/dist/cjs/utils/document.js +258 -0
- package/dist/cjs/utils/editor-core-utils.js +7 -2
- package/dist/cjs/utils/filter/privacy-filter.js +55 -0
- package/dist/cjs/utils/index.js +75 -0
- package/dist/cjs/utils/rich-media-utils.js +131 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/index.js +2 -1
- package/dist/es2019/analytics/linking-utils.js +74 -0
- package/dist/es2019/card/MediaAndEmbedsToolbar/index.js +161 -0
- package/dist/es2019/card/index.js +2 -1
- package/dist/es2019/messages/index.js +2 -0
- package/dist/es2019/messages/link-toolbar.js +53 -0
- package/dist/es2019/messages/media-and-embed-toolbar.js +13 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/node-width/index.js +12 -1
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +219 -0
- package/dist/es2019/react-node-view/index.js +1 -0
- package/dist/es2019/{ui/Resizer/index.js → resizer/Resizer.js} +5 -3
- package/dist/es2019/resizer/index.js +1 -0
- package/dist/es2019/resizer/utils.js +12 -0
- package/dist/es2019/styles/shared/resizer.js +8 -4
- package/dist/es2019/styles/shared/table.js +5 -4
- package/dist/es2019/types/resizable-media-single.js +1 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/LinkSearch/const.js +4 -0
- package/dist/es2019/ui/ResizerLegacy/index.js +191 -0
- package/dist/es2019/ui/ResizerLegacy/styled.js +15 -0
- package/dist/es2019/ui/ResizerLegacy/types.js +1 -0
- package/dist/es2019/ui/ResizerLegacy/utils.js +12 -0
- package/dist/es2019/ui/index.js +5 -1
- package/dist/es2019/utils/document.js +253 -0
- package/dist/es2019/utils/editor-core-utils.js +4 -0
- package/dist/es2019/utils/filter/privacy-filter.js +47 -0
- package/dist/es2019/utils/index.js +5 -2
- package/dist/es2019/utils/rich-media-utils.js +109 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/index.js +2 -1
- package/dist/esm/analytics/linking-utils.js +74 -0
- package/dist/esm/card/MediaAndEmbedsToolbar/index.js +146 -0
- package/dist/esm/card/index.js +2 -1
- package/dist/esm/messages/index.js +2 -0
- package/dist/esm/messages/link-toolbar.js +53 -0
- package/dist/esm/messages/media-and-embed-toolbar.js +13 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/node-width/index.js +12 -1
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +215 -0
- package/dist/esm/react-node-view/index.js +1 -0
- package/dist/esm/{ui/Resizer/index.js → resizer/Resizer.js} +6 -3
- package/dist/esm/resizer/index.js +1 -0
- package/dist/esm/resizer/types.js +1 -0
- package/dist/esm/resizer/utils.js +12 -0
- package/dist/esm/styles/shared/resizer.js +1 -1
- package/dist/esm/styles/shared/table.js +5 -4
- package/dist/esm/types/hyperlink.js +1 -0
- package/dist/esm/types/resizable-media-single.js +1 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/LinkSearch/const.js +4 -0
- package/dist/esm/ui/ResizerLegacy/index.js +203 -0
- package/dist/esm/ui/ResizerLegacy/styled.js +7 -0
- package/dist/esm/ui/ResizerLegacy/types.js +1 -0
- package/dist/esm/ui/ResizerLegacy/utils.js +12 -0
- package/dist/esm/ui/index.js +5 -1
- package/dist/esm/utils/document.js +246 -0
- package/dist/esm/utils/editor-core-utils.js +4 -0
- package/dist/esm/utils/filter/privacy-filter.js +48 -0
- package/dist/esm/utils/index.js +5 -2
- package/dist/esm/utils/rich-media-utils.js +118 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/index.d.ts +2 -0
- package/dist/types/analytics/linking-utils.d.ts +14 -0
- package/dist/types/card/MediaAndEmbedsToolbar/index.d.ts +11 -0
- package/dist/types/card/index.d.ts +1 -0
- package/dist/types/messages/index.d.ts +2 -0
- package/dist/types/messages/link-toolbar.d.ts +52 -0
- package/dist/types/messages/media-and-embed-toolbar.d.ts +12 -0
- package/dist/types/node-width/index.d.ts +7 -0
- package/dist/types/react-node-view/getInlineNodeViewProducer.d.ts +25 -0
- package/dist/types/react-node-view/index.d.ts +3 -0
- package/dist/types/{ui/Resizer/index.d.ts → resizer/Resizer.d.ts} +1 -0
- package/dist/types/resizer/index.d.ts +2 -0
- package/dist/types/resizer/utils.d.ts +6 -0
- package/dist/types/styles/shared/table.d.ts +2 -1
- package/dist/types/types/hyperlink.d.ts +35 -0
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/resizable-media-single.d.ts +15 -0
- package/dist/types/ui/DropList/index.d.ts +1 -1
- package/dist/types/ui/LinkSearch/const.d.ts +4 -0
- package/dist/types/ui/ResizerLegacy/index.d.ts +40 -0
- package/dist/types/ui/ResizerLegacy/styled.d.ts +2 -0
- package/dist/types/ui/ResizerLegacy/types.d.ts +26 -0
- package/dist/types/ui/ResizerLegacy/utils.d.ts +6 -0
- package/dist/types/ui/index.d.ts +6 -0
- package/dist/types/utils/document.d.ts +19 -0
- package/dist/types/utils/editor-core-utils.d.ts +1 -0
- package/dist/types/utils/filter/privacy-filter.d.ts +9 -0
- package/dist/types/utils/index.d.ts +4 -1
- package/dist/types/utils/rich-media-utils.d.ts +8 -0
- package/dist/types-ts4.5/analytics/index.d.ts +2 -0
- package/dist/types-ts4.5/analytics/linking-utils.d.ts +14 -0
- package/dist/types-ts4.5/card/MediaAndEmbedsToolbar/index.d.ts +11 -0
- package/dist/types-ts4.5/card/index.d.ts +1 -0
- package/dist/types-ts4.5/messages/index.d.ts +2 -0
- package/dist/types-ts4.5/messages/link-toolbar.d.ts +52 -0
- package/dist/types-ts4.5/messages/media-and-embed-toolbar.d.ts +12 -0
- package/dist/types-ts4.5/node-width/index.d.ts +7 -0
- package/dist/types-ts4.5/react-node-view/getInlineNodeViewProducer.d.ts +25 -0
- package/dist/types-ts4.5/react-node-view/index.d.ts +3 -0
- package/dist/types-ts4.5/{ui/Resizer/index.d.ts → resizer/Resizer.d.ts} +1 -0
- package/dist/types-ts4.5/resizer/index.d.ts +2 -0
- package/dist/types-ts4.5/resizer/utils.d.ts +6 -0
- package/dist/types-ts4.5/styles/shared/table.d.ts +2 -1
- package/dist/types-ts4.5/types/hyperlink.d.ts +35 -0
- package/dist/types-ts4.5/types/index.d.ts +2 -0
- package/dist/types-ts4.5/types/resizable-media-single.d.ts +15 -0
- package/dist/types-ts4.5/ui/DropList/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/LinkSearch/const.d.ts +4 -0
- package/dist/types-ts4.5/ui/ResizerLegacy/index.d.ts +40 -0
- package/dist/types-ts4.5/ui/ResizerLegacy/styled.d.ts +2 -0
- package/dist/types-ts4.5/ui/ResizerLegacy/types.d.ts +26 -0
- package/dist/types-ts4.5/ui/ResizerLegacy/utils.d.ts +6 -0
- package/dist/types-ts4.5/ui/index.d.ts +6 -0
- package/dist/types-ts4.5/utils/document.d.ts +19 -0
- package/dist/types-ts4.5/utils/editor-core-utils.d.ts +1 -0
- package/dist/types-ts4.5/utils/filter/privacy-filter.d.ts +9 -0
- package/dist/types-ts4.5/utils/index.d.ts +4 -1
- package/dist/types-ts4.5/utils/rich-media-utils.d.ts +8 -0
- package/package.json +9 -9
- package/resizer/package.json +5 -5
- package/dist/cjs/ui/Resizer/utils.js +0 -8
- package/dist/es2019/resizer.js +0 -1
- package/dist/es2019/ui/Resizer/utils.js +0 -1
- package/dist/esm/resizer.js +0 -1
- package/dist/esm/ui/Resizer/utils.js +0 -1
- package/dist/types/resizer.d.ts +0 -2
- package/dist/types/ui/Resizer/utils.d.ts +0 -1
- package/dist/types-ts4.5/resizer.d.ts +0 -2
- package/dist/types-ts4.5/ui/Resizer/utils.d.ts +0 -1
- /package/dist/cjs/{ui/Resizer → resizer}/types.js +0 -0
- /package/dist/es2019/{ui/Resizer → resizer}/types.js +0 -0
- /package/dist/{esm/ui/Resizer/types.js → es2019/types/hyperlink.js} +0 -0
- /package/dist/types/{ui/Resizer → resizer}/types.d.ts +0 -0
- /package/dist/types-ts4.5/{ui/Resizer → resizer}/types.d.ts +0 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import classnames from 'classnames';
|
|
12
|
+
import { Resizable } from 're-resizable';
|
|
13
|
+
import { akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
|
|
14
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../analytics';
|
|
15
|
+
import { richMediaClassName } from '../../styles';
|
|
16
|
+
import { gridTypeForLayout } from '../../utils';
|
|
17
|
+
import { handleSides, snapTo } from './utils';
|
|
18
|
+
var getResizeAnalyticsEvent = function getResizeAnalyticsEvent(type, size, layout) {
|
|
19
|
+
var actionSubject = type === 'embed' ? ACTION_SUBJECT.EMBEDS : ACTION_SUBJECT.MEDIA_SINGLE;
|
|
20
|
+
return {
|
|
21
|
+
action: ACTION.EDITED,
|
|
22
|
+
actionSubject: actionSubject,
|
|
23
|
+
actionSubjectId: ACTION_SUBJECT_ID.RESIZED,
|
|
24
|
+
attributes: {
|
|
25
|
+
size: size,
|
|
26
|
+
layout: layout
|
|
27
|
+
},
|
|
28
|
+
eventType: EVENT_TYPE.UI
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
var getWidthFromSnapPoints = function getWidthFromSnapPoints(width, snapPoints) {
|
|
32
|
+
if (snapPoints.length) {
|
|
33
|
+
return Math.min(Math.max(width, snapPoints[0]), snapPoints[snapPoints.length - 1]);
|
|
34
|
+
}
|
|
35
|
+
return width;
|
|
36
|
+
};
|
|
37
|
+
var Resizer = /*#__PURE__*/function (_React$Component) {
|
|
38
|
+
_inherits(Resizer, _React$Component);
|
|
39
|
+
var _super = _createSuper(Resizer);
|
|
40
|
+
function Resizer() {
|
|
41
|
+
var _this;
|
|
42
|
+
_classCallCheck(this, Resizer);
|
|
43
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
44
|
+
args[_key] = arguments[_key];
|
|
45
|
+
}
|
|
46
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
47
|
+
_defineProperty(_assertThisInitialized(_this), "resizable", /*#__PURE__*/React.createRef());
|
|
48
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
49
|
+
isResizing: false
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(_assertThisInitialized(_this), "handleResizeStart", function (event) {
|
|
52
|
+
var _this$props = _this.props,
|
|
53
|
+
_this$props$innerPadd = _this$props.innerPadding,
|
|
54
|
+
innerPadding = _this$props$innerPadd === void 0 ? 0 : _this$props$innerPadd,
|
|
55
|
+
highlights = _this$props.highlights,
|
|
56
|
+
displayGrid = _this$props.displayGrid,
|
|
57
|
+
layout = _this$props.layout,
|
|
58
|
+
width = _this$props.width,
|
|
59
|
+
snapPoints = _this$props.snapPoints;
|
|
60
|
+
|
|
61
|
+
// prevent creating a drag event on Firefox
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
_this.setState({
|
|
64
|
+
isResizing: true
|
|
65
|
+
}, function () {
|
|
66
|
+
var newHighlights = highlights(width + innerPadding, snapPoints);
|
|
67
|
+
displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(newHighlights.length > 0, gridTypeForLayout(layout), newHighlights);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
_defineProperty(_assertThisInitialized(_this), "handleResize", function (_event, _direction, _elementRef, delta) {
|
|
71
|
+
var _this$props2 = _this.props,
|
|
72
|
+
highlights = _this$props2.highlights,
|
|
73
|
+
calcNewSize = _this$props2.calcNewSize,
|
|
74
|
+
scaleFactor = _this$props2.scaleFactor,
|
|
75
|
+
snapPoints = _this$props2.snapPoints,
|
|
76
|
+
displayGrid = _this$props2.displayGrid,
|
|
77
|
+
layout = _this$props2.layout,
|
|
78
|
+
updateSize = _this$props2.updateSize,
|
|
79
|
+
_this$props2$innerPad = _this$props2.innerPadding,
|
|
80
|
+
innerPadding = _this$props2$innerPad === void 0 ? 0 : _this$props2$innerPad;
|
|
81
|
+
var resizable = _this.resizable.current;
|
|
82
|
+
var isResizing = _this.state.isResizing;
|
|
83
|
+
if (!resizable || !resizable.state.original || !isResizing) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
var newWidth = getWidthFromSnapPoints(resizable.state.original.width + delta.width * (scaleFactor || 1), snapPoints);
|
|
87
|
+
var newSize = calcNewSize(newWidth + innerPadding, false);
|
|
88
|
+
if (newSize.layout !== layout) {
|
|
89
|
+
updateSize(newSize.width, newSize.layout);
|
|
90
|
+
}
|
|
91
|
+
var newHighlights = highlights(newWidth, snapPoints);
|
|
92
|
+
displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(newHighlights.length > 0, gridTypeForLayout(newSize.layout), newHighlights);
|
|
93
|
+
resizable.updateSize({
|
|
94
|
+
width: newWidth,
|
|
95
|
+
height: 'auto'
|
|
96
|
+
});
|
|
97
|
+
resizable.setState({
|
|
98
|
+
isResizing: true
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
_defineProperty(_assertThisInitialized(_this), "handleResizeStop", function (_event, _direction, _elementRef, delta) {
|
|
102
|
+
var _this$props3 = _this.props,
|
|
103
|
+
highlights = _this$props3.highlights,
|
|
104
|
+
calcNewSize = _this$props3.calcNewSize,
|
|
105
|
+
snapPoints = _this$props3.snapPoints,
|
|
106
|
+
displayGrid = _this$props3.displayGrid,
|
|
107
|
+
layout = _this$props3.layout,
|
|
108
|
+
updateSize = _this$props3.updateSize,
|
|
109
|
+
dispatchAnalyticsEvent = _this$props3.dispatchAnalyticsEvent,
|
|
110
|
+
nodeType = _this$props3.nodeType;
|
|
111
|
+
var resizable = _this.resizable.current;
|
|
112
|
+
var isResizing = _this.state.isResizing;
|
|
113
|
+
if (!resizable || !resizable.state.original || !isResizing) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
var newWidth = getWidthFromSnapPoints(resizable.state.original.width + delta.width, snapPoints);
|
|
117
|
+
var snapWidth = snapTo(newWidth, snapPoints);
|
|
118
|
+
var newSize = calcNewSize(snapWidth, true);
|
|
119
|
+
var newHighlights = highlights(newWidth, snapPoints);
|
|
120
|
+
if (dispatchAnalyticsEvent) {
|
|
121
|
+
dispatchAnalyticsEvent(getResizeAnalyticsEvent(nodeType, newSize.width, newSize.layout));
|
|
122
|
+
}
|
|
123
|
+
// show committed grid size
|
|
124
|
+
displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(newHighlights.length > 0, gridTypeForLayout(newSize.layout), newHighlights);
|
|
125
|
+
_this.setState({
|
|
126
|
+
isResizing: false
|
|
127
|
+
}, function () {
|
|
128
|
+
updateSize(newSize.width, newSize.layout);
|
|
129
|
+
displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(false, gridTypeForLayout(layout), []);
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
return _this;
|
|
133
|
+
}
|
|
134
|
+
_createClass(Resizer, [{
|
|
135
|
+
key: "render",
|
|
136
|
+
value: function render() {
|
|
137
|
+
var handleStyles = {};
|
|
138
|
+
var handles = {};
|
|
139
|
+
var handleComponent = {};
|
|
140
|
+
var _this$props4 = this.props,
|
|
141
|
+
_this$props4$innerPad = _this$props4.innerPadding,
|
|
142
|
+
innerPadding = _this$props4$innerPad === void 0 ? 0 : _this$props4$innerPad,
|
|
143
|
+
width = _this$props4.width,
|
|
144
|
+
pctWidth = _this$props4.pctWidth,
|
|
145
|
+
selected = _this$props4.selected,
|
|
146
|
+
layout = _this$props4.layout,
|
|
147
|
+
enable = _this$props4.enable,
|
|
148
|
+
children = _this$props4.children,
|
|
149
|
+
ratio = _this$props4.ratio,
|
|
150
|
+
handleComponentFunc = _this$props4.handleComponentFunc;
|
|
151
|
+
var isResizing = this.state.isResizing;
|
|
152
|
+
handleSides.forEach(function (side) {
|
|
153
|
+
var _handleStyles$side;
|
|
154
|
+
handles[side] = "richMedia-resize-handle-".concat(side);
|
|
155
|
+
handleStyles[side] = (_handleStyles$side = {
|
|
156
|
+
width: '24px'
|
|
157
|
+
}, _defineProperty(_handleStyles$side, side, "".concat(-13 - innerPadding, "px")), _defineProperty(_handleStyles$side, "zIndex", akRichMediaResizeZIndex), _defineProperty(_handleStyles$side, "pointerEvents", 'auto'), _handleStyles$side);
|
|
158
|
+
var sideHandleComponent = handleComponentFunc && handleComponentFunc(side);
|
|
159
|
+
if (sideHandleComponent) {
|
|
160
|
+
handleComponent[side] = sideHandleComponent;
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
var className = classnames(richMediaClassName, "image-".concat(layout), this.props.className, {
|
|
164
|
+
'is-resizing': isResizing,
|
|
165
|
+
'not-resized': !pctWidth,
|
|
166
|
+
'richMedia-selected': selected,
|
|
167
|
+
'rich-media-wrapped': layout === 'wrap-left' || layout === 'wrap-right'
|
|
168
|
+
});
|
|
169
|
+
var handleWrapperStyle;
|
|
170
|
+
if (ratio) {
|
|
171
|
+
handleWrapperStyle = {
|
|
172
|
+
position: 'absolute',
|
|
173
|
+
width: '100%',
|
|
174
|
+
paddingBottom: "".concat(ratio, "%"),
|
|
175
|
+
top: 0,
|
|
176
|
+
pointerEvents: 'none'
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Ideally, Resizable would let you pass in the component rather than
|
|
181
|
+
// the div. For now, we just apply the same styles using CSS
|
|
182
|
+
return /*#__PURE__*/React.createElement(Resizable, {
|
|
183
|
+
ref: this.resizable,
|
|
184
|
+
size: {
|
|
185
|
+
width: width,
|
|
186
|
+
// just content itself (no paddings)
|
|
187
|
+
height: 'auto'
|
|
188
|
+
},
|
|
189
|
+
className: className,
|
|
190
|
+
handleClasses: handles,
|
|
191
|
+
handleStyles: handleStyles,
|
|
192
|
+
handleWrapperStyle: handleWrapperStyle,
|
|
193
|
+
handleComponent: handleComponent,
|
|
194
|
+
enable: enable,
|
|
195
|
+
onResize: this.handleResize,
|
|
196
|
+
onResizeStop: this.handleResizeStop,
|
|
197
|
+
onResizeStart: this.handleResizeStart
|
|
198
|
+
}, children);
|
|
199
|
+
}
|
|
200
|
+
}]);
|
|
201
|
+
return Resizer;
|
|
202
|
+
}(React.Component);
|
|
203
|
+
export { Resizer as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
import { MediaSingleDimensionHelper } from '../MediaSingle/styled';
|
|
5
|
+
export var wrapperStyle = function wrapperStyle(props) {
|
|
6
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & > div {\n ", ";\n position: relative;\n clear: both;\n\n > div {\n position: absolute;\n height: 100%;\n width: 100%;\n }\n }\n"])), MediaSingleDimensionHelper(props));
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export var snapTo = function snapTo(target, points) {
|
|
2
|
+
return points.length === 0 ?
|
|
3
|
+
// extreme last case if there are no points somehow
|
|
4
|
+
target : points.reduce(function (point, closest) {
|
|
5
|
+
return Math.abs(closest - target) < Math.abs(point - target) ? closest : point;
|
|
6
|
+
});
|
|
7
|
+
};
|
|
8
|
+
export var handleSides = ['left', 'right'];
|
|
9
|
+
export var imageAlignmentMap = {
|
|
10
|
+
left: 'start',
|
|
11
|
+
right: 'end'
|
|
12
|
+
};
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -18,4 +18,8 @@ export { clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle
|
|
|
18
18
|
export { IntlErrorBoundary, REACT_INTL_ERROR_MESSAGE } from './IntlErrorBoundary';
|
|
19
19
|
export { default as IntlProviderIfMissingWrapper } from './IntlProviderIfMissingWrapper';
|
|
20
20
|
export { default as FloatingToolbarButton } from './FloatingToolbar/Button';
|
|
21
|
-
export {
|
|
21
|
+
export { RECENT_SEARCH_WIDTH_IN_PX, RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, LINKPICKER_HEIGHT_IN_PX } from './LinkSearch/const';
|
|
22
|
+
export { ContextPanelProvider, ContextPanelWidthProvider, ContextPanelConsumer, ContextPanel } from './ContextPanel/context';
|
|
23
|
+
export { default as Resizer } from './ResizerLegacy';
|
|
24
|
+
export { snapTo, handleSides, imageAlignmentMap } from './ResizerLegacy/utils';
|
|
25
|
+
export { wrapperStyle } from './ResizerLegacy/styled';
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { Node } from 'prosemirror-model';
|
|
2
|
+
import { transformDedupeMarks, transformIndentationMarks, transformInvalidMediaContent, transformMediaLinkMarks, transformNodesMissingContent, transformTextLinkCodeMarks } from '@atlaskit/adf-utils/transforms';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
4
|
+
import { isEmptyParagraph } from './editor-core-utils';
|
|
5
|
+
import { sanitizeNodeForPrivacy } from './filter/privacy-filter';
|
|
6
|
+
import { findAndTrackUnsupportedContentNodes } from './track-unsupported-content';
|
|
7
|
+
import { validateADFEntity } from './validate-using-spec';
|
|
8
|
+
export var getStepRange = function getStepRange(transaction) {
|
|
9
|
+
var from = -1;
|
|
10
|
+
var to = -1;
|
|
11
|
+
transaction.mapping.maps.forEach(function (stepMap, index) {
|
|
12
|
+
stepMap.forEach(function (oldStart, oldEnd) {
|
|
13
|
+
var newStart = transaction.mapping.slice(index).map(oldStart, -1);
|
|
14
|
+
var newEnd = transaction.mapping.slice(index).map(oldEnd);
|
|
15
|
+
from = newStart < from || from === -1 ? newStart : from;
|
|
16
|
+
to = newEnd > to || to === -1 ? newEnd : to;
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
if (from !== -1) {
|
|
20
|
+
return {
|
|
21
|
+
from: from,
|
|
22
|
+
to: to
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// Checks to see if the parent node is the document, ie not contained within another entity
|
|
29
|
+
export function hasDocAsParent($anchor) {
|
|
30
|
+
return $anchor.depth === 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Checks if a node looks like an empty document
|
|
35
|
+
*/
|
|
36
|
+
export function isEmptyDocument(node) {
|
|
37
|
+
var nodeChild = node.content.firstChild;
|
|
38
|
+
if (node.childCount !== 1 || !nodeChild) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
return isEmptyParagraph(nodeChild);
|
|
42
|
+
}
|
|
43
|
+
export function bracketTyped(state) {
|
|
44
|
+
var selection = state.selection;
|
|
45
|
+
var _ref = selection,
|
|
46
|
+
$cursor = _ref.$cursor,
|
|
47
|
+
$anchor = _ref.$anchor;
|
|
48
|
+
if (!$cursor) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
var node = $cursor.nodeBefore;
|
|
52
|
+
if (!node) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
if (node.type.name === 'text' && node.text === '{') {
|
|
56
|
+
var paragraphNode = $anchor.node();
|
|
57
|
+
return paragraphNode.marks.length === 0 && hasDocAsParent($anchor);
|
|
58
|
+
}
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
export function nodesBetweenChanged(tr, f, startPos) {
|
|
62
|
+
var stepRange = getStepRange(tr);
|
|
63
|
+
if (!stepRange) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
tr.doc.nodesBetween(stepRange.from, stepRange.to, f, startPos);
|
|
67
|
+
}
|
|
68
|
+
export function processRawValue(schema, value, providerFactory, sanitizePrivateContent, contentTransformer, dispatchAnalyticsEvent) {
|
|
69
|
+
if (!value) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
var node;
|
|
73
|
+
if (typeof value === 'string') {
|
|
74
|
+
try {
|
|
75
|
+
if (contentTransformer) {
|
|
76
|
+
var doc = contentTransformer.parse(value);
|
|
77
|
+
node = doc.toJSON();
|
|
78
|
+
} else {
|
|
79
|
+
node = JSON.parse(value);
|
|
80
|
+
}
|
|
81
|
+
} catch (e) {
|
|
82
|
+
// eslint-disable-next-line no-console
|
|
83
|
+
console.error("Error processing value: ".concat(value, " isn't a valid JSON"));
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
} else {
|
|
87
|
+
node = value;
|
|
88
|
+
}
|
|
89
|
+
if (Array.isArray(node)) {
|
|
90
|
+
// eslint-disable-next-line no-console
|
|
91
|
+
console.error("Error processing value: ".concat(node, " is an array, but it must be an object."));
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
try {
|
|
95
|
+
// ProseMirror always require a child under doc
|
|
96
|
+
if (node.type === 'doc') {
|
|
97
|
+
if (Array.isArray(node.content) && node.content.length === 0) {
|
|
98
|
+
node.content.push({
|
|
99
|
+
type: 'paragraph',
|
|
100
|
+
content: []
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
// Just making sure doc is always valid
|
|
104
|
+
if (!node.version) {
|
|
105
|
+
node.version = 1;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (contentTransformer) {
|
|
109
|
+
return Node.fromJSON(schema, node);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// link mark on mediaSingle is deprecated, need to move link mark to child media node
|
|
113
|
+
// https://product-fabric.atlassian.net/browse/ED-14043
|
|
114
|
+
var _transformMediaLinkMa = transformMediaLinkMarks(node),
|
|
115
|
+
transformedAdf = _transformMediaLinkMa.transformedAdf,
|
|
116
|
+
isTransformed = _transformMediaLinkMa.isTransformed;
|
|
117
|
+
if (isTransformed && dispatchAnalyticsEvent) {
|
|
118
|
+
dispatchAnalyticsEvent({
|
|
119
|
+
action: ACTION.MEDIA_LINK_TRANSFORMED,
|
|
120
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
121
|
+
eventType: EVENT_TYPE.OPERATIONAL
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// See: HOT-97965 https://product-fabric.atlassian.net/browse/ED-14400
|
|
126
|
+
// We declared in code mark spec that links and marks should not co-exist on
|
|
127
|
+
// text nodes. This util strips code marks from bad text nodes and preserves links.
|
|
128
|
+
// Otherwise, prosemirror will try to repair the invalid document by stripping links
|
|
129
|
+
// and preserving code marks during content changes.
|
|
130
|
+
var _transformTextLinkCod = transformTextLinkCodeMarks(transformedAdf);
|
|
131
|
+
transformedAdf = _transformTextLinkCod.transformedAdf;
|
|
132
|
+
isTransformed = _transformTextLinkCod.isTransformed;
|
|
133
|
+
if (isTransformed && dispatchAnalyticsEvent) {
|
|
134
|
+
dispatchAnalyticsEvent({
|
|
135
|
+
action: ACTION.TEXT_LINK_MARK_TRANSFORMED,
|
|
136
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
137
|
+
eventType: EVENT_TYPE.OPERATIONAL
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
var discardedMarks = [];
|
|
141
|
+
var _transformDedupeMarks = transformDedupeMarks(transformedAdf);
|
|
142
|
+
transformedAdf = _transformDedupeMarks.transformedAdf;
|
|
143
|
+
isTransformed = _transformDedupeMarks.isTransformed;
|
|
144
|
+
discardedMarks = _transformDedupeMarks.discardedMarks;
|
|
145
|
+
if (isTransformed && dispatchAnalyticsEvent) {
|
|
146
|
+
dispatchAnalyticsEvent({
|
|
147
|
+
action: ACTION.DEDUPE_MARKS_TRANSFORMED_V2,
|
|
148
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
149
|
+
eventType: EVENT_TYPE.OPERATIONAL,
|
|
150
|
+
attributes: {
|
|
151
|
+
/** UGC WARNING
|
|
152
|
+
*
|
|
153
|
+
* DO NOT include the `mark` attributes inside, we map here to only
|
|
154
|
+
* extract the mark type as that is the only non-UGC safe information
|
|
155
|
+
* that we can add to event-attributes
|
|
156
|
+
*
|
|
157
|
+
*/
|
|
158
|
+
discardedMarkTypes: discardedMarks.map(function (mark) {
|
|
159
|
+
return mark.type;
|
|
160
|
+
})
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
var _transformNodesMissin = transformNodesMissingContent(transformedAdf);
|
|
165
|
+
transformedAdf = _transformNodesMissin.transformedAdf;
|
|
166
|
+
isTransformed = _transformNodesMissin.isTransformed;
|
|
167
|
+
if (isTransformed && dispatchAnalyticsEvent) {
|
|
168
|
+
dispatchAnalyticsEvent({
|
|
169
|
+
action: ACTION.NODES_MISSING_CONTENT_TRANSFORMED,
|
|
170
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
171
|
+
eventType: EVENT_TYPE.OPERATIONAL
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
var _transformIndentation = transformIndentationMarks(transformedAdf);
|
|
175
|
+
transformedAdf = _transformIndentation.transformedAdf;
|
|
176
|
+
isTransformed = _transformIndentation.isTransformed;
|
|
177
|
+
if (isTransformed && dispatchAnalyticsEvent) {
|
|
178
|
+
dispatchAnalyticsEvent({
|
|
179
|
+
action: ACTION.INDENTATION_MARKS_TRANSFORMED,
|
|
180
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
181
|
+
eventType: EVENT_TYPE.OPERATIONAL
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
var _transformInvalidMedi = transformInvalidMediaContent(transformedAdf);
|
|
185
|
+
transformedAdf = _transformInvalidMedi.transformedAdf;
|
|
186
|
+
isTransformed = _transformInvalidMedi.isTransformed;
|
|
187
|
+
if (isTransformed && dispatchAnalyticsEvent) {
|
|
188
|
+
dispatchAnalyticsEvent({
|
|
189
|
+
action: ACTION.INVALID_MEDIA_CONTENT_TRANSFORMED,
|
|
190
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
191
|
+
eventType: EVENT_TYPE.OPERATIONAL
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
var entity = validateADFEntity(schema, transformedAdf || node, dispatchAnalyticsEvent);
|
|
195
|
+
var newEntity = maySanitizePrivateContent(entity, providerFactory, sanitizePrivateContent);
|
|
196
|
+
var parsedDoc = Node.fromJSON(schema, newEntity);
|
|
197
|
+
|
|
198
|
+
// throws an error if the document is invalid
|
|
199
|
+
try {
|
|
200
|
+
parsedDoc.check();
|
|
201
|
+
} catch (err) {
|
|
202
|
+
if (dispatchAnalyticsEvent) {
|
|
203
|
+
dispatchAnalyticsEvent({
|
|
204
|
+
action: ACTION.INVALID_PROSEMIRROR_DOCUMENT,
|
|
205
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
206
|
+
eventType: EVENT_TYPE.OPERATIONAL,
|
|
207
|
+
attributes: {
|
|
208
|
+
errorStack: err instanceof Error ? err.stack : String(err)
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
throw err;
|
|
213
|
+
}
|
|
214
|
+
if (dispatchAnalyticsEvent) {
|
|
215
|
+
findAndTrackUnsupportedContentNodes(parsedDoc, schema, dispatchAnalyticsEvent);
|
|
216
|
+
}
|
|
217
|
+
return parsedDoc;
|
|
218
|
+
} catch (e) {
|
|
219
|
+
if (dispatchAnalyticsEvent) {
|
|
220
|
+
dispatchAnalyticsEvent({
|
|
221
|
+
action: ACTION.DOCUMENT_PROCESSING_ERROR,
|
|
222
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
223
|
+
eventType: EVENT_TYPE.OPERATIONAL,
|
|
224
|
+
nonPrivacySafeAttributes: {
|
|
225
|
+
errorStack: e instanceof Error ? e.stack : String(e)
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// eslint-disable-next-line no-console
|
|
231
|
+
console.error("Error processing document:\n".concat(e instanceof Error ? e.message : String(e), "\n\n"), JSON.stringify(node));
|
|
232
|
+
if (isProseMirrorSchemaCheckError(e)) {
|
|
233
|
+
throw e;
|
|
234
|
+
}
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
function isProseMirrorSchemaCheckError(error) {
|
|
239
|
+
return error instanceof RangeError && (!!error.message.match(/^Invalid collection of marks for node/) || !!error.message.match(/^Invalid content for node/));
|
|
240
|
+
}
|
|
241
|
+
var maySanitizePrivateContent = function maySanitizePrivateContent(entity, providerFactory, sanitizePrivateContent) {
|
|
242
|
+
if (sanitizePrivateContent && providerFactory) {
|
|
243
|
+
return sanitizeNodeForPrivacy(entity, providerFactory);
|
|
244
|
+
}
|
|
245
|
+
return entity;
|
|
246
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NodeSelection, TextSelection } from 'prosemirror-state';
|
|
2
2
|
import { ReplaceAroundStep, ReplaceStep } from 'prosemirror-transform';
|
|
3
|
+
import { hasParentNodeOfType } from 'prosemirror-utils';
|
|
3
4
|
import { closest } from './dom';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -76,4 +77,7 @@ export var isValidPosition = function isValidPosition(pos, state) {
|
|
|
76
77
|
return true;
|
|
77
78
|
}
|
|
78
79
|
return false;
|
|
80
|
+
};
|
|
81
|
+
export var isInLayoutColumn = function isInLayoutColumn(state) {
|
|
82
|
+
return hasParentNodeOfType(state.schema.nodes.layoutSection)(state.selection);
|
|
79
83
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
import { traverse } from '@atlaskit/adf-utils/traverse';
|
|
5
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
|
|
6
|
+
/**
|
|
7
|
+
* Sanitises a document where some content should not be in the document (e.g. mention names).
|
|
8
|
+
*
|
|
9
|
+
* It is expected that these names we be resolved separately (e.g. when rendering
|
|
10
|
+
* a node view).
|
|
11
|
+
*/
|
|
12
|
+
export function sanitizeNodeForPrivacy(json, providerFactory) {
|
|
13
|
+
var mentionNames = new Map();
|
|
14
|
+
var hasCacheableMentions = false;
|
|
15
|
+
var sanitizedJSON = traverse(json, {
|
|
16
|
+
mention: function mention(node) {
|
|
17
|
+
if (node.attrs && node.attrs.text) {
|
|
18
|
+
hasCacheableMentions = true;
|
|
19
|
+
// Remove @ prefix
|
|
20
|
+
var text = node.attrs.text;
|
|
21
|
+
var name = text.startsWith('@') ? text.slice(1) : text;
|
|
22
|
+
mentionNames.set(node.attrs.id, name);
|
|
23
|
+
}
|
|
24
|
+
return _objectSpread(_objectSpread({}, node), {}, {
|
|
25
|
+
attrs: _objectSpread(_objectSpread({}, node.attrs), {}, {
|
|
26
|
+
text: ''
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
if (hasCacheableMentions && providerFactory) {
|
|
32
|
+
var handler = function handler(_name, providerPromise) {
|
|
33
|
+
if (providerPromise) {
|
|
34
|
+
providerPromise.then(function (provider) {
|
|
35
|
+
if (isResolvingMentionProvider(provider)) {
|
|
36
|
+
mentionNames.forEach(function (name, id) {
|
|
37
|
+
provider.cacheMentionName(id, name);
|
|
38
|
+
});
|
|
39
|
+
mentionNames.clear();
|
|
40
|
+
providerFactory.unsubscribe('mentionProvider', handler);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
providerFactory.subscribe('mentionProvider', handler);
|
|
46
|
+
}
|
|
47
|
+
return sanitizedJSON;
|
|
48
|
+
}
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -3,7 +3,7 @@ export { getExtensionLozengeData } from './macro';
|
|
|
3
3
|
export { default as browser } from './browser';
|
|
4
4
|
export { default as ErrorReporter } from './error-reporter';
|
|
5
5
|
export { isPastDate, timestampToIsoFormat, timestampToString, timestampToTaskContext, timestampToUTCDate, todayTimestampInUTC } from './date';
|
|
6
|
-
export { isElementInTableCell, isTextSelection, isLastItemMediaGroup, setNodeSelection, setTextSelection, nonNullable, stepAddsOneOf, stepHasSlice, extractSliceFromStep, isValidPosition, isEmptyParagraph } from './editor-core-utils';
|
|
6
|
+
export { isElementInTableCell, isTextSelection, isLastItemMediaGroup, setNodeSelection, setTextSelection, nonNullable, stepAddsOneOf, stepHasSlice, extractSliceFromStep, isValidPosition, isEmptyParagraph, isInLayoutColumn } from './editor-core-utils';
|
|
7
7
|
export { withImageLoader } from './imageLoader';
|
|
8
8
|
export { absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, calculateBreakoutStyles, calcBreakoutWidthPx } from './breakout';
|
|
9
9
|
export { findChangedNodesFromTransaction, validNode, validateNodes, isType, isParagraph, isText, isLinkMark, SelectedState, isNodeSelectedOrInRange, isSupportedInParent, isMediaNode, isNodeBeforeMediaNode } from './nodes';
|
|
@@ -39,4 +39,7 @@ export { isFromCurrentDomain, LinkMatcher, normalizeUrl, linkifyContent, getLink
|
|
|
39
39
|
|
|
40
40
|
// prosemirror-history does not export its plugin key
|
|
41
41
|
export var pmHistoryPluginKey = 'history$';
|
|
42
|
-
export { gridTypeForLayout } from './grid';
|
|
42
|
+
export { gridTypeForLayout } from './grid';
|
|
43
|
+
export { nodesBetweenChanged, getStepRange, isEmptyDocument, processRawValue, hasDocAsParent, bracketTyped } from './document';
|
|
44
|
+
export { floatingLayouts, isRichMediaInsideOfBlockNode, calculateSnapPoints, alignAttributes } from './rich-media-utils';
|
|
45
|
+
export { sanitizeNodeForPrivacy } from './filter/privacy-filter';
|