@atlaskit/editor-common 78.8.4 → 78.9.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/afm-cc/tsconfig.json +3 -0
- package/dist/cjs/extensibility/Extension/Extension/index.js +17 -6
- package/dist/cjs/extensibility/Extension/InlineExtension/index.js +6 -2
- package/dist/cjs/extensibility/Extension/Lozenge.js +42 -49
- package/dist/cjs/extensibility/Extension/LozengeComponent.js +54 -0
- package/dist/cjs/extensibility/Extension/styles.js +5 -4
- package/dist/cjs/extensibility/ExtensionComponent.js +7 -2
- package/dist/cjs/i18n/en.js +1 -1
- package/dist/cjs/i18n/en_GB.js +1 -1
- package/dist/cjs/i18n/en_ZZ.js +1 -1
- package/dist/cjs/messages/paste-options-toolbar.js +1 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/extensibility/Extension/Extension/index.js +14 -6
- package/dist/es2019/extensibility/Extension/InlineExtension/index.js +7 -4
- package/dist/es2019/extensibility/Extension/Lozenge.js +46 -47
- package/dist/es2019/extensibility/Extension/LozengeComponent.js +45 -0
- package/dist/es2019/extensibility/Extension/styles.js +7 -0
- package/dist/es2019/extensibility/ExtensionComponent.js +9 -2
- package/dist/es2019/i18n/en.js +1 -1
- package/dist/es2019/i18n/en_GB.js +1 -1
- package/dist/es2019/i18n/en_ZZ.js +1 -1
- package/dist/es2019/messages/paste-options-toolbar.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/extensibility/Extension/Extension/index.js +14 -6
- package/dist/esm/extensibility/Extension/InlineExtension/index.js +7 -4
- package/dist/esm/extensibility/Extension/Lozenge.js +42 -49
- package/dist/esm/extensibility/Extension/LozengeComponent.js +48 -0
- package/dist/esm/extensibility/Extension/styles.js +4 -3
- package/dist/esm/extensibility/ExtensionComponent.js +7 -2
- package/dist/esm/i18n/en.js +1 -1
- package/dist/esm/i18n/en_GB.js +1 -1
- package/dist/esm/i18n/en_ZZ.js +1 -1
- package/dist/esm/messages/paste-options-toolbar.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/extensibility/Extension/Extension/index.d.ts +1 -0
- package/dist/types/extensibility/Extension/InlineExtension/index.d.ts +2 -2
- package/dist/types/extensibility/Extension/Lozenge.d.ts +7 -2
- package/dist/types/extensibility/Extension/LozengeComponent.d.ts +15 -0
- package/dist/types/extensibility/Extension/styles.d.ts +1 -0
- package/dist/types-ts4.5/extensibility/Extension/Extension/index.d.ts +1 -0
- package/dist/types-ts4.5/extensibility/Extension/InlineExtension/index.d.ts +2 -2
- package/dist/types-ts4.5/extensibility/Extension/Lozenge.d.ts +7 -2
- package/dist/types-ts4.5/extensibility/Extension/LozengeComponent.d.ts +15 -0
- package/dist/types-ts4.5/extensibility/Extension/styles.d.ts +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import EditorFileIcon from '@atlaskit/icon/glyph/editor/file';
|
|
4
|
+
import { SimpleTag as Tag } from '@atlaskit/tag';
|
|
5
|
+
import { lozengeWrapper, placeholderFallback, placeholderFallbackParams } from './styles';
|
|
6
|
+
export const ICON_SIZE = 24;
|
|
7
|
+
const capitalizeFirstLetter = str => {
|
|
8
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
9
|
+
};
|
|
10
|
+
export const LozengeComponent = ({
|
|
11
|
+
lozengeData,
|
|
12
|
+
isBlockExtension,
|
|
13
|
+
title,
|
|
14
|
+
params,
|
|
15
|
+
renderImage,
|
|
16
|
+
isNodeSelected,
|
|
17
|
+
showMacroInteractionDesignUpdates
|
|
18
|
+
}) => {
|
|
19
|
+
const capitalizedTitle = capitalizeFirstLetter(title);
|
|
20
|
+
// TODO: only show on lozenge on hover: https://product-fabric.atlassian.net/browse/PGXT-4945
|
|
21
|
+
if (showMacroInteractionDesignUpdates) {
|
|
22
|
+
return jsx("div", {
|
|
23
|
+
className: "extension-title",
|
|
24
|
+
css: lozengeWrapper,
|
|
25
|
+
"data-testid": "new-lozenge"
|
|
26
|
+
}, jsx(Tag, {
|
|
27
|
+
text: capitalizedTitle,
|
|
28
|
+
color: isNodeSelected ? 'blueLight' : 'greyLight'
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
return jsx("div", {
|
|
32
|
+
"data-testid": "lozenge-fallback",
|
|
33
|
+
css: placeholderFallback
|
|
34
|
+
}, lozengeData && !isBlockExtension ? renderImage({
|
|
35
|
+
height: ICON_SIZE,
|
|
36
|
+
width: ICON_SIZE,
|
|
37
|
+
...lozengeData
|
|
38
|
+
}) : jsx(EditorFileIcon, {
|
|
39
|
+
label: title
|
|
40
|
+
}), jsx("span", {
|
|
41
|
+
className: "extension-title"
|
|
42
|
+
}, capitalizedTitle), params && !isBlockExtension && jsx("span", {
|
|
43
|
+
css: placeholderFallbackParams
|
|
44
|
+
}, Object.keys(params).map(key => key && ` | ${key} = ${params[key].value}`)));
|
|
45
|
+
};
|
|
@@ -40,6 +40,7 @@ export const placeholderFallback = css`
|
|
|
40
40
|
& > img {
|
|
41
41
|
margin: 0 ${"var(--ds-space-050, 4px)"};
|
|
42
42
|
}
|
|
43
|
+
|
|
43
44
|
/* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */
|
|
44
45
|
/* stylelint-disable-next-line */
|
|
45
46
|
label: placeholder-fallback;
|
|
@@ -59,4 +60,10 @@ export const styledImage = css`
|
|
|
59
60
|
/* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */
|
|
60
61
|
/* stylelint-disable-next-line */
|
|
61
62
|
label: lozenge-image;
|
|
63
|
+
`;
|
|
64
|
+
export const lozengeWrapper = css`
|
|
65
|
+
display: flex;
|
|
66
|
+
justify-content: left;
|
|
67
|
+
width: 100%;
|
|
68
|
+
margin-left: ${"var(--ds-space-050, 4px)"};
|
|
62
69
|
`;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React, { Component } from 'react';
|
|
3
3
|
import memoizeOne from 'memoize-one';
|
|
4
|
+
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
5
|
import { getExtensionModuleNodePrivateProps, getNodeRenderer } from '../extensions';
|
|
5
6
|
import { getExtensionRenderer } from '../utils';
|
|
6
7
|
import Extension from './Extension/Extension';
|
|
@@ -148,6 +149,10 @@ export class ExtensionComponent extends Component {
|
|
|
148
149
|
eventDispatcher,
|
|
149
150
|
showMacroInteractionDesignUpdates
|
|
150
151
|
} = this.props;
|
|
152
|
+
const {
|
|
153
|
+
selection
|
|
154
|
+
} = editorView.state;
|
|
155
|
+
const selectedNode = selection instanceof NodeSelection && selection.node;
|
|
151
156
|
if (node.type.name === 'multiBodiedExtension') {
|
|
152
157
|
return /*#__PURE__*/React.createElement(MultiBodiedExtension, {
|
|
153
158
|
node: node,
|
|
@@ -175,12 +180,14 @@ export class ExtensionComponent extends Component {
|
|
|
175
180
|
editorAppearance: editorAppearance,
|
|
176
181
|
hideFrame: (_this$state$_privateP = this.state._privateProps) === null || _this$state$_privateP === void 0 ? void 0 : _this$state$_privateP.__hideFrame,
|
|
177
182
|
pluginInjectionApi: pluginInjectionApi,
|
|
178
|
-
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
183
|
+
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
184
|
+
isNodeSelected: selectedNode === node
|
|
179
185
|
}, extensionHandlerResult);
|
|
180
186
|
case 'inlineExtension':
|
|
181
187
|
return /*#__PURE__*/React.createElement(InlineExtension, {
|
|
182
188
|
node: node,
|
|
183
|
-
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
189
|
+
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
190
|
+
isNodeSelected: selectedNode === node
|
|
184
191
|
}, extensionHandlerResult);
|
|
185
192
|
default:
|
|
186
193
|
return null;
|
package/dist/es2019/i18n/en.js
CHANGED
|
@@ -301,7 +301,7 @@ export default {
|
|
|
301
301
|
'fabric.editor.pageActionsLabel': 'Page actions',
|
|
302
302
|
'fabric.editor.panel.backgroundColor': 'Background color',
|
|
303
303
|
'fabric.editor.panel.emoji': 'Add emoji',
|
|
304
|
-
'fabric.editor.pasteOptions': 'Paste options
|
|
304
|
+
'fabric.editor.pasteOptions': 'Paste options',
|
|
305
305
|
'fabric.editor.pastePlainText': 'Paste plain text',
|
|
306
306
|
'fabric.editor.placeholderAltText': 'Describe this image with alt text',
|
|
307
307
|
'fabric.editor.placeholderText': 'Placeholder text',
|
|
@@ -301,7 +301,7 @@ export default {
|
|
|
301
301
|
'fabric.editor.pageActionsLabel': 'Page actions',
|
|
302
302
|
'fabric.editor.panel.backgroundColor': 'Background colour',
|
|
303
303
|
'fabric.editor.panel.emoji': 'Add emoji',
|
|
304
|
-
'fabric.editor.pasteOptions': 'Paste options
|
|
304
|
+
'fabric.editor.pasteOptions': 'Paste options',
|
|
305
305
|
'fabric.editor.pastePlainText': 'Paste plain text',
|
|
306
306
|
'fabric.editor.placeholderAltText': 'Describe this image with alt text',
|
|
307
307
|
'fabric.editor.placeholderText': 'Placeholder text',
|
|
@@ -301,7 +301,7 @@ export default {
|
|
|
301
301
|
'fabric.editor.pageActionsLabel': 'Page actions',
|
|
302
302
|
'fabric.editor.panel.backgroundColor': 'Background color',
|
|
303
303
|
'fabric.editor.panel.emoji': 'Add emoji',
|
|
304
|
-
'fabric.editor.pasteOptions': '
|
|
304
|
+
'fabric.editor.pasteOptions': 'Paste options',
|
|
305
305
|
'fabric.editor.pastePlainText': 'Paste plain text',
|
|
306
306
|
'fabric.editor.placeholderAltText': 'Describe this image with alt text',
|
|
307
307
|
'fabric.editor.placeholderText': 'Placeholder text',
|
|
@@ -2,7 +2,7 @@ import { defineMessages } from 'react-intl-next';
|
|
|
2
2
|
export const pasteOptionsToolbarMessages = defineMessages({
|
|
3
3
|
pasteOptions: {
|
|
4
4
|
id: 'fabric.editor.pasteOptions',
|
|
5
|
-
defaultMessage: 'Paste options
|
|
5
|
+
defaultMessage: 'Paste options',
|
|
6
6
|
description: 'Opens a menu with additional paste options'
|
|
7
7
|
},
|
|
8
8
|
plainText: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
2
2
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
3
|
-
const packageVersion = "78.
|
|
3
|
+
const packageVersion = "78.9.0";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
7
7
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
8
8
|
import Layer from '../Layer';
|
|
9
9
|
const packageName = "@atlaskit/editor-common";
|
|
10
|
-
const packageVersion = "78.
|
|
10
|
+
const packageVersion = "78.9.0";
|
|
11
11
|
const halfFocusRing = 1;
|
|
12
12
|
const dropOffset = '0, 8';
|
|
13
13
|
class DropList extends Component {
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
/** @jsx jsx */
|
|
8
8
|
|
|
9
|
-
import React from 'react';
|
|
9
|
+
import React, { Fragment } from 'react';
|
|
10
10
|
import { jsx } from '@emotion/react';
|
|
11
11
|
import classnames from 'classnames';
|
|
12
12
|
import { WithPluginState } from '../../..//with-plugin-state';
|
|
@@ -27,11 +27,13 @@ function ExtensionWithPluginState(props) {
|
|
|
27
27
|
handleRef = props.handleRef,
|
|
28
28
|
shadowClassNames = props.shadowClassNames,
|
|
29
29
|
hideFrame = props.hideFrame,
|
|
30
|
-
editorAppearance = props.editorAppearance
|
|
30
|
+
editorAppearance = props.editorAppearance,
|
|
31
|
+
showMacroInteractionDesignUpdates = props.showMacroInteractionDesignUpdates,
|
|
32
|
+
isNodeSelected = props.isNodeSelected;
|
|
31
33
|
var hasBody = ['bodiedExtension', 'multiBodiedExtension'].includes(node.type.name);
|
|
32
34
|
var isMobile = editorAppearance === 'mobile';
|
|
33
35
|
var hasChildren = !!children;
|
|
34
|
-
var removeBorder = hideFrame && !isMobile && !hasBody
|
|
36
|
+
var removeBorder = showMacroInteractionDesignUpdates || !!(hideFrame && !isMobile && !hasBody);
|
|
35
37
|
var getPos = props.getPos,
|
|
36
38
|
view = props.view;
|
|
37
39
|
var isTopLevelNode = React.useMemo(function () {
|
|
@@ -70,7 +72,11 @@ function ExtensionWithPluginState(props) {
|
|
|
70
72
|
customContainerStyles = breakoutStyles;
|
|
71
73
|
}
|
|
72
74
|
newContentStyles = _objectSpread(_objectSpread({}, newContentStyles), contentWrapper);
|
|
73
|
-
return jsx(
|
|
75
|
+
return jsx(Fragment, null, showMacroInteractionDesignUpdates && jsx(ExtensionLozenge, {
|
|
76
|
+
isNodeSelected: isNodeSelected,
|
|
77
|
+
node: node,
|
|
78
|
+
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
79
|
+
}), jsx("div", {
|
|
74
80
|
ref: handleRef,
|
|
75
81
|
"data-layout": node.attrs.layout,
|
|
76
82
|
className: classNames,
|
|
@@ -86,14 +92,16 @@ function ExtensionWithPluginState(props) {
|
|
|
86
92
|
contentEditable: false,
|
|
87
93
|
className: headerClassNames
|
|
88
94
|
}, !removeBorder && jsx(ExtensionLozenge, {
|
|
89
|
-
|
|
95
|
+
isNodeSelected: isNodeSelected,
|
|
96
|
+
node: node,
|
|
97
|
+
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
90
98
|
}), children), hasBody && jsx("div", {
|
|
91
99
|
css: newContentStyles
|
|
92
100
|
}, jsx("div", {
|
|
93
101
|
css: content,
|
|
94
102
|
ref: handleContentDOMRef,
|
|
95
103
|
className: "extension-content block"
|
|
96
|
-
}))));
|
|
104
|
+
})))));
|
|
97
105
|
}
|
|
98
106
|
var Extension = function Extension(props) {
|
|
99
107
|
// TODO: ED-17836 This code is here because confluence injects
|
|
@@ -6,8 +6,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
6
6
|
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); }; }
|
|
7
7
|
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; } }
|
|
8
8
|
/** @jsx jsx */
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import { Component } from 'react';
|
|
9
|
+
import React, { Component } from 'react';
|
|
11
10
|
import { jsx } from '@emotion/react';
|
|
12
11
|
import ExtensionLozenge from '../Lozenge';
|
|
13
12
|
import { overlay } from '../styles';
|
|
@@ -24,7 +23,9 @@ var InlineExtension = /*#__PURE__*/function (_Component) {
|
|
|
24
23
|
value: function render() {
|
|
25
24
|
var _this$props = this.props,
|
|
26
25
|
node = _this$props.node,
|
|
27
|
-
children = _this$props.children
|
|
26
|
+
children = _this$props.children,
|
|
27
|
+
showMacroInteractionDesignUpdates = _this$props.showMacroInteractionDesignUpdates,
|
|
28
|
+
isNodeSelected = _this$props.isNodeSelected;
|
|
28
29
|
var hasChildren = !!children;
|
|
29
30
|
var className = hasChildren ? 'with-overlay with-children' : 'with-overlay';
|
|
30
31
|
return jsx("div", {
|
|
@@ -34,7 +35,9 @@ var InlineExtension = /*#__PURE__*/function (_Component) {
|
|
|
34
35
|
css: overlay,
|
|
35
36
|
className: "extension-overlay"
|
|
36
37
|
}), children ? children : jsx(ExtensionLozenge, {
|
|
37
|
-
node: node
|
|
38
|
+
node: node,
|
|
39
|
+
isNodeSelected: isNodeSelected,
|
|
40
|
+
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
38
41
|
}));
|
|
39
42
|
}
|
|
40
43
|
}]);
|
|
@@ -1,32 +1,64 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
5
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
+
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
6
6
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
10
|
var _excluded = ["url"];
|
|
10
|
-
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; }
|
|
11
|
-
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; }
|
|
12
11
|
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); }; }
|
|
13
12
|
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; } }
|
|
14
13
|
/** @jsx jsx */
|
|
15
14
|
import { Component } from 'react';
|
|
16
15
|
import { jsx } from '@emotion/react';
|
|
17
|
-
import EditorFileIcon from '@atlaskit/icon/glyph/editor/file';
|
|
18
16
|
import { getExtensionLozengeData } from '../../utils';
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
22
|
-
};
|
|
23
|
-
export var ICON_SIZE = 24;
|
|
17
|
+
import { LozengeComponent } from './LozengeComponent';
|
|
18
|
+
import { styledImage } from './styles';
|
|
24
19
|
var ExtensionLozenge = /*#__PURE__*/function (_Component) {
|
|
25
20
|
_inherits(ExtensionLozenge, _Component);
|
|
26
21
|
var _super = _createSuper(ExtensionLozenge);
|
|
27
22
|
function ExtensionLozenge() {
|
|
23
|
+
var _this;
|
|
28
24
|
_classCallCheck(this, ExtensionLozenge);
|
|
29
|
-
|
|
25
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26
|
+
args[_key] = arguments[_key];
|
|
27
|
+
}
|
|
28
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
29
|
+
_defineProperty(_assertThisInitialized(_this), "renderImage", function (lozengeData) {
|
|
30
|
+
var extensionKey = _this.props.node.attrs.extensionKey;
|
|
31
|
+
var url = lozengeData.url,
|
|
32
|
+
rest = _objectWithoutProperties(lozengeData, _excluded);
|
|
33
|
+
return jsx("img", _extends({
|
|
34
|
+
css: styledImage,
|
|
35
|
+
src: url
|
|
36
|
+
}, rest, {
|
|
37
|
+
alt: extensionKey
|
|
38
|
+
}));
|
|
39
|
+
});
|
|
40
|
+
_defineProperty(_assertThisInitialized(_this), "renderFallback", function (lozengeData) {
|
|
41
|
+
var _this$props = _this.props,
|
|
42
|
+
showMacroInteractionDesignUpdates = _this$props.showMacroInteractionDesignUpdates,
|
|
43
|
+
isNodeSelected = _this$props.isNodeSelected;
|
|
44
|
+
var _this$props$node$attr = _this.props.node.attrs,
|
|
45
|
+
parameters = _this$props$node$attr.parameters,
|
|
46
|
+
extensionKey = _this$props$node$attr.extensionKey;
|
|
47
|
+
var name = _this.props.node.type.name;
|
|
48
|
+
var params = parameters && parameters.macroParams;
|
|
49
|
+
var title = parameters && parameters.extensionTitle || parameters && parameters.macroMetadata && parameters.macroMetadata.title || extensionKey;
|
|
50
|
+
var isBlockExtension = name === 'extension';
|
|
51
|
+
return jsx(LozengeComponent, {
|
|
52
|
+
isNodeSelected: isNodeSelected,
|
|
53
|
+
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
54
|
+
isBlockExtension: isBlockExtension,
|
|
55
|
+
lozengeData: lozengeData,
|
|
56
|
+
params: params,
|
|
57
|
+
title: title,
|
|
58
|
+
renderImage: _this.renderImage
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
return _this;
|
|
30
62
|
}
|
|
31
63
|
_createClass(ExtensionLozenge, [{
|
|
32
64
|
key: "render",
|
|
@@ -45,45 +77,6 @@ var ExtensionLozenge = /*#__PURE__*/function (_Component) {
|
|
|
45
77
|
});
|
|
46
78
|
return this.renderFallback(iconData);
|
|
47
79
|
}
|
|
48
|
-
}, {
|
|
49
|
-
key: "renderImage",
|
|
50
|
-
value: function renderImage(lozengeData) {
|
|
51
|
-
var extensionKey = this.props.node.attrs.extensionKey;
|
|
52
|
-
var url = lozengeData.url,
|
|
53
|
-
rest = _objectWithoutProperties(lozengeData, _excluded);
|
|
54
|
-
return jsx("img", _extends({
|
|
55
|
-
css: styledImage,
|
|
56
|
-
src: url
|
|
57
|
-
}, rest, {
|
|
58
|
-
alt: extensionKey
|
|
59
|
-
}));
|
|
60
|
-
}
|
|
61
|
-
}, {
|
|
62
|
-
key: "renderFallback",
|
|
63
|
-
value: function renderFallback(lozengeData) {
|
|
64
|
-
var _this$props$node$attr = this.props.node.attrs,
|
|
65
|
-
parameters = _this$props$node$attr.parameters,
|
|
66
|
-
extensionKey = _this$props$node$attr.extensionKey;
|
|
67
|
-
var name = this.props.node.type.name;
|
|
68
|
-
var params = parameters && parameters.macroParams;
|
|
69
|
-
var title = parameters && parameters.extensionTitle || parameters && parameters.macroMetadata && parameters.macroMetadata.title || extensionKey;
|
|
70
|
-
var isBlockExtension = name === 'extension';
|
|
71
|
-
return jsx("div", {
|
|
72
|
-
"data-testid": "lozenge-fallback",
|
|
73
|
-
css: placeholderFallback
|
|
74
|
-
}, lozengeData && !isBlockExtension ? this.renderImage(_objectSpread({
|
|
75
|
-
height: ICON_SIZE,
|
|
76
|
-
width: ICON_SIZE
|
|
77
|
-
}, lozengeData)) : jsx(EditorFileIcon, {
|
|
78
|
-
label: title
|
|
79
|
-
}), jsx("span", {
|
|
80
|
-
className: "extension-title"
|
|
81
|
-
}, capitalizeFirstLetter(title)), params && !isBlockExtension && jsx("span", {
|
|
82
|
-
css: placeholderFallbackParams
|
|
83
|
-
}, Object.keys(params).map(function (key) {
|
|
84
|
-
return key && " | ".concat(key, " = ").concat(params[key].value);
|
|
85
|
-
})));
|
|
86
|
-
}
|
|
87
80
|
}]);
|
|
88
81
|
return ExtensionLozenge;
|
|
89
82
|
}(Component);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
/** @jsx jsx */
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
6
|
+
import EditorFileIcon from '@atlaskit/icon/glyph/editor/file';
|
|
7
|
+
import { SimpleTag as Tag } from '@atlaskit/tag';
|
|
8
|
+
import { lozengeWrapper, placeholderFallback, placeholderFallbackParams } from './styles';
|
|
9
|
+
export var ICON_SIZE = 24;
|
|
10
|
+
var capitalizeFirstLetter = function capitalizeFirstLetter(str) {
|
|
11
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
12
|
+
};
|
|
13
|
+
export var LozengeComponent = function LozengeComponent(_ref) {
|
|
14
|
+
var lozengeData = _ref.lozengeData,
|
|
15
|
+
isBlockExtension = _ref.isBlockExtension,
|
|
16
|
+
title = _ref.title,
|
|
17
|
+
params = _ref.params,
|
|
18
|
+
renderImage = _ref.renderImage,
|
|
19
|
+
isNodeSelected = _ref.isNodeSelected,
|
|
20
|
+
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates;
|
|
21
|
+
var capitalizedTitle = capitalizeFirstLetter(title);
|
|
22
|
+
// TODO: only show on lozenge on hover: https://product-fabric.atlassian.net/browse/PGXT-4945
|
|
23
|
+
if (showMacroInteractionDesignUpdates) {
|
|
24
|
+
return jsx("div", {
|
|
25
|
+
className: "extension-title",
|
|
26
|
+
css: lozengeWrapper,
|
|
27
|
+
"data-testid": "new-lozenge"
|
|
28
|
+
}, jsx(Tag, {
|
|
29
|
+
text: capitalizedTitle,
|
|
30
|
+
color: isNodeSelected ? 'blueLight' : 'greyLight'
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
return jsx("div", {
|
|
34
|
+
"data-testid": "lozenge-fallback",
|
|
35
|
+
css: placeholderFallback
|
|
36
|
+
}, lozengeData && !isBlockExtension ? renderImage(_objectSpread({
|
|
37
|
+
height: ICON_SIZE,
|
|
38
|
+
width: ICON_SIZE
|
|
39
|
+
}, lozengeData)) : jsx(EditorFileIcon, {
|
|
40
|
+
label: title
|
|
41
|
+
}), jsx("span", {
|
|
42
|
+
className: "extension-title"
|
|
43
|
+
}, capitalizedTitle), params && !isBlockExtension && jsx("span", {
|
|
44
|
+
css: placeholderFallbackParams
|
|
45
|
+
}, Object.keys(params).map(function (key) {
|
|
46
|
+
return key && " | ".concat(key, " = ").concat(params[key].value);
|
|
47
|
+
})));
|
|
48
|
+
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { B200, N20, N20A, N70 } from '@atlaskit/theme/colors';
|
|
5
5
|
import { BODIED_EXT_PADDING, EXTENSION_PADDING } from '../../styles';
|
|
6
6
|
export { EXTENSION_PADDING as padding, BODIED_EXT_PADDING };
|
|
7
7
|
export var wrapperDefault = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: ", ";\n position: relative;\n vertical-align: middle;\n\n .ProseMirror-selectednode > span > & > .extension-overlay {\n box-shadow: inset 0px 0px 0px 2px ", ";\n opacity: 1;\n }\n\n &.with-overlay {\n .extension-overlay {\n background: ", ";\n color: transparent;\n }\n\n &:hover .extension-overlay {\n opacity: 1;\n }\n }\n"])), "var(--ds-background-neutral, ".concat(N20, ")"), "var(--ds-border-radius, 3px)", "var(--ds-border-selected, ".concat(B200, ")"), "var(--ds-background-neutral-hovered, ".concat(N20A, ")"));
|
|
8
8
|
export var overlay = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border-radius: ", ";\n position: absolute;\n width: 100%;\n height: 100%;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.3s;\n"])), "var(--ds-border-radius, 3px)");
|
|
9
|
-
export var placeholderFallback = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n\n & > img {\n margin: 0 ", ";\n }\n /* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */\n /* stylelint-disable-next-line */\n label: placeholder-fallback;\n"])), "var(--ds-space-050, 4px)");
|
|
9
|
+
export var placeholderFallback = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n\n & > img {\n margin: 0 ", ";\n }\n\n /* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */\n /* stylelint-disable-next-line */\n label: placeholder-fallback;\n"])), "var(--ds-space-050, 4px)");
|
|
10
10
|
export var placeholderFallbackParams = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: inline-block;\n max-width: 200px;\n margin-left: 5px;\n color: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n"])), "var(--ds-text-subtlest, ".concat(N70, ")"));
|
|
11
|
-
export var styledImage = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n max-height: 16px;\n max-width: 16px;\n /* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */\n /* stylelint-disable-next-line */\n label: lozenge-image;\n"])));
|
|
11
|
+
export var styledImage = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n max-height: 16px;\n max-width: 16px;\n /* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */\n /* stylelint-disable-next-line */\n label: lozenge-image;\n"])));
|
|
12
|
+
export var lozengeWrapper = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: left;\n width: 100%;\n margin-left: ", ";\n"])), "var(--ds-space-050, 4px)");
|
|
@@ -11,6 +11,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
11
11
|
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; } }
|
|
12
12
|
import React, { Component } from 'react';
|
|
13
13
|
import memoizeOne from 'memoize-one';
|
|
14
|
+
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
14
15
|
import { getExtensionModuleNodePrivateProps, getNodeRenderer } from '../extensions';
|
|
15
16
|
import { getExtensionRenderer } from '../utils';
|
|
16
17
|
import Extension from './Extension/Extension';
|
|
@@ -185,6 +186,8 @@ export var ExtensionComponent = /*#__PURE__*/function (_Component) {
|
|
|
185
186
|
getPos = _this$props2.getPos,
|
|
186
187
|
eventDispatcher = _this$props2.eventDispatcher,
|
|
187
188
|
showMacroInteractionDesignUpdates = _this$props2.showMacroInteractionDesignUpdates;
|
|
189
|
+
var selection = editorView.state.selection;
|
|
190
|
+
var selectedNode = selection instanceof NodeSelection && selection.node;
|
|
188
191
|
if (node.type.name === 'multiBodiedExtension') {
|
|
189
192
|
return /*#__PURE__*/React.createElement(MultiBodiedExtension, {
|
|
190
193
|
node: node,
|
|
@@ -212,12 +215,14 @@ export var ExtensionComponent = /*#__PURE__*/function (_Component) {
|
|
|
212
215
|
editorAppearance: editorAppearance,
|
|
213
216
|
hideFrame: (_this$state$_privateP = this.state._privateProps) === null || _this$state$_privateP === void 0 ? void 0 : _this$state$_privateP.__hideFrame,
|
|
214
217
|
pluginInjectionApi: pluginInjectionApi,
|
|
215
|
-
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
218
|
+
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
219
|
+
isNodeSelected: selectedNode === node
|
|
216
220
|
}, extensionHandlerResult);
|
|
217
221
|
case 'inlineExtension':
|
|
218
222
|
return /*#__PURE__*/React.createElement(InlineExtension, {
|
|
219
223
|
node: node,
|
|
220
|
-
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
224
|
+
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
225
|
+
isNodeSelected: selectedNode === node
|
|
221
226
|
}, extensionHandlerResult);
|
|
222
227
|
default:
|
|
223
228
|
return null;
|
package/dist/esm/i18n/en.js
CHANGED
|
@@ -301,7 +301,7 @@ export default {
|
|
|
301
301
|
'fabric.editor.pageActionsLabel': 'Page actions',
|
|
302
302
|
'fabric.editor.panel.backgroundColor': 'Background color',
|
|
303
303
|
'fabric.editor.panel.emoji': 'Add emoji',
|
|
304
|
-
'fabric.editor.pasteOptions': 'Paste options
|
|
304
|
+
'fabric.editor.pasteOptions': 'Paste options',
|
|
305
305
|
'fabric.editor.pastePlainText': 'Paste plain text',
|
|
306
306
|
'fabric.editor.placeholderAltText': 'Describe this image with alt text',
|
|
307
307
|
'fabric.editor.placeholderText': 'Placeholder text',
|
package/dist/esm/i18n/en_GB.js
CHANGED
|
@@ -301,7 +301,7 @@ export default {
|
|
|
301
301
|
'fabric.editor.pageActionsLabel': 'Page actions',
|
|
302
302
|
'fabric.editor.panel.backgroundColor': 'Background colour',
|
|
303
303
|
'fabric.editor.panel.emoji': 'Add emoji',
|
|
304
|
-
'fabric.editor.pasteOptions': 'Paste options
|
|
304
|
+
'fabric.editor.pasteOptions': 'Paste options',
|
|
305
305
|
'fabric.editor.pastePlainText': 'Paste plain text',
|
|
306
306
|
'fabric.editor.placeholderAltText': 'Describe this image with alt text',
|
|
307
307
|
'fabric.editor.placeholderText': 'Placeholder text',
|
package/dist/esm/i18n/en_ZZ.js
CHANGED
|
@@ -301,7 +301,7 @@ export default {
|
|
|
301
301
|
'fabric.editor.pageActionsLabel': 'Page actions',
|
|
302
302
|
'fabric.editor.panel.backgroundColor': 'Background color',
|
|
303
303
|
'fabric.editor.panel.emoji': 'Add emoji',
|
|
304
|
-
'fabric.editor.pasteOptions': '
|
|
304
|
+
'fabric.editor.pasteOptions': 'Paste options',
|
|
305
305
|
'fabric.editor.pastePlainText': 'Paste plain text',
|
|
306
306
|
'fabric.editor.placeholderAltText': 'Describe this image with alt text',
|
|
307
307
|
'fabric.editor.placeholderText': 'Placeholder text',
|
|
@@ -2,7 +2,7 @@ import { defineMessages } from 'react-intl-next';
|
|
|
2
2
|
export var pasteOptionsToolbarMessages = defineMessages({
|
|
3
3
|
pasteOptions: {
|
|
4
4
|
id: 'fabric.editor.pasteOptions',
|
|
5
|
-
defaultMessage: 'Paste options
|
|
5
|
+
defaultMessage: 'Paste options',
|
|
6
6
|
description: 'Opens a menu with additional paste options'
|
|
7
7
|
},
|
|
8
8
|
plainText: {
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "78.
|
|
9
|
+
var packageVersion = "78.9.0";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -17,7 +17,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
17
17
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
18
18
|
import Layer from '../Layer';
|
|
19
19
|
var packageName = "@atlaskit/editor-common";
|
|
20
|
-
var packageVersion = "78.
|
|
20
|
+
var packageVersion = "78.9.0";
|
|
21
21
|
var halfFocusRing = 1;
|
|
22
22
|
var dropOffset = '0, 8';
|
|
23
23
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Component } from 'react';
|
|
2
|
+
import React, { Component } from 'react';
|
|
4
3
|
import { jsx } from '@emotion/react';
|
|
5
4
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
5
|
export interface Props {
|
|
7
6
|
node: PmNode;
|
|
8
7
|
children?: React.ReactNode;
|
|
9
8
|
showMacroInteractionDesignUpdates?: boolean;
|
|
9
|
+
isNodeSelected?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export default class InlineExtension extends Component<Props, any> {
|
|
12
12
|
render(): jsx.JSX.Element;
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
export declare const capitalizeFirstLetter: (str: string) => string;
|
|
6
5
|
export interface Props {
|
|
7
6
|
node: PmNode;
|
|
7
|
+
showMacroInteractionDesignUpdates?: boolean;
|
|
8
|
+
isNodeSelected?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface LozengeData {
|
|
11
|
+
url: string;
|
|
12
|
+
height?: number;
|
|
13
|
+
width?: number;
|
|
8
14
|
}
|
|
9
|
-
export declare const ICON_SIZE = 24;
|
|
10
15
|
export default class ExtensionLozenge extends Component<Props, any> {
|
|
11
16
|
render(): jsx.JSX.Element;
|
|
12
17
|
private renderImage;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import type { LozengeData } from './Lozenge';
|
|
4
|
+
export declare const ICON_SIZE = 24;
|
|
5
|
+
type LozengeComponentProps = {
|
|
6
|
+
lozengeData?: LozengeData;
|
|
7
|
+
isBlockExtension: boolean;
|
|
8
|
+
title: string;
|
|
9
|
+
params: any;
|
|
10
|
+
renderImage: (lozengeData: LozengeData) => void;
|
|
11
|
+
isNodeSelected?: boolean;
|
|
12
|
+
showMacroInteractionDesignUpdates?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const LozengeComponent: ({ lozengeData, isBlockExtension, title, params, renderImage, isNodeSelected, showMacroInteractionDesignUpdates, }: LozengeComponentProps) => jsx.JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -5,3 +5,4 @@ export declare const overlay: import("@emotion/react").SerializedStyles;
|
|
|
5
5
|
export declare const placeholderFallback: import("@emotion/react").SerializedStyles;
|
|
6
6
|
export declare const placeholderFallbackParams: import("@emotion/react").SerializedStyles;
|
|
7
7
|
export declare const styledImage: import("@emotion/react").SerializedStyles;
|
|
8
|
+
export declare const lozengeWrapper: import("@emotion/react").SerializedStyles;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Component } from 'react';
|
|
2
|
+
import React, { Component } from 'react';
|
|
4
3
|
import { jsx } from '@emotion/react';
|
|
5
4
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
5
|
export interface Props {
|
|
7
6
|
node: PmNode;
|
|
8
7
|
children?: React.ReactNode;
|
|
9
8
|
showMacroInteractionDesignUpdates?: boolean;
|
|
9
|
+
isNodeSelected?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export default class InlineExtension extends Component<Props, any> {
|
|
12
12
|
render(): jsx.JSX.Element;
|