@atlaskit/editor-plugin-card 5.4.30 → 5.4.31
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 +9 -0
- package/dist/cjs/nodeviews/inlineCardWithAwareness.js +2 -1
- package/dist/cjs/ui/OpenButtonOverlay/index.js +1 -1
- package/dist/es2019/nodeviews/inlineCardWithAwareness.js +2 -1
- package/dist/es2019/ui/OpenButtonOverlay/index.js +1 -1
- package/dist/esm/nodeviews/inlineCardWithAwareness.js +2 -1
- package/dist/esm/ui/OpenButtonOverlay/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 5.4.31
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#153459](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/153459)
|
|
8
|
+
[`56a72b77265db`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/56a72b77265db) -
|
|
9
|
+
[ux] Show smart link open button overlay in chromeless editor
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 5.4.30
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -110,7 +110,8 @@ var InlineCardWithAwareness = exports.InlineCardWithAwareness = /*#__PURE__*/(0,
|
|
|
110
110
|
});
|
|
111
111
|
}, [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, useAlternativePreloader, view, isPageSSRed]);
|
|
112
112
|
var shouldShowOpenButtonOverlay = (0, _react.useMemo)(function () {
|
|
113
|
-
|
|
113
|
+
var shouldShowOpenButtonOverlayInChomeless = editorAppearance === 'chromeless' && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_8');
|
|
114
|
+
return ((editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'edit' || editorAppearance === 'comment' && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6') || shouldShowOpenButtonOverlayInChomeless) && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1');
|
|
114
115
|
}, [editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode, editorAppearance]);
|
|
115
116
|
var innerCard = shouldShowOpenButtonOverlay ? innerCardWithOpenButtonOverlay : innerCardOriginal;
|
|
116
117
|
var getPosFunction = typeof getPos === 'function' ? getPos : undefined;
|
|
@@ -174,7 +174,7 @@ var OpenButtonOverlay = function OpenButtonOverlay(_ref) {
|
|
|
174
174
|
href: url,
|
|
175
175
|
target: "_blank",
|
|
176
176
|
style: {
|
|
177
|
-
paddingBlock: editorAppearance === 'comment' && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6') ? '1px' : "var(--ds-space-025, 2px)"
|
|
177
|
+
paddingBlock: editorAppearance === 'comment' && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6') || editorAppearance === 'chromeless' && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_8') ? '1px' : "var(--ds-space-025, 2px)"
|
|
178
178
|
},
|
|
179
179
|
onClick: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics') ? handleClick : undefined
|
|
180
180
|
}, (0, _react2.jsx)(_primitives.Box, {
|
|
@@ -85,7 +85,8 @@ export const InlineCardWithAwareness = /*#__PURE__*/memo(({
|
|
|
85
85
|
isPageSSRed: isPageSSRed
|
|
86
86
|
}), [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, useAlternativePreloader, view, isPageSSRed]);
|
|
87
87
|
const shouldShowOpenButtonOverlay = useMemo(() => {
|
|
88
|
-
|
|
88
|
+
const shouldShowOpenButtonOverlayInChomeless = editorAppearance === 'chromeless' && fg('platform_editor_controls_patch_8');
|
|
89
|
+
return ((editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'edit' || editorAppearance === 'comment' && fg('platform_editor_controls_patch_6') || shouldShowOpenButtonOverlayInChomeless) && editorExperiment('platform_editor_controls', 'variant1');
|
|
89
90
|
}, [editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode, editorAppearance]);
|
|
90
91
|
const innerCard = shouldShowOpenButtonOverlay ? innerCardWithOpenButtonOverlay : innerCardOriginal;
|
|
91
92
|
const getPosFunction = typeof getPos === 'function' ? getPos : undefined;
|
|
@@ -150,7 +150,7 @@ const OpenButtonOverlay = ({
|
|
|
150
150
|
href: url,
|
|
151
151
|
target: "_blank",
|
|
152
152
|
style: {
|
|
153
|
-
paddingBlock: editorAppearance === 'comment' && fg('platform_editor_controls_patch_6') ? '1px' : "var(--ds-space-025, 2px)"
|
|
153
|
+
paddingBlock: editorAppearance === 'comment' && fg('platform_editor_controls_patch_6') || editorAppearance === 'chromeless' && fg('platform_editor_controls_patch_8') ? '1px' : "var(--ds-space-025, 2px)"
|
|
154
154
|
},
|
|
155
155
|
onClick: fg('platform_editor_controls_patch_analytics') ? handleClick : undefined
|
|
156
156
|
}, jsx(Box, {
|
|
@@ -100,7 +100,8 @@ export var InlineCardWithAwareness = /*#__PURE__*/memo(function (_ref) {
|
|
|
100
100
|
});
|
|
101
101
|
}, [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, useAlternativePreloader, view, isPageSSRed]);
|
|
102
102
|
var shouldShowOpenButtonOverlay = useMemo(function () {
|
|
103
|
-
|
|
103
|
+
var shouldShowOpenButtonOverlayInChomeless = editorAppearance === 'chromeless' && fg('platform_editor_controls_patch_8');
|
|
104
|
+
return ((editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'edit' || editorAppearance === 'comment' && fg('platform_editor_controls_patch_6') || shouldShowOpenButtonOverlayInChomeless) && editorExperiment('platform_editor_controls', 'variant1');
|
|
104
105
|
}, [editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode, editorAppearance]);
|
|
105
106
|
var innerCard = shouldShowOpenButtonOverlay ? innerCardWithOpenButtonOverlay : innerCardOriginal;
|
|
106
107
|
var getPosFunction = typeof getPos === 'function' ? getPos : undefined;
|
|
@@ -160,7 +160,7 @@ var OpenButtonOverlay = function OpenButtonOverlay(_ref) {
|
|
|
160
160
|
href: url,
|
|
161
161
|
target: "_blank",
|
|
162
162
|
style: {
|
|
163
|
-
paddingBlock: editorAppearance === 'comment' && fg('platform_editor_controls_patch_6') ? '1px' : "var(--ds-space-025, 2px)"
|
|
163
|
+
paddingBlock: editorAppearance === 'comment' && fg('platform_editor_controls_patch_6') || editorAppearance === 'chromeless' && fg('platform_editor_controls_patch_8') ? '1px' : "var(--ds-space-025, 2px)"
|
|
164
164
|
},
|
|
165
165
|
onClick: fg('platform_editor_controls_patch_analytics') ? handleClick : undefined
|
|
166
166
|
}, jsx(Box, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.31",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@atlaskit/primitives": "^14.7.0",
|
|
63
63
|
"@atlaskit/smart-card": "^37.1.0",
|
|
64
64
|
"@atlaskit/theme": "^18.0.0",
|
|
65
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
65
|
+
"@atlaskit/tmp-editor-statsig": "^4.20.0",
|
|
66
66
|
"@atlaskit/tokens": "^4.8.0",
|
|
67
67
|
"@babel/runtime": "^7.0.0",
|
|
68
68
|
"@emotion/react": "^11.7.1",
|