@atlaskit/renderer 109.0.4 → 109.1.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 +18 -0
- package/dist/cjs/react/marks/border.js +21 -0
- package/dist/cjs/react/marks/index.js +8 -0
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +1 -2
- package/dist/cjs/react/nodes/mediaInline.js +20 -5
- package/dist/cjs/react/nodes/panel.js +2 -6
- package/dist/cjs/ui/Expand.js +6 -12
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/Renderer/style.js +1 -1
- package/dist/cjs/ui/annotations/draft/component.js +2 -2
- package/dist/cjs/ui/annotations/element/mark.js +2 -6
- package/dist/es2019/react/marks/border.js +14 -0
- package/dist/es2019/react/marks/index.js +3 -1
- package/dist/es2019/react/nodes/codeBlock/components/lightWeightCodeBlock.js +2 -3
- package/dist/es2019/react/nodes/mediaInline.js +18 -5
- package/dist/es2019/react/nodes/panel.js +2 -6
- package/dist/es2019/ui/Expand.js +6 -12
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/Renderer/style.js +2 -2
- package/dist/es2019/ui/annotations/draft/component.js +3 -2
- package/dist/es2019/ui/annotations/element/mark.js +4 -7
- package/dist/esm/react/marks/border.js +14 -0
- package/dist/esm/react/marks/index.js +3 -1
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +2 -3
- package/dist/esm/react/nodes/mediaInline.js +20 -5
- package/dist/esm/react/nodes/panel.js +2 -6
- package/dist/esm/ui/Expand.js +6 -12
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/Renderer/style.js +1 -1
- package/dist/esm/ui/annotations/draft/component.js +3 -2
- package/dist/esm/ui/annotations/element/mark.js +3 -6
- package/dist/types/react/marks/border.d.ts +5 -0
- package/dist/types/react/marks/index.d.ts +4 -3
- package/dist/types/react/nodes/mediaInline.d.ts +2 -0
- package/dist/types/react/nodes/panel.d.ts +1 -1
- package/dist/types/ui/Expand.d.ts +3 -3
- package/dist/types/ui/annotations/draft/component.d.ts +4 -2
- package/dist/types/ui/annotations/element/mark.d.ts +2 -2
- package/dist/types-ts4.5/react/marks/border.d.ts +5 -0
- package/dist/types-ts4.5/react/marks/index.d.ts +4 -3
- package/dist/types-ts4.5/react/nodes/mediaInline.d.ts +2 -0
- package/dist/types-ts4.5/react/nodes/panel.d.ts +1 -1
- package/dist/types-ts4.5/ui/Expand.d.ts +3 -3
- package/dist/types-ts4.5/ui/annotations/draft/component.d.ts +4 -2
- package/dist/types-ts4.5/ui/annotations/element/mark.d.ts +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 109.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#61685](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61685) [`ac1ec9ea4cd3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ac1ec9ea4cd3) - [ux] Add border mark support to mediaInline in Editor/Renderer
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 109.0.5
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#61676](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61676) [`0d892d819bab`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0d892d819bab) - [ux] Updated tests and mediaInline node to mock inline files correctly
|
|
18
|
+
- [#62545](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/62545) [`85392e5f9be9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/85392e5f9be9) - Remove legacy theming logic from the @atlaskit/editor-common package. Theming is still available via @atlaskit/tokens.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 109.0.4
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = Border;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _editorPalette = require("@atlaskit/editor-palette");
|
|
9
|
+
/** @jsx jsx */
|
|
10
|
+
|
|
11
|
+
function Border(props) {
|
|
12
|
+
var _props$color, _props$size;
|
|
13
|
+
var borderColor = (_props$color = props.color) !== null && _props$color !== void 0 ? _props$color : '';
|
|
14
|
+
var borderSize = (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : 0;
|
|
15
|
+
var paletteColorValue = (0, _editorPalette.hexToEditorBorderPaletteColor)(borderColor) || borderColor;
|
|
16
|
+
return (0, _react.jsx)("span", {
|
|
17
|
+
"data-color": paletteColorValue,
|
|
18
|
+
"data-size": borderSize,
|
|
19
|
+
"data-mark-type": "border"
|
|
20
|
+
}, props.children);
|
|
21
|
+
}
|
|
@@ -11,6 +11,12 @@ Object.defineProperty(exports, "Annotation", {
|
|
|
11
11
|
return _annotation.default;
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
+
Object.defineProperty(exports, "Border", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function get() {
|
|
17
|
+
return _border.default;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
14
20
|
Object.defineProperty(exports, "Breakout", {
|
|
15
21
|
enumerable: true,
|
|
16
22
|
get: function get() {
|
|
@@ -112,6 +118,7 @@ var _unsupportedNodeAttribute = _interopRequireDefault(require("./unsupportedNod
|
|
|
112
118
|
var _dataConsumer = _interopRequireDefault(require("./data-consumer"));
|
|
113
119
|
var _fragment = _interopRequireDefault(require("./fragment"));
|
|
114
120
|
var _annotation = _interopRequireWildcard(require("./annotation"));
|
|
121
|
+
var _border = _interopRequireDefault(require("./border"));
|
|
115
122
|
var _confluenceInlineComment = _interopRequireDefault(require("./confluence-inline-comment"));
|
|
116
123
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
117
124
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -127,6 +134,7 @@ var markToReact = exports.markToReact = {
|
|
|
127
134
|
textColor: _textColor.default,
|
|
128
135
|
underline: _underline.default,
|
|
129
136
|
annotation: _annotation.default,
|
|
137
|
+
border: _border.default,
|
|
130
138
|
// Stage0
|
|
131
139
|
confluenceInlineComment: _confluenceInlineComment.default,
|
|
132
140
|
breakout: _breakout.default,
|
|
@@ -35,7 +35,6 @@ var LightWeightCodeBlock = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
|
|
|
35
35
|
_ref$codeBidiWarningT = _ref.codeBidiWarningTooltipEnabled,
|
|
36
36
|
codeBidiWarningTooltipEnabled = _ref$codeBidiWarningT === void 0 ? true : _ref$codeBidiWarningT,
|
|
37
37
|
className = _ref.className;
|
|
38
|
-
var theme = (0, _react2.useTheme)();
|
|
39
38
|
var textRows = (0, _react.useMemo)(function () {
|
|
40
39
|
return (text !== null && text !== void 0 ? text : '').split('\n');
|
|
41
40
|
}, [text]);
|
|
@@ -47,7 +46,7 @@ var LightWeightCodeBlock = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
|
|
|
47
46
|
return (0, _react2.jsx)("div", {
|
|
48
47
|
className: classNames,
|
|
49
48
|
ref: ref,
|
|
50
|
-
css: [(0, _styles.codeBlockSharedStyles)(
|
|
49
|
+
css: [(0, _styles.codeBlockSharedStyles)(), lightWeightCodeBlockStyles]
|
|
51
50
|
}, (0, _react2.jsx)("div", {
|
|
52
51
|
className: _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER
|
|
53
52
|
}, (0, _react2.jsx)("div", {
|
|
@@ -34,7 +34,9 @@ var RenderMediaInline = exports.RenderMediaInline = function RenderMediaInline(_
|
|
|
34
34
|
alt = _ref.alt,
|
|
35
35
|
width = _ref.width,
|
|
36
36
|
height = _ref.height,
|
|
37
|
-
type = _ref.type
|
|
37
|
+
type = _ref.type,
|
|
38
|
+
borderSize = _ref.borderSize,
|
|
39
|
+
borderColor = _ref.borderColor;
|
|
38
40
|
var _useState = (0, _react.useState)(),
|
|
39
41
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
40
42
|
contextIdentifierProvider = _useState2[0],
|
|
@@ -139,7 +141,11 @@ var RenderMediaInline = exports.RenderMediaInline = function RenderMediaInline(_
|
|
|
139
141
|
identifier: identifier,
|
|
140
142
|
alt: alt,
|
|
141
143
|
width: width,
|
|
142
|
-
height: height
|
|
144
|
+
height: height,
|
|
145
|
+
border: {
|
|
146
|
+
borderSize: borderSize,
|
|
147
|
+
borderColor: borderColor
|
|
148
|
+
}
|
|
143
149
|
});
|
|
144
150
|
}
|
|
145
151
|
var handleMediaInlineClick = function handleMediaInlineClick(result) {
|
|
@@ -161,7 +167,7 @@ var RenderMediaInline = exports.RenderMediaInline = function RenderMediaInline(_
|
|
|
161
167
|
fileState: fileState
|
|
162
168
|
}), {
|
|
163
169
|
"data-node-type": "mediaInline"
|
|
164
|
-
}), mediaProvider ? /*#__PURE__*/_react.default.createElement(_mediaCard.MediaInlineCard, {
|
|
170
|
+
}), mediaProvider || mediaClient ? /*#__PURE__*/_react.default.createElement(_mediaCard.MediaInlineCard, {
|
|
165
171
|
identifier: identifier,
|
|
166
172
|
onClick: handleMediaInlineClick,
|
|
167
173
|
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
@@ -175,6 +181,7 @@ var RenderMediaInline = exports.RenderMediaInline = function RenderMediaInline(_
|
|
|
175
181
|
}));
|
|
176
182
|
};
|
|
177
183
|
var MediaInline = function MediaInline(props) {
|
|
184
|
+
var _borderMark$attrs$col, _borderMark$attrs$siz;
|
|
178
185
|
var collection = props.collection,
|
|
179
186
|
id = props.id,
|
|
180
187
|
providerFactory = props.providers,
|
|
@@ -184,7 +191,8 @@ var MediaInline = function MediaInline(props) {
|
|
|
184
191
|
fileType = props.type,
|
|
185
192
|
alt = props.alt,
|
|
186
193
|
width = props.width,
|
|
187
|
-
height = props.height
|
|
194
|
+
height = props.height,
|
|
195
|
+
marks = props.marks;
|
|
188
196
|
var clipboardAttrs = {
|
|
189
197
|
id: id,
|
|
190
198
|
collection: collection
|
|
@@ -194,6 +202,11 @@ var MediaInline = function MediaInline(props) {
|
|
|
194
202
|
mediaItemType: 'file',
|
|
195
203
|
collectionName: collection
|
|
196
204
|
};
|
|
205
|
+
var borderMark = marks === null || marks === void 0 ? void 0 : marks.find(function (mark) {
|
|
206
|
+
return (mark === null || mark === void 0 ? void 0 : mark.type.name) === 'border';
|
|
207
|
+
});
|
|
208
|
+
var borderColor = (_borderMark$attrs$col = borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.color) !== null && _borderMark$attrs$col !== void 0 ? _borderMark$attrs$col : '';
|
|
209
|
+
var borderSize = (_borderMark$attrs$siz = borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.size) !== null && _borderMark$attrs$siz !== void 0 ? _borderMark$attrs$siz : 0;
|
|
197
210
|
return /*#__PURE__*/_react.default.createElement(_providerFactory.WithProviders, {
|
|
198
211
|
providers: ['mediaProvider', 'contextIdentifierProvider'],
|
|
199
212
|
providerFactory: providerFactory,
|
|
@@ -210,7 +223,9 @@ var MediaInline = function MediaInline(props) {
|
|
|
210
223
|
type: fileType,
|
|
211
224
|
alt: alt,
|
|
212
225
|
width: width,
|
|
213
|
-
height: height
|
|
226
|
+
height: height,
|
|
227
|
+
borderSize: borderSize,
|
|
228
|
+
borderColor: borderColor
|
|
214
229
|
});
|
|
215
230
|
}
|
|
216
231
|
});
|
|
@@ -28,9 +28,7 @@ var PanelStyled = function PanelStyled(_ref) {
|
|
|
28
28
|
hasIcon = _ref.hasIcon,
|
|
29
29
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
30
30
|
var styles = function styles(theme) {
|
|
31
|
-
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &.", " {\n ", "\n\n &[data-panel-type=", "] {\n ", "\n }\n }\n "])), _panel.PanelSharedCssClassName.prefix, (0, _panel.panelSharedStylesWithoutPrefix)(
|
|
32
|
-
theme: theme
|
|
33
|
-
}), _adfSchema.PanelType.CUSTOM, hasIcon ? '' : 'padding-left: 12px;');
|
|
31
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &.", " {\n ", "\n\n &[data-panel-type=", "] {\n ", "\n }\n }\n "])), _panel.PanelSharedCssClassName.prefix, (0, _panel.panelSharedStylesWithoutPrefix)(), _adfSchema.PanelType.CUSTOM, hasIcon ? '' : 'padding-left: 12px;');
|
|
34
32
|
};
|
|
35
33
|
if (props['data-panel-type'] === _adfSchema.PanelType.CUSTOM && backgroundColor) {
|
|
36
34
|
styles = function styles(theme) {
|
|
@@ -41,9 +39,7 @@ var PanelStyled = function PanelStyled(_ref) {
|
|
|
41
39
|
})({
|
|
42
40
|
theme: theme
|
|
43
41
|
});
|
|
44
|
-
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n &.", " {\n ", "\n }\n\n &[data-panel-type=", "] {\n ", ";\n ", "\n }\n "])), _panel.PanelSharedCssClassName.prefix, (0, _panel.panelSharedStylesWithoutPrefix)(
|
|
45
|
-
theme: theme
|
|
46
|
-
}), _adfSchema.PanelType.CUSTOM, customStyle, hasIcon ? '' : 'padding-left: 12px;');
|
|
42
|
+
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n &.", " {\n ", "\n }\n\n &[data-panel-type=", "] {\n ", ";\n ", "\n }\n "])), _panel.PanelSharedCssClassName.prefix, (0, _panel.panelSharedStylesWithoutPrefix)(), _adfSchema.PanelType.CUSTOM, customStyle, hasIcon ? '' : 'padding-left: 12px;');
|
|
47
43
|
};
|
|
48
44
|
}
|
|
49
45
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
package/dist/cjs/ui/Expand.js
CHANGED
|
@@ -31,10 +31,8 @@ var titleStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _ta
|
|
|
31
31
|
var Container = function Container(props) {
|
|
32
32
|
var paddingBottom = props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
|
|
33
33
|
var sharedContainerStyles = _ui.sharedExpandStyles.containerStyles(props);
|
|
34
|
-
var styles = function styles(
|
|
35
|
-
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n padding: 0;\n padding-bottom: ", ";\n "])), sharedContainerStyles(
|
|
36
|
-
theme: themeProps
|
|
37
|
-
}), paddingBottom);
|
|
34
|
+
var styles = function styles() {
|
|
35
|
+
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n padding: 0;\n padding-bottom: ", ";\n "])), sharedContainerStyles(), paddingBottom);
|
|
38
36
|
};
|
|
39
37
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
40
38
|
css: styles
|
|
@@ -42,10 +40,8 @@ var Container = function Container(props) {
|
|
|
42
40
|
};
|
|
43
41
|
var TitleContainer = function TitleContainer(props) {
|
|
44
42
|
var paddingBottom = !props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
|
|
45
|
-
var styles = function styles(
|
|
46
|
-
return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n padding: ", ";\n padding-bottom: ", ";\n "])), _ui.sharedExpandStyles.titleContainerStyles(
|
|
47
|
-
theme: themeProps
|
|
48
|
-
}), "var(--ds-space-100, 8px)", paddingBottom);
|
|
43
|
+
var styles = function styles() {
|
|
44
|
+
return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n padding: ", ";\n padding-bottom: ", ";\n "])), _ui.sharedExpandStyles.titleContainerStyles(), "var(--ds-space-100, 8px)", paddingBottom);
|
|
49
45
|
};
|
|
50
46
|
return (0, _react2.jsx)("button", (0, _extends2.default)({
|
|
51
47
|
css: styles
|
|
@@ -55,10 +51,8 @@ TitleContainer.displayName = 'TitleContainerButton';
|
|
|
55
51
|
var ContentContainer = function ContentContainer(props) {
|
|
56
52
|
var sharedContentStyles = _ui.sharedExpandStyles.contentStyles(props);
|
|
57
53
|
var visibility = props.expanded ? 'visible' : 'hidden';
|
|
58
|
-
var styles = function styles(
|
|
59
|
-
return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n padding-right: ", ";\n // TODO: Migrate away from gridSize\n // Recommendation: Replace gridSize with 8, or directly replace with 36px\n padding-left: ", "px;\n visibility: ", ";\n "])), sharedContentStyles(
|
|
60
|
-
theme: themeProps
|
|
61
|
-
}), "var(--ds-space-200, 16px)", (0, _constants.gridSize)() * 5 - (0, _constants.gridSize)() / 2, visibility);
|
|
54
|
+
var styles = function styles() {
|
|
55
|
+
return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n padding-right: ", ";\n // TODO: Migrate away from gridSize\n // Recommendation: Replace gridSize with 8, or directly replace with 36px\n padding-left: ", "px;\n visibility: ", ";\n "])), sharedContentStyles(), "var(--ds-space-200, 16px)", (0, _constants.gridSize)() * 5 - (0, _constants.gridSize)() / 2, visibility);
|
|
62
56
|
};
|
|
63
57
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
64
58
|
css: styles
|
|
@@ -54,7 +54,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
54
54
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
55
55
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
56
56
|
var packageName = "@atlaskit/renderer";
|
|
57
|
-
var packageVersion = "109.0
|
|
57
|
+
var packageVersion = "109.1.0";
|
|
58
58
|
var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
59
59
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
60
60
|
var _super = _createSuper(Renderer);
|
|
@@ -129,7 +129,7 @@ var rendererStyles = exports.rendererStyles = function rendererStyles(wrapperPro
|
|
|
129
129
|
})(themeProps), _consts.RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), _consts.RendererCssClassName.DOCUMENT, _mediaInline.mediaInlineImageStyles, headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), "var(--ds-link, ".concat(colors.B400, ")"), "var(--ds-link, ".concat(colors.B300, ")"), "var(--ds-link-pressed, ".concat(colors.B500, ")"), (0, _components.themed)({
|
|
130
130
|
light: "var(--ds-text-subtlest, ".concat(colors.N200, ")"),
|
|
131
131
|
dark: "var(--ds-text-subtlest, ".concat(colors.DN200, ")")
|
|
132
|
-
})(themeProps), telepointerStyles(themeProps), _styles.whitespaceSharedStyles, _styles.blockquoteSharedStyles, (0, _styles.headingsSharedStyles)(), (0, _styles.ruleSharedStyles)(
|
|
132
|
+
})(themeProps), telepointerStyles(themeProps), _styles.whitespaceSharedStyles, _styles.blockquoteSharedStyles, (0, _styles.headingsSharedStyles)(), (0, _styles.ruleSharedStyles)(), _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.blockMarksSharedStyles, (0, _styles.codeMarkSharedStyles)(), _styles.shadowSharedStyle, _styles.dateSharedStyle, _styles.textColorStyles, _styles.tasksAndDecisionsStyles, _styles.smartCardSharedStyles, (0, _constants.fontFamily)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _components.themed)({
|
|
133
133
|
light: "var(--ds-background-neutral, ".concat(colors.N30A, ")"),
|
|
134
134
|
dark: "var(--ds-background-neutral, ".concat(colors.DN70, ")")
|
|
135
135
|
})(themeProps), "var(--ds-border-radius-100, 3px)", (0, _components.themed)({
|
|
@@ -20,8 +20,8 @@ var _templateObject;
|
|
|
20
20
|
/** @jsx jsx */
|
|
21
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
-
var markStyles = function markStyles(
|
|
24
|
-
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: inherit;\n background-color: unset;\n -webkit-tap-highlight-color: transparent;\n\n ", ";\n"])), (0, _styles.AnnotationSharedCSSByState)(
|
|
23
|
+
var markStyles = function markStyles() {
|
|
24
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: inherit;\n background-color: unset;\n -webkit-tap-highlight-color: transparent;\n\n ", ";\n"])), (0, _styles.AnnotationSharedCSSByState)().focus);
|
|
25
25
|
};
|
|
26
26
|
var AnnotationDraft = exports.AnnotationDraft = function AnnotationDraft(_ref) {
|
|
27
27
|
var draftPosition = _ref.draftPosition,
|
|
@@ -20,12 +20,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
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; }
|
|
22
22
|
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) { (0, _defineProperty2.default)(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; }
|
|
23
|
-
var markStyles = function markStyles(
|
|
24
|
-
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: inherit;\n background-color: unset;\n -webkit-tap-highlight-color: transparent;\n\n &[data-mark-annotation-state='", "'] {\n ", ";\n\n &:focus,\n &[data-has-focus='true'] {\n ", ";\n }\n }\n"])), _adfSchema.AnnotationMarkStates.ACTIVE, (0, _styles.AnnotationSharedCSSByState)(
|
|
25
|
-
theme: props
|
|
26
|
-
}).blur, (0, _styles.AnnotationSharedCSSByState)({
|
|
27
|
-
theme: props
|
|
28
|
-
}).focus);
|
|
23
|
+
var markStyles = function markStyles() {
|
|
24
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: inherit;\n background-color: unset;\n -webkit-tap-highlight-color: transparent;\n\n &[data-mark-annotation-state='", "'] {\n ", ";\n\n &:focus,\n &[data-has-focus='true'] {\n ", ";\n }\n }\n"])), _adfSchema.AnnotationMarkStates.ACTIVE, (0, _styles.AnnotationSharedCSSByState)().blur, (0, _styles.AnnotationSharedCSSByState)().focus);
|
|
29
25
|
};
|
|
30
26
|
var MarkComponent = exports.MarkComponent = function MarkComponent(_ref) {
|
|
31
27
|
var annotationParentIds = _ref.annotationParentIds,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
|
|
4
|
+
export default function Border(props) {
|
|
5
|
+
var _props$color, _props$size;
|
|
6
|
+
const borderColor = (_props$color = props.color) !== null && _props$color !== void 0 ? _props$color : '';
|
|
7
|
+
const borderSize = (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : 0;
|
|
8
|
+
const paletteColorValue = hexToEditorBorderPaletteColor(borderColor) || borderColor;
|
|
9
|
+
return jsx("span", {
|
|
10
|
+
"data-color": paletteColorValue,
|
|
11
|
+
"data-size": borderSize,
|
|
12
|
+
"data-mark-type": "border"
|
|
13
|
+
}, props.children);
|
|
14
|
+
}
|
|
@@ -14,6 +14,7 @@ import UnsupportedNodeAttribute from './unsupportedNodeAttribute';
|
|
|
14
14
|
import DataConsumer from './data-consumer';
|
|
15
15
|
import FragmentMark from './fragment';
|
|
16
16
|
import Annotation, { isAnnotationMark } from './annotation';
|
|
17
|
+
import Border from './border';
|
|
17
18
|
|
|
18
19
|
// Stage0
|
|
19
20
|
import ConfluenceInlineComment from './confluence-inline-comment';
|
|
@@ -27,6 +28,7 @@ export const markToReact = {
|
|
|
27
28
|
textColor: TextColor,
|
|
28
29
|
underline: Underline,
|
|
29
30
|
annotation: Annotation,
|
|
31
|
+
border: Border,
|
|
30
32
|
// Stage0
|
|
31
33
|
confluenceInlineComment: ConfluenceInlineComment,
|
|
32
34
|
breakout: Breakout,
|
|
@@ -40,4 +42,4 @@ export const markToReact = {
|
|
|
40
42
|
export const toReact = mark => {
|
|
41
43
|
return markToReact[mark.type.name];
|
|
42
44
|
};
|
|
43
|
-
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, Underline, Breakout, Annotation, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark };
|
|
45
|
+
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, Underline, Breakout, Annotation, Border, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React, { forwardRef, useMemo } from 'react';
|
|
3
|
-
import { css, jsx
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
import { codeBlockSharedStyles, CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
6
6
|
import { useBidiWarnings } from '../../../hooks/use-bidi-warnings';
|
|
@@ -33,7 +33,6 @@ const LightWeightCodeBlock = /*#__PURE__*/forwardRef(({
|
|
|
33
33
|
codeBidiWarningTooltipEnabled = true,
|
|
34
34
|
className
|
|
35
35
|
}, ref) => {
|
|
36
|
-
const theme = useTheme();
|
|
37
36
|
const textRows = useMemo(() => (text !== null && text !== void 0 ? text : '').split('\n'), [text]);
|
|
38
37
|
const {
|
|
39
38
|
renderBidiWarnings
|
|
@@ -44,7 +43,7 @@ const LightWeightCodeBlock = /*#__PURE__*/forwardRef(({
|
|
|
44
43
|
return jsx("div", {
|
|
45
44
|
className: classNames,
|
|
46
45
|
ref: ref,
|
|
47
|
-
css: [codeBlockSharedStyles(
|
|
46
|
+
css: [codeBlockSharedStyles(), lightWeightCodeBlockStyles]
|
|
48
47
|
}, jsx("div", {
|
|
49
48
|
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER
|
|
50
49
|
}, jsx("div", {
|
|
@@ -18,7 +18,9 @@ export const RenderMediaInline = ({
|
|
|
18
18
|
alt,
|
|
19
19
|
width,
|
|
20
20
|
height,
|
|
21
|
-
type
|
|
21
|
+
type,
|
|
22
|
+
borderSize,
|
|
23
|
+
borderColor
|
|
22
24
|
}) => {
|
|
23
25
|
const [contextIdentifierProvider, setContextIdentifierProvider] = useState();
|
|
24
26
|
const [fileState, setFileState] = useState();
|
|
@@ -84,7 +86,11 @@ export const RenderMediaInline = ({
|
|
|
84
86
|
identifier: identifier,
|
|
85
87
|
alt: alt,
|
|
86
88
|
width: width,
|
|
87
|
-
height: height
|
|
89
|
+
height: height,
|
|
90
|
+
border: {
|
|
91
|
+
borderSize,
|
|
92
|
+
borderColor
|
|
93
|
+
}
|
|
88
94
|
});
|
|
89
95
|
}
|
|
90
96
|
const handleMediaInlineClick = result => {
|
|
@@ -110,7 +116,7 @@ export const RenderMediaInline = ({
|
|
|
110
116
|
fileState
|
|
111
117
|
}), {
|
|
112
118
|
"data-node-type": "mediaInline"
|
|
113
|
-
}), mediaProvider ? /*#__PURE__*/React.createElement(MediaInlineCard, {
|
|
119
|
+
}), mediaProvider || mediaClient ? /*#__PURE__*/React.createElement(MediaInlineCard, {
|
|
114
120
|
identifier: identifier,
|
|
115
121
|
onClick: handleMediaInlineClick,
|
|
116
122
|
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
@@ -124,6 +130,7 @@ export const RenderMediaInline = ({
|
|
|
124
130
|
}));
|
|
125
131
|
};
|
|
126
132
|
const MediaInline = props => {
|
|
133
|
+
var _borderMark$attrs$col, _borderMark$attrs$siz;
|
|
127
134
|
const {
|
|
128
135
|
collection,
|
|
129
136
|
id,
|
|
@@ -134,7 +141,8 @@ const MediaInline = props => {
|
|
|
134
141
|
type: fileType,
|
|
135
142
|
alt,
|
|
136
143
|
width,
|
|
137
|
-
height
|
|
144
|
+
height,
|
|
145
|
+
marks
|
|
138
146
|
} = props;
|
|
139
147
|
const clipboardAttrs = {
|
|
140
148
|
id,
|
|
@@ -145,6 +153,9 @@ const MediaInline = props => {
|
|
|
145
153
|
mediaItemType: 'file',
|
|
146
154
|
collectionName: collection
|
|
147
155
|
};
|
|
156
|
+
const borderMark = marks === null || marks === void 0 ? void 0 : marks.find(mark => (mark === null || mark === void 0 ? void 0 : mark.type.name) === 'border');
|
|
157
|
+
const borderColor = (_borderMark$attrs$col = borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.color) !== null && _borderMark$attrs$col !== void 0 ? _borderMark$attrs$col : '';
|
|
158
|
+
const borderSize = (_borderMark$attrs$siz = borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.size) !== null && _borderMark$attrs$siz !== void 0 ? _borderMark$attrs$siz : 0;
|
|
148
159
|
return /*#__PURE__*/React.createElement(WithProviders, {
|
|
149
160
|
providers: ['mediaProvider', 'contextIdentifierProvider'],
|
|
150
161
|
providerFactory: providerFactory,
|
|
@@ -161,7 +172,9 @@ const MediaInline = props => {
|
|
|
161
172
|
type: fileType,
|
|
162
173
|
alt: alt,
|
|
163
174
|
width: width,
|
|
164
|
-
height: height
|
|
175
|
+
height: height,
|
|
176
|
+
borderSize: borderSize,
|
|
177
|
+
borderColor: borderColor
|
|
165
178
|
});
|
|
166
179
|
}
|
|
167
180
|
});
|
|
@@ -19,9 +19,7 @@ const PanelStyled = ({
|
|
|
19
19
|
}) => {
|
|
20
20
|
let styles = theme => css`
|
|
21
21
|
&.${PanelSharedCssClassName.prefix} {
|
|
22
|
-
${panelSharedStylesWithoutPrefix(
|
|
23
|
-
theme
|
|
24
|
-
})}
|
|
22
|
+
${panelSharedStylesWithoutPrefix()}
|
|
25
23
|
|
|
26
24
|
&[data-panel-type=${PanelType.CUSTOM}] {
|
|
27
25
|
${hasIcon ? '' : 'padding-left: 12px;'}
|
|
@@ -39,9 +37,7 @@ const PanelStyled = ({
|
|
|
39
37
|
});
|
|
40
38
|
return css`
|
|
41
39
|
&.${PanelSharedCssClassName.prefix} {
|
|
42
|
-
${panelSharedStylesWithoutPrefix(
|
|
43
|
-
theme
|
|
44
|
-
})}
|
|
40
|
+
${panelSharedStylesWithoutPrefix()}
|
|
45
41
|
}
|
|
46
42
|
|
|
47
43
|
&[data-panel-type=${PanelType.CUSTOM}] {
|
package/dist/es2019/ui/Expand.js
CHANGED
|
@@ -29,10 +29,8 @@ const titleStyles = css`
|
|
|
29
29
|
const Container = props => {
|
|
30
30
|
const paddingBottom = props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
|
|
31
31
|
const sharedContainerStyles = sharedExpandStyles.containerStyles(props);
|
|
32
|
-
const styles =
|
|
33
|
-
${sharedContainerStyles(
|
|
34
|
-
theme: themeProps
|
|
35
|
-
})}
|
|
32
|
+
const styles = () => css`
|
|
33
|
+
${sharedContainerStyles()}
|
|
36
34
|
padding: 0;
|
|
37
35
|
padding-bottom: ${paddingBottom};
|
|
38
36
|
`;
|
|
@@ -42,10 +40,8 @@ const Container = props => {
|
|
|
42
40
|
};
|
|
43
41
|
const TitleContainer = props => {
|
|
44
42
|
const paddingBottom = !props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
|
|
45
|
-
const styles =
|
|
46
|
-
${sharedExpandStyles.titleContainerStyles(
|
|
47
|
-
theme: themeProps
|
|
48
|
-
})}
|
|
43
|
+
const styles = () => css`
|
|
44
|
+
${sharedExpandStyles.titleContainerStyles()}
|
|
49
45
|
padding: ${"var(--ds-space-100, 8px)"};
|
|
50
46
|
padding-bottom: ${paddingBottom};
|
|
51
47
|
`;
|
|
@@ -57,10 +53,8 @@ TitleContainer.displayName = 'TitleContainerButton';
|
|
|
57
53
|
const ContentContainer = props => {
|
|
58
54
|
const sharedContentStyles = sharedExpandStyles.contentStyles(props);
|
|
59
55
|
const visibility = props.expanded ? 'visible' : 'hidden';
|
|
60
|
-
const styles =
|
|
61
|
-
${sharedContentStyles(
|
|
62
|
-
theme: themeProps
|
|
63
|
-
})};
|
|
56
|
+
const styles = () => css`
|
|
57
|
+
${sharedContentStyles()};
|
|
64
58
|
padding-right: ${"var(--ds-space-200, 16px)"};
|
|
65
59
|
// TODO: Migrate away from gridSize
|
|
66
60
|
// Recommendation: Replace gridSize with 8, or directly replace with 36px
|
|
@@ -35,7 +35,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
|
|
|
35
35
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
36
36
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
37
37
|
const packageName = "@atlaskit/renderer";
|
|
38
|
-
const packageVersion = "109.0
|
|
38
|
+
const packageVersion = "109.1.0";
|
|
39
39
|
export class Renderer extends PureComponent {
|
|
40
40
|
constructor(props) {
|
|
41
41
|
super(props);
|
|
@@ -490,12 +490,12 @@ export const rendererStyles = wrapperProps => theme => {
|
|
|
490
490
|
${whitespaceSharedStyles};
|
|
491
491
|
${blockquoteSharedStyles};
|
|
492
492
|
${headingsSharedStyles()};
|
|
493
|
-
${ruleSharedStyles(
|
|
493
|
+
${ruleSharedStyles()};
|
|
494
494
|
${paragraphSharedStyles};
|
|
495
495
|
${listsSharedStyles};
|
|
496
496
|
${indentationSharedStyles};
|
|
497
497
|
${blockMarksSharedStyles};
|
|
498
|
-
${codeMarkSharedStyles(
|
|
498
|
+
${codeMarkSharedStyles()};
|
|
499
499
|
${shadowSharedStyle};
|
|
500
500
|
${dateSharedStyle};
|
|
501
501
|
${textColorStyles};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
+
|
|
3
4
|
import React, { Fragment } from 'react';
|
|
4
5
|
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { InsertDraftPosition } from '../types';
|
|
@@ -8,12 +9,12 @@ import { splitText, calcTextSplitOffset, findTextString } from './text';
|
|
|
8
9
|
import { calcInsertDraftPositionOnText } from './position';
|
|
9
10
|
import { dataAttributes } from './dom';
|
|
10
11
|
import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
|
|
11
|
-
const markStyles =
|
|
12
|
+
const markStyles = () => css`
|
|
12
13
|
color: inherit;
|
|
13
14
|
background-color: unset;
|
|
14
15
|
-webkit-tap-highlight-color: transparent;
|
|
15
16
|
|
|
16
|
-
${AnnotationSharedCSSByState(
|
|
17
|
+
${AnnotationSharedCSSByState().focus};
|
|
17
18
|
`;
|
|
18
19
|
export const AnnotationDraft = ({
|
|
19
20
|
draftPosition,
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
+
|
|
3
4
|
import React, { useMemo, useCallback } from 'react';
|
|
4
5
|
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
|
|
6
7
|
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
7
|
-
const markStyles =
|
|
8
|
+
const markStyles = () => css`
|
|
8
9
|
color: inherit;
|
|
9
10
|
background-color: unset;
|
|
10
11
|
-webkit-tap-highlight-color: transparent;
|
|
11
12
|
|
|
12
13
|
&[data-mark-annotation-state='${AnnotationMarkStates.ACTIVE}'] {
|
|
13
|
-
${AnnotationSharedCSSByState(
|
|
14
|
-
theme: props
|
|
15
|
-
}).blur};
|
|
14
|
+
${AnnotationSharedCSSByState().blur};
|
|
16
15
|
|
|
17
16
|
&:focus,
|
|
18
17
|
&[data-has-focus='true'] {
|
|
19
|
-
${AnnotationSharedCSSByState(
|
|
20
|
-
theme: props
|
|
21
|
-
}).focus};
|
|
18
|
+
${AnnotationSharedCSSByState().focus};
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
21
|
`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
|
|
4
|
+
export default function Border(props) {
|
|
5
|
+
var _props$color, _props$size;
|
|
6
|
+
var borderColor = (_props$color = props.color) !== null && _props$color !== void 0 ? _props$color : '';
|
|
7
|
+
var borderSize = (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : 0;
|
|
8
|
+
var paletteColorValue = hexToEditorBorderPaletteColor(borderColor) || borderColor;
|
|
9
|
+
return jsx("span", {
|
|
10
|
+
"data-color": paletteColorValue,
|
|
11
|
+
"data-size": borderSize,
|
|
12
|
+
"data-mark-type": "border"
|
|
13
|
+
}, props.children);
|
|
14
|
+
}
|
|
@@ -14,6 +14,7 @@ import UnsupportedNodeAttribute from './unsupportedNodeAttribute';
|
|
|
14
14
|
import DataConsumer from './data-consumer';
|
|
15
15
|
import FragmentMark from './fragment';
|
|
16
16
|
import Annotation, { isAnnotationMark } from './annotation';
|
|
17
|
+
import Border from './border';
|
|
17
18
|
|
|
18
19
|
// Stage0
|
|
19
20
|
import ConfluenceInlineComment from './confluence-inline-comment';
|
|
@@ -27,6 +28,7 @@ export var markToReact = {
|
|
|
27
28
|
textColor: TextColor,
|
|
28
29
|
underline: Underline,
|
|
29
30
|
annotation: Annotation,
|
|
31
|
+
border: Border,
|
|
30
32
|
// Stage0
|
|
31
33
|
confluenceInlineComment: ConfluenceInlineComment,
|
|
32
34
|
breakout: Breakout,
|
|
@@ -40,4 +42,4 @@ export var markToReact = {
|
|
|
40
42
|
export var toReact = function toReact(mark) {
|
|
41
43
|
return markToReact[mark.type.name];
|
|
42
44
|
};
|
|
43
|
-
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, Underline, Breakout, Annotation, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark };
|
|
45
|
+
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, Underline, Breakout, Annotation, Border, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark };
|
|
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import React, { forwardRef, useMemo } from 'react';
|
|
5
|
-
import { css, jsx
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
7
7
|
import { codeBlockSharedStyles, CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
8
8
|
import { useBidiWarnings } from '../../../hooks/use-bidi-warnings';
|
|
@@ -25,7 +25,6 @@ var LightWeightCodeBlock = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
25
25
|
_ref$codeBidiWarningT = _ref.codeBidiWarningTooltipEnabled,
|
|
26
26
|
codeBidiWarningTooltipEnabled = _ref$codeBidiWarningT === void 0 ? true : _ref$codeBidiWarningT,
|
|
27
27
|
className = _ref.className;
|
|
28
|
-
var theme = useTheme();
|
|
29
28
|
var textRows = useMemo(function () {
|
|
30
29
|
return (text !== null && text !== void 0 ? text : '').split('\n');
|
|
31
30
|
}, [text]);
|
|
@@ -37,7 +36,7 @@ var LightWeightCodeBlock = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
37
36
|
return jsx("div", {
|
|
38
37
|
className: classNames,
|
|
39
38
|
ref: ref,
|
|
40
|
-
css: [codeBlockSharedStyles(
|
|
39
|
+
css: [codeBlockSharedStyles(), lightWeightCodeBlockStyles]
|
|
41
40
|
}, jsx("div", {
|
|
42
41
|
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER
|
|
43
42
|
}, jsx("div", {
|
|
@@ -24,7 +24,9 @@ export var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
24
24
|
alt = _ref.alt,
|
|
25
25
|
width = _ref.width,
|
|
26
26
|
height = _ref.height,
|
|
27
|
-
type = _ref.type
|
|
27
|
+
type = _ref.type,
|
|
28
|
+
borderSize = _ref.borderSize,
|
|
29
|
+
borderColor = _ref.borderColor;
|
|
28
30
|
var _useState = useState(),
|
|
29
31
|
_useState2 = _slicedToArray(_useState, 2),
|
|
30
32
|
contextIdentifierProvider = _useState2[0],
|
|
@@ -129,7 +131,11 @@ export var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
129
131
|
identifier: identifier,
|
|
130
132
|
alt: alt,
|
|
131
133
|
width: width,
|
|
132
|
-
height: height
|
|
134
|
+
height: height,
|
|
135
|
+
border: {
|
|
136
|
+
borderSize: borderSize,
|
|
137
|
+
borderColor: borderColor
|
|
138
|
+
}
|
|
133
139
|
});
|
|
134
140
|
}
|
|
135
141
|
var handleMediaInlineClick = function handleMediaInlineClick(result) {
|
|
@@ -151,7 +157,7 @@ export var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
151
157
|
fileState: fileState
|
|
152
158
|
}), {
|
|
153
159
|
"data-node-type": "mediaInline"
|
|
154
|
-
}), mediaProvider ? /*#__PURE__*/React.createElement(MediaInlineCard, {
|
|
160
|
+
}), mediaProvider || mediaClient ? /*#__PURE__*/React.createElement(MediaInlineCard, {
|
|
155
161
|
identifier: identifier,
|
|
156
162
|
onClick: handleMediaInlineClick,
|
|
157
163
|
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
@@ -165,6 +171,7 @@ export var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
165
171
|
}));
|
|
166
172
|
};
|
|
167
173
|
var MediaInline = function MediaInline(props) {
|
|
174
|
+
var _borderMark$attrs$col, _borderMark$attrs$siz;
|
|
168
175
|
var collection = props.collection,
|
|
169
176
|
id = props.id,
|
|
170
177
|
providerFactory = props.providers,
|
|
@@ -174,7 +181,8 @@ var MediaInline = function MediaInline(props) {
|
|
|
174
181
|
fileType = props.type,
|
|
175
182
|
alt = props.alt,
|
|
176
183
|
width = props.width,
|
|
177
|
-
height = props.height
|
|
184
|
+
height = props.height,
|
|
185
|
+
marks = props.marks;
|
|
178
186
|
var clipboardAttrs = {
|
|
179
187
|
id: id,
|
|
180
188
|
collection: collection
|
|
@@ -184,6 +192,11 @@ var MediaInline = function MediaInline(props) {
|
|
|
184
192
|
mediaItemType: 'file',
|
|
185
193
|
collectionName: collection
|
|
186
194
|
};
|
|
195
|
+
var borderMark = marks === null || marks === void 0 ? void 0 : marks.find(function (mark) {
|
|
196
|
+
return (mark === null || mark === void 0 ? void 0 : mark.type.name) === 'border';
|
|
197
|
+
});
|
|
198
|
+
var borderColor = (_borderMark$attrs$col = borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.color) !== null && _borderMark$attrs$col !== void 0 ? _borderMark$attrs$col : '';
|
|
199
|
+
var borderSize = (_borderMark$attrs$siz = borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.size) !== null && _borderMark$attrs$siz !== void 0 ? _borderMark$attrs$siz : 0;
|
|
187
200
|
return /*#__PURE__*/React.createElement(WithProviders, {
|
|
188
201
|
providers: ['mediaProvider', 'contextIdentifierProvider'],
|
|
189
202
|
providerFactory: providerFactory,
|
|
@@ -200,7 +213,9 @@ var MediaInline = function MediaInline(props) {
|
|
|
200
213
|
type: fileType,
|
|
201
214
|
alt: alt,
|
|
202
215
|
width: width,
|
|
203
|
-
height: height
|
|
216
|
+
height: height,
|
|
217
|
+
borderSize: borderSize,
|
|
218
|
+
borderColor: borderColor
|
|
204
219
|
});
|
|
205
220
|
}
|
|
206
221
|
});
|
|
@@ -21,9 +21,7 @@ var PanelStyled = function PanelStyled(_ref) {
|
|
|
21
21
|
hasIcon = _ref.hasIcon,
|
|
22
22
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
23
23
|
var styles = function styles(theme) {
|
|
24
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.", " {\n ", "\n\n &[data-panel-type=", "] {\n ", "\n }\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix(
|
|
25
|
-
theme: theme
|
|
26
|
-
}), PanelType.CUSTOM, hasIcon ? '' : 'padding-left: 12px;');
|
|
24
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.", " {\n ", "\n\n &[data-panel-type=", "] {\n ", "\n }\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix(), PanelType.CUSTOM, hasIcon ? '' : 'padding-left: 12px;');
|
|
27
25
|
};
|
|
28
26
|
if (props['data-panel-type'] === PanelType.CUSTOM && backgroundColor) {
|
|
29
27
|
styles = function styles(theme) {
|
|
@@ -34,9 +32,7 @@ var PanelStyled = function PanelStyled(_ref) {
|
|
|
34
32
|
})({
|
|
35
33
|
theme: theme
|
|
36
34
|
});
|
|
37
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &.", " {\n ", "\n }\n\n &[data-panel-type=", "] {\n ", ";\n ", "\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix(
|
|
38
|
-
theme: theme
|
|
39
|
-
}), PanelType.CUSTOM, customStyle, hasIcon ? '' : 'padding-left: 12px;');
|
|
35
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &.", " {\n ", "\n }\n\n &[data-panel-type=", "] {\n ", ";\n ", "\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix(), PanelType.CUSTOM, customStyle, hasIcon ? '' : 'padding-left: 12px;');
|
|
40
36
|
};
|
|
41
37
|
}
|
|
42
38
|
return jsx("div", _extends({
|
package/dist/esm/ui/Expand.js
CHANGED
|
@@ -21,10 +21,8 @@ var titleStyles = css(_templateObject || (_templateObject = _taggedTemplateLiter
|
|
|
21
21
|
var Container = function Container(props) {
|
|
22
22
|
var paddingBottom = props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
|
|
23
23
|
var sharedContainerStyles = sharedExpandStyles.containerStyles(props);
|
|
24
|
-
var styles = function styles(
|
|
25
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n padding: 0;\n padding-bottom: ", ";\n "])), sharedContainerStyles(
|
|
26
|
-
theme: themeProps
|
|
27
|
-
}), paddingBottom);
|
|
24
|
+
var styles = function styles() {
|
|
25
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n padding: 0;\n padding-bottom: ", ";\n "])), sharedContainerStyles(), paddingBottom);
|
|
28
26
|
};
|
|
29
27
|
return jsx("div", _extends({
|
|
30
28
|
css: styles
|
|
@@ -32,10 +30,8 @@ var Container = function Container(props) {
|
|
|
32
30
|
};
|
|
33
31
|
var TitleContainer = function TitleContainer(props) {
|
|
34
32
|
var paddingBottom = !props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
|
|
35
|
-
var styles = function styles(
|
|
36
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n padding: ", ";\n padding-bottom: ", ";\n "])), sharedExpandStyles.titleContainerStyles(
|
|
37
|
-
theme: themeProps
|
|
38
|
-
}), "var(--ds-space-100, 8px)", paddingBottom);
|
|
33
|
+
var styles = function styles() {
|
|
34
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n padding: ", ";\n padding-bottom: ", ";\n "])), sharedExpandStyles.titleContainerStyles(), "var(--ds-space-100, 8px)", paddingBottom);
|
|
39
35
|
};
|
|
40
36
|
return jsx("button", _extends({
|
|
41
37
|
css: styles
|
|
@@ -45,10 +41,8 @@ TitleContainer.displayName = 'TitleContainerButton';
|
|
|
45
41
|
var ContentContainer = function ContentContainer(props) {
|
|
46
42
|
var sharedContentStyles = sharedExpandStyles.contentStyles(props);
|
|
47
43
|
var visibility = props.expanded ? 'visible' : 'hidden';
|
|
48
|
-
var styles = function styles(
|
|
49
|
-
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", ";\n padding-right: ", ";\n // TODO: Migrate away from gridSize\n // Recommendation: Replace gridSize with 8, or directly replace with 36px\n padding-left: ", "px;\n visibility: ", ";\n "])), sharedContentStyles(
|
|
50
|
-
theme: themeProps
|
|
51
|
-
}), "var(--ds-space-200, 16px)", gridSize() * 5 - gridSize() / 2, visibility);
|
|
44
|
+
var styles = function styles() {
|
|
45
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", ";\n padding-right: ", ";\n // TODO: Migrate away from gridSize\n // Recommendation: Replace gridSize with 8, or directly replace with 36px\n padding-left: ", "px;\n visibility: ", ";\n "])), sharedContentStyles(), "var(--ds-space-200, 16px)", gridSize() * 5 - gridSize() / 2, visibility);
|
|
52
46
|
};
|
|
53
47
|
return jsx("div", _extends({
|
|
54
48
|
css: styles
|
|
@@ -45,7 +45,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
|
|
|
45
45
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
46
46
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
47
47
|
var packageName = "@atlaskit/renderer";
|
|
48
|
-
var packageVersion = "109.0
|
|
48
|
+
var packageVersion = "109.1.0";
|
|
49
49
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
50
50
|
_inherits(Renderer, _PureComponent);
|
|
51
51
|
var _super = _createSuper(Renderer);
|
|
@@ -120,7 +120,7 @@ export var rendererStyles = function rendererStyles(wrapperProps) {
|
|
|
120
120
|
})(themeProps), RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), RendererCssClassName.DOCUMENT, mediaInlineImageStyles, headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), "var(--ds-link, ".concat(colors.B400, ")"), "var(--ds-link, ".concat(colors.B300, ")"), "var(--ds-link-pressed, ".concat(colors.B500, ")"), themed({
|
|
121
121
|
light: "var(--ds-text-subtlest, ".concat(colors.N200, ")"),
|
|
122
122
|
dark: "var(--ds-text-subtlest, ".concat(colors.DN200, ")")
|
|
123
|
-
})(themeProps), telepointerStyles(themeProps), whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles(), ruleSharedStyles(
|
|
123
|
+
})(themeProps), telepointerStyles(themeProps), whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles(), ruleSharedStyles(), paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles(), shadowSharedStyle, dateSharedStyle, textColorStyles, tasksAndDecisionsStyles, smartCardSharedStyles, fontFamily(), relativeFontSizeToBase16(fontSize()), themed({
|
|
124
124
|
light: "var(--ds-background-neutral, ".concat(colors.N30A, ")"),
|
|
125
125
|
dark: "var(--ds-background-neutral, ".concat(colors.DN70, ")")
|
|
126
126
|
})(themeProps), "var(--ds-border-radius-100, 3px)", themed({
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _templateObject;
|
|
4
4
|
/** @jsx jsx */
|
|
5
|
+
|
|
5
6
|
import React, { Fragment } from 'react';
|
|
6
7
|
import { css, jsx } from '@emotion/react';
|
|
7
8
|
import { InsertDraftPosition } from '../types';
|
|
@@ -10,8 +11,8 @@ import { splitText, calcTextSplitOffset, findTextString } from './text';
|
|
|
10
11
|
import { calcInsertDraftPositionOnText } from './position';
|
|
11
12
|
import { dataAttributes } from './dom';
|
|
12
13
|
import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
|
|
13
|
-
var markStyles = function markStyles(
|
|
14
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: inherit;\n background-color: unset;\n -webkit-tap-highlight-color: transparent;\n\n ", ";\n"])), AnnotationSharedCSSByState(
|
|
14
|
+
var markStyles = function markStyles() {
|
|
15
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: inherit;\n background-color: unset;\n -webkit-tap-highlight-color: transparent;\n\n ", ";\n"])), AnnotationSharedCSSByState().focus);
|
|
15
16
|
};
|
|
16
17
|
export var AnnotationDraft = function AnnotationDraft(_ref) {
|
|
17
18
|
var draftPosition = _ref.draftPosition,
|
|
@@ -6,16 +6,13 @@ var _templateObject;
|
|
|
6
6
|
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; }
|
|
7
7
|
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; }
|
|
8
8
|
/** @jsx jsx */
|
|
9
|
+
|
|
9
10
|
import React, { useMemo, useCallback } from 'react';
|
|
10
11
|
import { css, jsx } from '@emotion/react';
|
|
11
12
|
import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
|
|
12
13
|
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
13
|
-
var markStyles = function markStyles(
|
|
14
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: inherit;\n background-color: unset;\n -webkit-tap-highlight-color: transparent;\n\n &[data-mark-annotation-state='", "'] {\n ", ";\n\n &:focus,\n &[data-has-focus='true'] {\n ", ";\n }\n }\n"])), AnnotationMarkStates.ACTIVE, AnnotationSharedCSSByState(
|
|
15
|
-
theme: props
|
|
16
|
-
}).blur, AnnotationSharedCSSByState({
|
|
17
|
-
theme: props
|
|
18
|
-
}).focus);
|
|
14
|
+
var markStyles = function markStyles() {
|
|
15
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: inherit;\n background-color: unset;\n -webkit-tap-highlight-color: transparent;\n\n &[data-mark-annotation-state='", "'] {\n ", ";\n\n &:focus,\n &[data-has-focus='true'] {\n ", ";\n }\n }\n"])), AnnotationMarkStates.ACTIVE, AnnotationSharedCSSByState().blur, AnnotationSharedCSSByState().focus);
|
|
19
16
|
};
|
|
20
17
|
export var MarkComponent = function MarkComponent(_ref) {
|
|
21
18
|
var annotationParentIds = _ref.annotationParentIds,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
import { Mark } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { Mark } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import Code from './code';
|
|
4
4
|
import Em from './em';
|
|
5
5
|
import Link from './link';
|
|
@@ -14,8 +14,9 @@ import UnsupportedNodeAttribute from './unsupportedNodeAttribute';
|
|
|
14
14
|
import DataConsumer from './data-consumer';
|
|
15
15
|
import FragmentMark from './fragment';
|
|
16
16
|
import Annotation, { isAnnotationMark } from './annotation';
|
|
17
|
+
import Border from './border';
|
|
17
18
|
export declare const markToReact: {
|
|
18
19
|
[key: string]: ComponentType<any>;
|
|
19
20
|
};
|
|
20
21
|
export declare const toReact: (mark: Mark) => ComponentType<any>;
|
|
21
|
-
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, Underline, Breakout, Annotation, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark, };
|
|
22
|
+
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, Underline, Breakout, Annotation, Border, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark, };
|
|
@@ -9,6 +9,7 @@ import type { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
|
9
9
|
import type { ClipboardAttrs, MediaProvider } from '../../ui/MediaCard';
|
|
10
10
|
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
11
11
|
import type { RendererContext } from '../types';
|
|
12
|
+
import type { Mark } from '@atlaskit/editor-prosemirror/model';
|
|
12
13
|
type MediaInlineProviders = {
|
|
13
14
|
mediaProvider?: Promise<MediaProvider>;
|
|
14
15
|
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
@@ -32,6 +33,7 @@ export type MediaInlineProps = {
|
|
|
32
33
|
eventHandlers?: EventHandlers;
|
|
33
34
|
rendererAppearance?: RendererAppearance;
|
|
34
35
|
featureFlags?: MediaFeatureFlags;
|
|
36
|
+
marks?: Array<Mark>;
|
|
35
37
|
};
|
|
36
38
|
export declare const RenderMediaInline: FC<RenderMediaInlineProps & MediaInlineAttrs>;
|
|
37
39
|
declare const _default: FC<import("react-intl-next").WithIntlProps<MediaInlineProps & WrappedComponentProps<"intl"> & MediaInlineAttrs>> & {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
5
|
-
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
+
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
export interface Props {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
providers?: ProviderFactory;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { AnalyticsEventPayload } from '../analytics/events';
|
|
4
|
-
import { WrappedComponentProps } from 'react-intl-next';
|
|
5
|
-
import { RendererAppearance } from './Renderer/types';
|
|
3
|
+
import type { AnalyticsEventPayload } from '../analytics/events';
|
|
4
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
5
|
+
import type { RendererAppearance } from './Renderer/types';
|
|
6
6
|
export type StyleProps = {
|
|
7
7
|
expanded?: boolean;
|
|
8
8
|
focused?: boolean;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import type { Position } from '../types';
|
|
5
|
+
import { InsertDraftPosition } from '../types';
|
|
4
6
|
export declare const AnnotationDraft: React.FC<{
|
|
5
7
|
draftPosition: Position;
|
|
6
8
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import type { OnAnnotationClickPayload } from '@atlaskit/editor-common/types';
|
|
4
|
-
import {
|
|
3
|
+
import type { AnnotationId, AnnotationDataAttributes } from '@atlaskit/adf-schema';
|
|
4
|
+
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
5
5
|
type MarkComponentProps = {
|
|
6
6
|
id: AnnotationId;
|
|
7
7
|
annotationParentIds: AnnotationId[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
import { Mark } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { Mark } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import Code from './code';
|
|
4
4
|
import Em from './em';
|
|
5
5
|
import Link from './link';
|
|
@@ -14,8 +14,9 @@ import UnsupportedNodeAttribute from './unsupportedNodeAttribute';
|
|
|
14
14
|
import DataConsumer from './data-consumer';
|
|
15
15
|
import FragmentMark from './fragment';
|
|
16
16
|
import Annotation, { isAnnotationMark } from './annotation';
|
|
17
|
+
import Border from './border';
|
|
17
18
|
export declare const markToReact: {
|
|
18
19
|
[key: string]: ComponentType<any>;
|
|
19
20
|
};
|
|
20
21
|
export declare const toReact: (mark: Mark) => ComponentType<any>;
|
|
21
|
-
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, Underline, Breakout, Annotation, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark, };
|
|
22
|
+
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, Underline, Breakout, Annotation, Border, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark, };
|
|
@@ -9,6 +9,7 @@ import type { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
|
9
9
|
import type { ClipboardAttrs, MediaProvider } from '../../ui/MediaCard';
|
|
10
10
|
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
11
11
|
import type { RendererContext } from '../types';
|
|
12
|
+
import type { Mark } from '@atlaskit/editor-prosemirror/model';
|
|
12
13
|
type MediaInlineProviders = {
|
|
13
14
|
mediaProvider?: Promise<MediaProvider>;
|
|
14
15
|
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
@@ -32,6 +33,7 @@ export type MediaInlineProps = {
|
|
|
32
33
|
eventHandlers?: EventHandlers;
|
|
33
34
|
rendererAppearance?: RendererAppearance;
|
|
34
35
|
featureFlags?: MediaFeatureFlags;
|
|
36
|
+
marks?: Array<Mark>;
|
|
35
37
|
};
|
|
36
38
|
export declare const RenderMediaInline: FC<RenderMediaInlineProps & MediaInlineAttrs>;
|
|
37
39
|
declare const _default: FC<import("react-intl-next").WithIntlProps<MediaInlineProps & WrappedComponentProps<"intl"> & MediaInlineAttrs>> & {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
5
|
-
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
+
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
export interface Props {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
providers?: ProviderFactory;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { AnalyticsEventPayload } from '../analytics/events';
|
|
4
|
-
import { WrappedComponentProps } from 'react-intl-next';
|
|
5
|
-
import { RendererAppearance } from './Renderer/types';
|
|
3
|
+
import type { AnalyticsEventPayload } from '../analytics/events';
|
|
4
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
5
|
+
import type { RendererAppearance } from './Renderer/types';
|
|
6
6
|
export type StyleProps = {
|
|
7
7
|
expanded?: boolean;
|
|
8
8
|
focused?: boolean;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import type { Position } from '../types';
|
|
5
|
+
import { InsertDraftPosition } from '../types';
|
|
4
6
|
export declare const AnnotationDraft: React.FC<{
|
|
5
7
|
draftPosition: Position;
|
|
6
8
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import type { OnAnnotationClickPayload } from '@atlaskit/editor-common/types';
|
|
4
|
-
import {
|
|
3
|
+
import type { AnnotationId, AnnotationDataAttributes } from '@atlaskit/adf-schema';
|
|
4
|
+
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
5
5
|
type MarkComponentProps = {
|
|
6
6
|
id: AnnotationId;
|
|
7
7
|
annotationParentIds: AnnotationId[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "109.0
|
|
3
|
+
"version": "109.1.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
33
33
|
"@atlaskit/button": "^17.1.0",
|
|
34
34
|
"@atlaskit/code": "^15.1.0",
|
|
35
|
-
"@atlaskit/editor-common": "^76.
|
|
35
|
+
"@atlaskit/editor-common": "^76.28.0",
|
|
36
36
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
37
37
|
"@atlaskit/editor-palette": "1.5.2",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/status": "^1.4.0",
|
|
53
53
|
"@atlaskit/task-decision": "^17.9.0",
|
|
54
54
|
"@atlaskit/theme": "^12.6.0",
|
|
55
|
-
"@atlaskit/tokens": "^1.
|
|
55
|
+
"@atlaskit/tokens": "^1.31.0",
|
|
56
56
|
"@atlaskit/tooltip": "^18.1.0",
|
|
57
57
|
"@babel/runtime": "^7.0.0",
|
|
58
58
|
"@emotion/react": "^11.7.1",
|