@atlaskit/editor-common 96.3.7 → 96.4.1
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/dist/cjs/analytics/analytics-queue.js +4 -5
- package/dist/cjs/annotation/index.js +9 -10
- package/dist/cjs/clipboard/index.js +8 -3
- package/dist/cjs/element-browser/ElementBrowser.js +11 -14
- package/dist/cjs/event-dispatcher/index.js +1 -2
- package/dist/cjs/extensibility/Extension/Lozenge/index.js +7 -10
- package/dist/cjs/extensibility/Extension.js +6 -9
- package/dist/cjs/extensibility/ExtensionComponent.js +25 -30
- package/dist/cjs/extensibility/extensionNodeView.js +5 -7
- package/dist/cjs/extensions/default-extension-provider.js +1 -2
- package/dist/cjs/lazy-node-view/lazy-scheduler.js +1 -1
- package/dist/cjs/lazy-node-view/node-view.js +1 -2
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +39 -45
- package/dist/cjs/link/LinkSearch/LinkSearchList.js +5 -7
- package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +9 -12
- package/dist/cjs/link/LinkSearch/index.js +13 -16
- package/dist/cjs/link/LinkSearch/withActivityProvider.js +6 -9
- package/dist/cjs/media-inline/inline-image-wrapper.js +1 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/portal/PortalManager.js +1 -2
- package/dist/cjs/preset/builder.js +2 -4
- package/dist/cjs/preset/core-plugin/index.js +7 -2
- package/dist/cjs/preset/editor-commands.js +4 -5
- package/dist/cjs/preset/plugin-injection-api.js +4 -8
- package/dist/cjs/provider-factory/provider-factory.js +1 -2
- package/dist/cjs/provider-factory/with-providers.js +8 -11
- package/dist/cjs/react-node-view/index.js +1 -2
- package/dist/cjs/safe-plugin/index.js +4 -5
- package/dist/cjs/selection/gap-cursor/selection.js +7 -11
- package/dist/cjs/selection-based-node-view/SelectionBasedNodeView.js +10 -13
- package/dist/cjs/styles/shared/media-single.js +21 -20
- package/dist/cjs/styles/shared/paragraph.js +1 -1
- package/dist/cjs/styles/shared/shadow.js +9 -8
- package/dist/cjs/styles/shared/table.js +1 -1
- package/dist/cjs/types/annotation/emitter.js +1 -2
- package/dist/cjs/ui/Caption/index.js +5 -7
- package/dist/cjs/ui/ContextPanel/context.js +8 -11
- package/dist/cjs/ui/DropList/index.js +22 -25
- package/dist/cjs/ui/ErrorBoundary/index.js +6 -9
- package/dist/cjs/ui/Expand/sharedStyles.js +1 -1
- package/dist/cjs/ui/IntlErrorBoundary/index.js +6 -9
- package/dist/cjs/ui/Layer/index.js +9 -12
- package/dist/cjs/ui/Mention/index.js +6 -9
- package/dist/cjs/ui/Mention/mention-with-providers.js +6 -9
- package/dist/cjs/ui/Messages/index.js +1 -1
- package/dist/cjs/ui/OverflowShadow/index.js +13 -16
- package/dist/cjs/ui/OverflowShadow/shadowObserver.js +3 -5
- package/dist/cjs/ui/PanelTextInput/index.js +10 -13
- package/dist/cjs/ui/Popup/index.js +14 -17
- package/dist/cjs/ui/ResizerLegacy/index.js +12 -16
- package/dist/cjs/ui/WithCreateAnalyticsEvent/index.js +5 -7
- package/dist/cjs/ui/with-outer-listeners.js +10 -13
- package/dist/cjs/ui-menu/Dropdown/index.js +9 -12
- package/dist/cjs/ui-menu/DropdownMenu/index.js +11 -14
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +8 -11
- package/dist/cjs/utils/error-reporter.js +1 -2
- package/dist/cjs/utils/hyperlink.js +2 -4
- package/dist/cjs/utils/imageLoader.js +14 -19
- package/dist/cjs/utils/profiler/render-count.js +1 -2
- package/dist/cjs/utils/traversor.js +1 -2
- package/dist/cjs/with-plugin-state/index.js +28 -35
- package/dist/es2019/analytics/analytics-queue.js +3 -3
- package/dist/es2019/clipboard/index.js +8 -3
- package/dist/es2019/lazy-node-view/lazy-scheduler.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/preset/core-plugin/index.js +7 -2
- package/dist/es2019/styles/shared/paragraph.js +1 -1
- package/dist/es2019/styles/shared/table.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Expand/sharedStyles.js +1 -1
- package/dist/es2019/ui/Messages/index.js +1 -1
- package/dist/esm/analytics/analytics-queue.js +4 -5
- package/dist/esm/annotation/index.js +9 -10
- package/dist/esm/clipboard/index.js +8 -3
- package/dist/esm/element-browser/ElementBrowser.js +11 -14
- package/dist/esm/event-dispatcher/index.js +1 -2
- package/dist/esm/extensibility/Extension/Lozenge/index.js +7 -10
- package/dist/esm/extensibility/Extension.js +6 -9
- package/dist/esm/extensibility/ExtensionComponent.js +25 -30
- package/dist/esm/extensibility/extensionNodeView.js +5 -7
- package/dist/esm/extensions/default-extension-provider.js +1 -2
- package/dist/esm/lazy-node-view/lazy-scheduler.js +1 -1
- package/dist/esm/lazy-node-view/node-view.js +1 -2
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +39 -45
- package/dist/esm/link/LinkSearch/LinkSearchList.js +5 -7
- package/dist/esm/link/LinkSearch/LinkSearchListItem.js +9 -12
- package/dist/esm/link/LinkSearch/index.js +13 -16
- package/dist/esm/link/LinkSearch/withActivityProvider.js +6 -9
- package/dist/esm/media-inline/inline-image-wrapper.js +1 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/portal/PortalManager.js +1 -2
- package/dist/esm/preset/builder.js +2 -4
- package/dist/esm/preset/core-plugin/index.js +7 -2
- package/dist/esm/preset/editor-commands.js +4 -5
- package/dist/esm/preset/plugin-injection-api.js +4 -8
- package/dist/esm/provider-factory/provider-factory.js +1 -2
- package/dist/esm/provider-factory/with-providers.js +8 -11
- package/dist/esm/react-node-view/index.js +1 -2
- package/dist/esm/safe-plugin/index.js +4 -5
- package/dist/esm/selection/gap-cursor/selection.js +7 -11
- package/dist/esm/selection-based-node-view/SelectionBasedNodeView.js +10 -13
- package/dist/esm/styles/shared/media-single.js +19 -20
- package/dist/esm/styles/shared/paragraph.js +1 -1
- package/dist/esm/styles/shared/shadow.js +7 -8
- package/dist/esm/styles/shared/table.js +1 -1
- package/dist/esm/types/annotation/emitter.js +1 -2
- package/dist/esm/ui/Caption/index.js +5 -7
- package/dist/esm/ui/ContextPanel/context.js +8 -11
- package/dist/esm/ui/DropList/index.js +22 -25
- package/dist/esm/ui/ErrorBoundary/index.js +6 -9
- package/dist/esm/ui/Expand/sharedStyles.js +1 -1
- package/dist/esm/ui/IntlErrorBoundary/index.js +6 -9
- package/dist/esm/ui/Layer/index.js +9 -12
- package/dist/esm/ui/Mention/index.js +6 -9
- package/dist/esm/ui/Mention/mention-with-providers.js +6 -9
- package/dist/esm/ui/Messages/index.js +1 -1
- package/dist/esm/ui/OverflowShadow/index.js +13 -16
- package/dist/esm/ui/OverflowShadow/shadowObserver.js +3 -5
- package/dist/esm/ui/PanelTextInput/index.js +10 -13
- package/dist/esm/ui/Popup/index.js +14 -17
- package/dist/esm/ui/ResizerLegacy/index.js +12 -16
- package/dist/esm/ui/WithCreateAnalyticsEvent/index.js +5 -7
- package/dist/esm/ui/with-outer-listeners.js +10 -13
- package/dist/esm/ui-menu/Dropdown/index.js +9 -12
- package/dist/esm/ui-menu/DropdownMenu/index.js +11 -14
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +8 -11
- package/dist/esm/utils/error-reporter.js +1 -2
- package/dist/esm/utils/hyperlink.js +2 -4
- package/dist/esm/utils/imageLoader.js +14 -19
- package/dist/esm/utils/profiler/render-count.js +1 -2
- package/dist/esm/utils/traversor.js +1 -2
- package/dist/esm/with-plugin-state/index.js +28 -35
- package/dist/types/types/next-editor-plugin.d.ts +5 -1
- package/dist/types-ts4.5/types/next-editor-plugin.d.ts +5 -1
- package/package.json +3 -3
|
@@ -101,7 +101,7 @@ var ActionsAPI = /*#__PURE__*/function () {
|
|
|
101
101
|
function ActionsAPI() {
|
|
102
102
|
_classCallCheck(this, ActionsAPI);
|
|
103
103
|
}
|
|
104
|
-
_createClass(ActionsAPI, [{
|
|
104
|
+
return _createClass(ActionsAPI, [{
|
|
105
105
|
key: "createAPI",
|
|
106
106
|
value: function createAPI(plugin) {
|
|
107
107
|
if (!plugin || !hasActions(plugin)) {
|
|
@@ -115,13 +115,12 @@ var ActionsAPI = /*#__PURE__*/function () {
|
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
}]);
|
|
118
|
-
return ActionsAPI;
|
|
119
118
|
}();
|
|
120
119
|
var EditorCommandsAPI = /*#__PURE__*/function () {
|
|
121
120
|
function EditorCommandsAPI() {
|
|
122
121
|
_classCallCheck(this, EditorCommandsAPI);
|
|
123
122
|
}
|
|
124
|
-
_createClass(EditorCommandsAPI, [{
|
|
123
|
+
return _createClass(EditorCommandsAPI, [{
|
|
125
124
|
key: "createAPI",
|
|
126
125
|
value: function createAPI(plugin) {
|
|
127
126
|
if (!plugin || !hasCommands(plugin)) {
|
|
@@ -135,7 +134,6 @@ var EditorCommandsAPI = /*#__PURE__*/function () {
|
|
|
135
134
|
});
|
|
136
135
|
}
|
|
137
136
|
}]);
|
|
138
|
-
return EditorCommandsAPI;
|
|
139
137
|
}();
|
|
140
138
|
export var SharedStateAPI = /*#__PURE__*/function () {
|
|
141
139
|
function SharedStateAPI(_ref4) {
|
|
@@ -145,7 +143,7 @@ export var SharedStateAPI = /*#__PURE__*/function () {
|
|
|
145
143
|
this.getEditorState = getEditorState;
|
|
146
144
|
this.listeners = new Map();
|
|
147
145
|
}
|
|
148
|
-
_createClass(SharedStateAPI, [{
|
|
146
|
+
return _createClass(SharedStateAPI, [{
|
|
149
147
|
key: "createAPI",
|
|
150
148
|
value: function createAPI(plugin) {
|
|
151
149
|
var _this = this;
|
|
@@ -230,7 +228,6 @@ export var SharedStateAPI = /*#__PURE__*/function () {
|
|
|
230
228
|
this.updatesToNotifyQueue.clear();
|
|
231
229
|
}
|
|
232
230
|
}]);
|
|
233
|
-
return SharedStateAPI;
|
|
234
231
|
}();
|
|
235
232
|
var editorAPICache = new WeakMap();
|
|
236
233
|
export var EditorPluginInjectionAPI = /*#__PURE__*/function () {
|
|
@@ -279,7 +276,7 @@ export var EditorPluginInjectionAPI = /*#__PURE__*/function () {
|
|
|
279
276
|
}
|
|
280
277
|
}));
|
|
281
278
|
}
|
|
282
|
-
_createClass(EditorPluginInjectionAPI, [{
|
|
279
|
+
return _createClass(EditorPluginInjectionAPI, [{
|
|
283
280
|
key: "createAPI",
|
|
284
281
|
value: function createAPI() {
|
|
285
282
|
var sharedStateAPI = this.sharedStateAPI,
|
|
@@ -318,5 +315,4 @@ export var EditorPluginInjectionAPI = /*#__PURE__*/function () {
|
|
|
318
315
|
return editorAPICache.get(this);
|
|
319
316
|
}
|
|
320
317
|
}]);
|
|
321
|
-
return EditorPluginInjectionAPI;
|
|
322
318
|
}();
|
|
@@ -10,7 +10,7 @@ var ProviderFactory = /*#__PURE__*/function () {
|
|
|
10
10
|
_defineProperty(this, "providers", new Map());
|
|
11
11
|
_defineProperty(this, "subscribers", new Map());
|
|
12
12
|
}
|
|
13
|
-
_createClass(ProviderFactory, [{
|
|
13
|
+
return _createClass(ProviderFactory, [{
|
|
14
14
|
key: "destroy",
|
|
15
15
|
value: function destroy() {
|
|
16
16
|
this.providers.clear();
|
|
@@ -106,6 +106,5 @@ var ProviderFactory = /*#__PURE__*/function () {
|
|
|
106
106
|
return providerFactory;
|
|
107
107
|
}
|
|
108
108
|
}]);
|
|
109
|
-
return ProviderFactory;
|
|
110
109
|
}();
|
|
111
110
|
export { ProviderFactory as default };
|
|
@@ -1,32 +1,29 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
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
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
-
function
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
11
|
/* eslint-disable @repo/internal/react/no-class-components */
|
|
13
12
|
import { PureComponent } from 'react';
|
|
14
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
14
|
export var WithProviders = /*#__PURE__*/function (_PureComponent) {
|
|
16
|
-
_inherits(WithProviders, _PureComponent);
|
|
17
|
-
var _super = _createSuper(WithProviders);
|
|
18
15
|
function WithProviders(props) {
|
|
19
16
|
var _this;
|
|
20
17
|
_classCallCheck(this, WithProviders);
|
|
21
|
-
_this =
|
|
22
|
-
_defineProperty(
|
|
23
|
-
_defineProperty(
|
|
18
|
+
_this = _callSuper(this, WithProviders, [props]);
|
|
19
|
+
_defineProperty(_this, "mounted", false);
|
|
20
|
+
_defineProperty(_this, "handleProviderIfMounted", function (name, provider) {
|
|
24
21
|
if (!_this.mounted) {
|
|
25
22
|
return;
|
|
26
23
|
}
|
|
27
24
|
_this.handleProvider(name, provider);
|
|
28
25
|
});
|
|
29
|
-
_defineProperty(
|
|
26
|
+
_defineProperty(_this, "handleProvider", function (name, provider) {
|
|
30
27
|
_this.setState(function (_ref) {
|
|
31
28
|
var providers = _ref.providers;
|
|
32
29
|
return {
|
|
@@ -49,7 +46,8 @@ export var WithProviders = /*#__PURE__*/function (_PureComponent) {
|
|
|
49
46
|
};
|
|
50
47
|
return _this;
|
|
51
48
|
}
|
|
52
|
-
|
|
49
|
+
_inherits(WithProviders, _PureComponent);
|
|
50
|
+
return _createClass(WithProviders, [{
|
|
53
51
|
key: "componentDidMount",
|
|
54
52
|
value: function componentDidMount() {
|
|
55
53
|
this.mounted = true;
|
|
@@ -87,6 +85,5 @@ export var WithProviders = /*#__PURE__*/function (_PureComponent) {
|
|
|
87
85
|
return renderNode(state.providers);
|
|
88
86
|
}
|
|
89
87
|
}]);
|
|
90
|
-
return WithProviders;
|
|
91
88
|
}(PureComponent);
|
|
92
89
|
_defineProperty(WithProviders, "displayName", 'WithProviders');
|
|
@@ -49,7 +49,7 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
49
49
|
* constructor, which leads to some methods being undefined during the
|
|
50
50
|
* first render.
|
|
51
51
|
*/
|
|
52
|
-
_createClass(ReactNodeView, [{
|
|
52
|
+
return _createClass(ReactNodeView, [{
|
|
53
53
|
key: "init",
|
|
54
54
|
value: function init() {
|
|
55
55
|
var _this2 = this;
|
|
@@ -257,6 +257,5 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
257
257
|
};
|
|
258
258
|
}
|
|
259
259
|
}]);
|
|
260
|
-
return ReactNodeView;
|
|
261
260
|
}();
|
|
262
261
|
export { ReactNodeView as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
6
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
7
7
|
import _toArray from "@babel/runtime/helpers/toArray";
|
|
8
8
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
9
|
-
function
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import { Plugin } from '@atlaskit/editor-prosemirror/state';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -78,15 +78,14 @@ var wrapGetPosExceptions = function wrapGetPosExceptions(spec) {
|
|
|
78
78
|
return spec;
|
|
79
79
|
};
|
|
80
80
|
export var SafePlugin = /*#__PURE__*/function (_Plugin) {
|
|
81
|
-
_inherits(SafePlugin, _Plugin);
|
|
82
|
-
var _super = _createSuper(SafePlugin);
|
|
83
81
|
// This variable isn't (and shouldn't) be used anywhere. Its purpose is
|
|
84
82
|
// to distinguish Plugin from SafePlugin, thus ensuring that an 'unsafe'
|
|
85
83
|
// Plugin cannot be assigned as an item in EditorPlugin → pmPlugins.
|
|
86
84
|
|
|
87
85
|
function SafePlugin(spec) {
|
|
88
86
|
_classCallCheck(this, SafePlugin);
|
|
89
|
-
return
|
|
87
|
+
return _callSuper(this, SafePlugin, [wrapGetPosExceptions(spec)]);
|
|
90
88
|
}
|
|
89
|
+
_inherits(SafePlugin, _Plugin);
|
|
91
90
|
return _createClass(SafePlugin);
|
|
92
91
|
}(Plugin);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
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
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
11
10
|
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -17,8 +16,6 @@ export var Side = /*#__PURE__*/function (Side) {
|
|
|
17
16
|
}({});
|
|
18
17
|
export var JSON_ID = 'gapcursor';
|
|
19
18
|
export var GapCursorSelection = /*#__PURE__*/function (_Selection) {
|
|
20
|
-
_inherits(GapCursorSelection, _Selection);
|
|
21
|
-
var _super = _createSuper(GapCursorSelection);
|
|
22
19
|
/**
|
|
23
20
|
* Construct a GapCursorSelection
|
|
24
21
|
* @param {ResolvedPos} $pos resolved position
|
|
@@ -28,12 +25,13 @@ export var GapCursorSelection = /*#__PURE__*/function (_Selection) {
|
|
|
28
25
|
var _this;
|
|
29
26
|
var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Side.LEFT;
|
|
30
27
|
_classCallCheck(this, GapCursorSelection);
|
|
31
|
-
_this =
|
|
32
|
-
_defineProperty(
|
|
28
|
+
_this = _callSuper(this, GapCursorSelection, [$pos, $pos]);
|
|
29
|
+
_defineProperty(_this, "visible", false);
|
|
33
30
|
_this.side = side;
|
|
34
31
|
return _this;
|
|
35
32
|
}
|
|
36
|
-
|
|
33
|
+
_inherits(GapCursorSelection, _Selection);
|
|
34
|
+
return _createClass(GapCursorSelection, [{
|
|
37
35
|
key: "map",
|
|
38
36
|
value: function map(doc, mapping) {
|
|
39
37
|
var $pos = doc.resolve(mapping.map(this.head));
|
|
@@ -125,7 +123,6 @@ export var GapCursorSelection = /*#__PURE__*/function (_Selection) {
|
|
|
125
123
|
return new GapCursorSelection(doc.resolve(json.pos), json.side);
|
|
126
124
|
}
|
|
127
125
|
}]);
|
|
128
|
-
return GapCursorSelection;
|
|
129
126
|
}(Selection);
|
|
130
127
|
Selection.jsonID(JSON_ID, GapCursorSelection);
|
|
131
128
|
export var GapBookmark = /*#__PURE__*/function () {
|
|
@@ -133,7 +130,7 @@ export var GapBookmark = /*#__PURE__*/function () {
|
|
|
133
130
|
_classCallCheck(this, GapBookmark);
|
|
134
131
|
this.pos = pos;
|
|
135
132
|
}
|
|
136
|
-
_createClass(GapBookmark, [{
|
|
133
|
+
return _createClass(GapBookmark, [{
|
|
137
134
|
key: "map",
|
|
138
135
|
value: function map(mapping) {
|
|
139
136
|
return new GapBookmark(mapping.map(this.pos));
|
|
@@ -145,5 +142,4 @@ export var GapBookmark = /*#__PURE__*/function () {
|
|
|
145
142
|
return GapCursorSelection.valid($pos) ? new GapCursorSelection($pos) : Selection.near($pos);
|
|
146
143
|
}
|
|
147
144
|
}]);
|
|
148
|
-
return GapBookmark;
|
|
149
145
|
}();
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
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
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import ReactNodeView from '../react-node-view';
|
|
11
10
|
|
|
@@ -34,14 +33,12 @@ import ReactNodeView from '../react-node-view';
|
|
|
34
33
|
*/
|
|
35
34
|
|
|
36
35
|
export var SelectionBasedNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
37
|
-
_inherits(SelectionBasedNodeView, _ReactNodeView);
|
|
38
|
-
var _super = _createSuper(SelectionBasedNodeView);
|
|
39
36
|
function SelectionBasedNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent, viewShouldUpdate) {
|
|
40
37
|
var _this;
|
|
41
38
|
_classCallCheck(this, SelectionBasedNodeView);
|
|
42
|
-
_this =
|
|
43
|
-
_defineProperty(
|
|
44
|
-
_defineProperty(
|
|
39
|
+
_this = _callSuper(this, SelectionBasedNodeView, [node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent, viewShouldUpdate]);
|
|
40
|
+
_defineProperty(_this, "isSelectedNode", false);
|
|
41
|
+
_defineProperty(_this, "isNodeInsideSelection", function (from, to, pos, posEnd) {
|
|
45
42
|
var _this$getPositionsWit = _this.getPositionsWithDefault(pos, posEnd);
|
|
46
43
|
pos = _this$getPositionsWit.pos;
|
|
47
44
|
posEnd = _this$getPositionsWit.posEnd;
|
|
@@ -50,7 +47,7 @@ export var SelectionBasedNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
50
47
|
}
|
|
51
48
|
return from <= pos && to >= posEnd;
|
|
52
49
|
});
|
|
53
|
-
_defineProperty(
|
|
50
|
+
_defineProperty(_this, "isSelectionInsideNode", function (from, to, pos, posEnd) {
|
|
54
51
|
var _this$getPositionsWit2 = _this.getPositionsWithDefault(pos, posEnd);
|
|
55
52
|
pos = _this$getPositionsWit2.pos;
|
|
56
53
|
posEnd = _this$getPositionsWit2.posEnd;
|
|
@@ -59,13 +56,13 @@ export var SelectionBasedNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
59
56
|
}
|
|
60
57
|
return pos < from && to < posEnd;
|
|
61
58
|
});
|
|
62
|
-
_defineProperty(
|
|
59
|
+
_defineProperty(_this, "insideSelection", function () {
|
|
63
60
|
var _this$view$state$sele = _this.view.state.selection,
|
|
64
61
|
from = _this$view$state$sele.from,
|
|
65
62
|
to = _this$view$state$sele.to;
|
|
66
63
|
return _this.isSelectedNode || _this.isSelectionInsideNode(from, to);
|
|
67
64
|
});
|
|
68
|
-
_defineProperty(
|
|
65
|
+
_defineProperty(_this, "nodeInsideSelection", function () {
|
|
69
66
|
var selection = _this.view.state.selection;
|
|
70
67
|
var from = selection.from,
|
|
71
68
|
to = selection.to;
|
|
@@ -81,7 +78,8 @@ export var SelectionBasedNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
81
78
|
* Prefer `this.pos` rather than getPos(), because calling getPos is
|
|
82
79
|
* expensive, unless you know you're definitely going to render.
|
|
83
80
|
*/
|
|
84
|
-
|
|
81
|
+
_inherits(SelectionBasedNodeView, _ReactNodeView);
|
|
82
|
+
return _createClass(SelectionBasedNodeView, [{
|
|
85
83
|
key: "updatePos",
|
|
86
84
|
value: function updatePos() {
|
|
87
85
|
if (typeof this.getPos === 'boolean') {
|
|
@@ -114,5 +112,4 @@ export var SelectionBasedNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
114
112
|
this.update(this.node, this.decorations);
|
|
115
113
|
}
|
|
116
114
|
}]);
|
|
117
|
-
return SelectionBasedNodeView;
|
|
118
115
|
}(ReactNodeView);
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
var _css, _css2;
|
|
3
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
3
|
import { css } from '@emotion/react';
|
|
5
4
|
import { akEditorWrappedNodeZIndex } from '@atlaskit/editor-shared-styles';
|
|
6
5
|
var richMediaClassName = 'rich-media-item';
|
|
7
6
|
var wrappedMediaBreakoutPoint = 410;
|
|
8
|
-
var mediaSingleSharedStyle = css((
|
|
7
|
+
var mediaSingleSharedStyle = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "li .".concat(richMediaClassName), {
|
|
9
8
|
margin: 0
|
|
10
|
-
}),
|
|
9
|
+
}), '&.ua-chrome li > .mediaSingleView-content-wrap::before', {
|
|
11
10
|
content: "''",
|
|
12
11
|
display: 'block',
|
|
13
12
|
height: 0
|
|
14
|
-
}),
|
|
13
|
+
}), '&.ua-firefox', {
|
|
15
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
16
15
|
'.mediaSingleView-content-wrap': {
|
|
17
16
|
userSelect: 'none'
|
|
@@ -20,9 +19,9 @@ var mediaSingleSharedStyle = css((_css = {}, _defineProperty(_css, "li .".concat
|
|
|
20
19
|
'.captionView-content-wrap': {
|
|
21
20
|
userSelect: 'text'
|
|
22
21
|
}
|
|
23
|
-
}),
|
|
22
|
+
}), ".mediaSingleView-content-wrap[layout='center']", {
|
|
24
23
|
clear: 'both'
|
|
25
|
-
}),
|
|
24
|
+
}), "table .".concat(richMediaClassName), {
|
|
26
25
|
marginTop: "var(--ds-space-150, 12px)",
|
|
27
26
|
marginBottom: "var(--ds-space-150, 12px)",
|
|
28
27
|
clear: 'both',
|
|
@@ -34,26 +33,26 @@ var mediaSingleSharedStyle = css((_css = {}, _defineProperty(_css, "li .".concat
|
|
|
34
33
|
marginTop: "var(--ds-space-150, 12px)"
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
|
-
}),
|
|
36
|
+
}), ".".concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-left"), {
|
|
38
37
|
clear: 'both'
|
|
39
|
-
}),
|
|
38
|
+
}), ".".concat(richMediaClassName, ".image-wrap-left + .").concat(richMediaClassName, ".image-wrap-right, .").concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-left, .").concat(richMediaClassName, ".image-wrap-left + .").concat(richMediaClassName, ".image-wrap-left, .").concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-right"), {
|
|
40
39
|
marginRight: 0,
|
|
41
40
|
marginLeft: 0
|
|
42
|
-
}),
|
|
41
|
+
}), "@media all and (max-width: ".concat(wrappedMediaBreakoutPoint, "px)"), {
|
|
43
42
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
44
43
|
"div.mediaSingleView-content-wrap[layout='wrap-left'], div.mediaSingleView-content-wrap[data-layout='wrap-left'], div.mediaSingleView-content-wrap[layout='wrap-right'], div.mediaSingleView-content-wrap[data-layout='wrap-right']": {
|
|
45
44
|
float: 'none',
|
|
46
45
|
overflow: 'auto',
|
|
47
46
|
margin: "var(--ds-space-150, 12px)".concat(" 0")
|
|
48
47
|
}
|
|
49
|
-
})
|
|
50
|
-
var mediaSingleSharedStyleNew = css((
|
|
48
|
+
}));
|
|
49
|
+
var mediaSingleSharedStyleNew = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "li .".concat(richMediaClassName), {
|
|
51
50
|
margin: 0
|
|
52
|
-
}),
|
|
51
|
+
}), '&.ua-chrome li > .mediaSingleView-content-wrap::before', {
|
|
53
52
|
content: "''",
|
|
54
53
|
display: 'block',
|
|
55
54
|
height: 0
|
|
56
|
-
}),
|
|
55
|
+
}), '&.ua-firefox', {
|
|
57
56
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
58
57
|
'.mediaSingleView-content-wrap': {
|
|
59
58
|
userSelect: 'none'
|
|
@@ -62,13 +61,13 @@ var mediaSingleSharedStyleNew = css((_css2 = {}, _defineProperty(_css2, "li .".c
|
|
|
62
61
|
'.captionView-content-wrap': {
|
|
63
62
|
userSelect: 'text'
|
|
64
63
|
}
|
|
65
|
-
}),
|
|
64
|
+
}), ".mediaSingleView-content-wrap[layout^='wrap-']", {
|
|
66
65
|
position: 'relative',
|
|
67
66
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
68
67
|
zIndex: akEditorWrappedNodeZIndex
|
|
69
|
-
}),
|
|
68
|
+
}), ".mediaSingleView-content-wrap[layout='center']", {
|
|
70
69
|
clear: 'both'
|
|
71
|
-
}),
|
|
70
|
+
}), "table .".concat(richMediaClassName), {
|
|
72
71
|
marginTop: "var(--ds-space-150, 12px)",
|
|
73
72
|
marginBottom: "var(--ds-space-150, 12px)",
|
|
74
73
|
clear: 'both',
|
|
@@ -80,19 +79,19 @@ var mediaSingleSharedStyleNew = css((_css2 = {}, _defineProperty(_css2, "li .".c
|
|
|
80
79
|
marginTop: "var(--ds-space-150, 12px)"
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
|
-
}),
|
|
82
|
+
}), ".".concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-left"), {
|
|
84
83
|
clear: 'both'
|
|
85
|
-
}),
|
|
84
|
+
}), ".".concat(richMediaClassName, ".image-wrap-left + .").concat(richMediaClassName, ".image-wrap-right, .").concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-left, .").concat(richMediaClassName, ".image-wrap-left + .").concat(richMediaClassName, ".image-wrap-left, .").concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-right"), {
|
|
86
85
|
marginRight: 0,
|
|
87
86
|
marginLeft: 0
|
|
88
|
-
}),
|
|
87
|
+
}), "@media all and (max-width: ".concat(wrappedMediaBreakoutPoint, "px)"), {
|
|
89
88
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
90
89
|
"div.mediaSingleView-content-wrap[layout='wrap-left'], div.mediaSingleView-content-wrap[data-layout='wrap-left'], div.mediaSingleView-content-wrap[layout='wrap-right'], div.mediaSingleView-content-wrap[data-layout='wrap-right']": {
|
|
91
90
|
float: 'none',
|
|
92
91
|
overflow: 'auto',
|
|
93
92
|
margin: "var(--ds-space-150, 12px)".concat(" 0")
|
|
94
93
|
}
|
|
95
|
-
})
|
|
94
|
+
}));
|
|
96
95
|
|
|
97
96
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
98
97
|
export { mediaSingleSharedStyle, mediaSingleSharedStyleNew, richMediaClassName };
|
|
@@ -23,7 +23,7 @@ export var paragraphSharedStyles = function paragraphSharedStyles(typographyThem
|
|
|
23
23
|
fontSize: '1em',
|
|
24
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
25
25
|
lineHeight: akEditorLineHeight,
|
|
26
|
-
fontWeight:
|
|
26
|
+
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
27
27
|
marginTop: blockNodesVerticalMargin,
|
|
28
28
|
marginBottom: 0,
|
|
29
29
|
letterSpacing: '-0.005em'
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
var _css;
|
|
3
2
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
4
3
|
|
|
5
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -23,7 +22,7 @@ var shadowWidth = 8;
|
|
|
23
22
|
* background-attachment: local, local, scroll, scroll;
|
|
24
23
|
*/
|
|
25
24
|
|
|
26
|
-
var shadowSharedStyle = css((
|
|
25
|
+
var shadowSharedStyle = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "& .".concat(shadowClassNames.RIGHT_SHADOW, "::before, .").concat(shadowClassNames.RIGHT_SHADOW, "::after, .").concat(shadowClassNames.LEFT_SHADOW, "::before, .").concat(shadowClassNames.LEFT_SHADOW, "::after"), {
|
|
27
26
|
display: 'none',
|
|
28
27
|
position: 'absolute',
|
|
29
28
|
pointerEvents: 'none',
|
|
@@ -32,27 +31,27 @@ var shadowSharedStyle = css((_css = {}, _defineProperty(_css, "& .".concat(shado
|
|
|
32
31
|
width: "".concat(shadowWidth, "px"),
|
|
33
32
|
content: "''",
|
|
34
33
|
height: 'calc(100%)'
|
|
35
|
-
}),
|
|
34
|
+
}), "& .".concat(shadowClassNames.RIGHT_SHADOW, ", .").concat(shadowClassNames.LEFT_SHADOW), {
|
|
36
35
|
position: 'relative'
|
|
37
|
-
}),
|
|
36
|
+
}), "& .".concat(shadowClassNames.LEFT_SHADOW, "::before"), {
|
|
38
37
|
background: "linear-gradient( to left, transparent 0, ".concat("var(--ds-shadow-overflow-spread, #091e4229)", " 140% ), linear-gradient( to right, ", "var(--ds-shadow-overflow-perimeter, transparent)", " 0px, transparent 1px )"),
|
|
39
38
|
top: '0px',
|
|
40
39
|
left: 0,
|
|
41
40
|
display: 'block'
|
|
42
|
-
}),
|
|
41
|
+
}), "& .".concat(shadowClassNames.RIGHT_SHADOW, "::after"), {
|
|
43
42
|
background: "linear-gradient( to right, transparent 0, ".concat("var(--ds-shadow-overflow-spread, #091e4229)", " 140% ), linear-gradient( to left, ", "var(--ds-shadow-overflow-perimeter, transparent)", " 0px, transparent 1px )"),
|
|
44
43
|
right: '0px',
|
|
45
44
|
top: '0px',
|
|
46
45
|
display: 'block'
|
|
47
|
-
}),
|
|
46
|
+
}), "& .".concat(shadowObserverClassNames.SENTINEL_LEFT), {
|
|
48
47
|
height: '100%',
|
|
49
48
|
width: '0px',
|
|
50
49
|
minWidth: '0px'
|
|
51
|
-
}),
|
|
50
|
+
}), "& .".concat(shadowObserverClassNames.SENTINEL_RIGHT), {
|
|
52
51
|
height: '100%',
|
|
53
52
|
width: '0px',
|
|
54
53
|
minWidth: '0px'
|
|
55
|
-
})
|
|
54
|
+
}));
|
|
56
55
|
|
|
57
56
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
58
57
|
export { shadowSharedStyle };
|
|
@@ -52,7 +52,7 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
|
52
52
|
|
|
53
53
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
|
|
54
54
|
var tableSharedStyle = function tableSharedStyle() {
|
|
55
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t", "\n\t.", " {\n\t\tposition: relative;\n\t\tmargin: 0 auto ", ";\n\t\tbox-sizing: border-box;\n\n\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.", "[data-number-column='true'] {\n\t\tpadding-left: ", "px;\n\t\tclear: both;\n\t}\n\n\t.", " {\n\t\twill-change: width, margin-left;\n\t}\n\n\t.", " table {\n\t\twill-change: width;\n\t}\n\n\t.", " > table {\n\t\tmargin: ", " 0 0 0;\n\t}\n\n\t.", " > table,\n\t.", " > table {\n\t\tmargin: ", " ", " 0 0;\n\t}\n\n\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\tborder-collapse: collapse;\n\t\tborder: ", "px solid\n\t\t\t", ";\n\t\ttable-layout: fixed;\n\t\tfont-size: 1em;\n\t\twidth: 100%;\n\n\t\t&[data-autosize='true'] {\n\t\t\ttable-layout: auto;\n\t\t}\n\n\t\t& {\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\thr {\n\t\t\t\tbox-sizing: content-box;\n\t\t\t}\n\n\t\t\ttbody {\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t\tth td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\tth,\n\t\t\ttd {\n\t\t\t\tmin-width: ", "px;\n\t\t\t\tfont-weight:
|
|
55
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t", "\n\t.", " {\n\t\tposition: relative;\n\t\tmargin: 0 auto ", ";\n\t\tbox-sizing: border-box;\n\n\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.", "[data-number-column='true'] {\n\t\tpadding-left: ", "px;\n\t\tclear: both;\n\t}\n\n\t.", " {\n\t\twill-change: width, margin-left;\n\t}\n\n\t.", " table {\n\t\twill-change: width;\n\t}\n\n\t.", " > table {\n\t\tmargin: ", " 0 0 0;\n\t}\n\n\t.", " > table,\n\t.", " > table {\n\t\tmargin: ", " ", " 0 0;\n\t}\n\n\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\tborder-collapse: collapse;\n\t\tborder: ", "px solid\n\t\t\t", ";\n\t\ttable-layout: fixed;\n\t\tfont-size: 1em;\n\t\twidth: 100%;\n\n\t\t&[data-autosize='true'] {\n\t\t\ttable-layout: auto;\n\t\t}\n\n\t\t& {\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\thr {\n\t\t\t\tbox-sizing: content-box;\n\t\t\t}\n\n\t\t\ttbody {\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t\tth td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\tth,\n\t\t\ttd {\n\t\t\t\tmin-width: ", "px;\n\t\t\t\tfont-weight: ", ";\n\t\t\t\tvertical-align: top;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tborder-right-width: 0;\n\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\tpadding: ", ";\n\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t", "\n\n\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t\tth {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\ttext-align: left;\n\n\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t&:not([style]):not(.danger) {\n\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t// selector lives inside @atlaskit/code\n\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"])), tableCellBackgroundStyleOverride(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", tableCellMinWidth, "var(--ds-font-weight-regular, 400)", "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), editorExperiment('table-nested-dnd', true) ? "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-250, 20px)") : "var(--ds-space-100, 8px)", browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", fg('platform_editor_nested_tables_renderer_styles') ? "// Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected\n\t\t\t> tbody > tr > td {\n\t\t\t\tbackground-color: ".concat("var(--ds-surface, #FFFFFF)", ";\n\t\t\t}") : '', "var(--ds-background-accent-gray-subtlest, ".concat(akEditorTableToolbar, ")"), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", akEditorSelectedNodeClassName, "var(--ds-border, transparent)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, overflowShadow({
|
|
56
56
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
57
57
|
}), "var(--ds-background-neutral, rgb(235, 237, 240))", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, rgb(226, 229, 233))", overflowShadow({
|
|
58
58
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
@@ -17,7 +17,7 @@ export var AnnotationUpdateEmitter = /*#__PURE__*/function () {
|
|
|
17
17
|
_classCallCheck(this, AnnotationUpdateEmitter);
|
|
18
18
|
_defineProperty(this, "emitter", new EventEmitter());
|
|
19
19
|
}
|
|
20
|
-
_createClass(AnnotationUpdateEmitter, [{
|
|
20
|
+
return _createClass(AnnotationUpdateEmitter, [{
|
|
21
21
|
key: "emit",
|
|
22
22
|
value: function emit(event, params) {
|
|
23
23
|
if (typeof params === 'undefined') {
|
|
@@ -41,5 +41,4 @@ export var AnnotationUpdateEmitter = /*#__PURE__*/function () {
|
|
|
41
41
|
return this.emitter.listeners(event);
|
|
42
42
|
}
|
|
43
43
|
}]);
|
|
44
|
-
return AnnotationUpdateEmitter;
|
|
45
44
|
}();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
/**
|
|
10
10
|
* @jsxRuntime classic
|
|
@@ -30,13 +30,12 @@ var placeholderStyle = xcss({
|
|
|
30
30
|
width: '100%'
|
|
31
31
|
});
|
|
32
32
|
export var CaptionComponent = /*#__PURE__*/function (_React$Component) {
|
|
33
|
-
_inherits(CaptionComponent, _React$Component);
|
|
34
|
-
var _super = _createSuper(CaptionComponent);
|
|
35
33
|
function CaptionComponent() {
|
|
36
34
|
_classCallCheck(this, CaptionComponent);
|
|
37
|
-
return
|
|
35
|
+
return _callSuper(this, CaptionComponent, arguments);
|
|
38
36
|
}
|
|
39
|
-
|
|
37
|
+
_inherits(CaptionComponent, _React$Component);
|
|
38
|
+
return _createClass(CaptionComponent, [{
|
|
40
39
|
key: "render",
|
|
41
40
|
value: function render() {
|
|
42
41
|
var _this$props = this.props,
|
|
@@ -56,6 +55,5 @@ export var CaptionComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
56
55
|
}, jsx(Text, null, formatMessage(messages.placeholder))) : null, children);
|
|
57
56
|
}
|
|
58
57
|
}]);
|
|
59
|
-
return CaptionComponent;
|
|
60
58
|
}(React.Component);
|
|
61
59
|
export default injectIntl(CaptionComponent);
|