@atlaskit/editor-plugin-card 18.0.9 → 18.0.11
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
CHANGED
|
@@ -19,7 +19,6 @@ var _state = require("@atlaskit/editor-prosemirror/state");
|
|
|
19
19
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
20
20
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
21
21
|
var _smartCard = require("@atlaskit/smart-card");
|
|
22
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
23
22
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
24
23
|
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; }
|
|
25
24
|
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; }
|
|
@@ -28,10 +27,6 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
28
27
|
* @jsxRuntime classic
|
|
29
28
|
* @jsx jsx
|
|
30
29
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
31
|
-
// Layouts where the left handle is the only resize handle today.
|
|
32
|
-
// These must keep the left handle.
|
|
33
|
-
// Remove during 'platform_editor_lovability_resize_dividers_panels' cleanup
|
|
34
|
-
var leftHandleOnlyLayouts = ['wrap-right', 'align-end'];
|
|
35
30
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
36
31
|
var ResizableEmbedCard = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
37
32
|
function ResizableEmbedCard() {
|
|
@@ -359,20 +354,12 @@ var ResizableEmbedCard = exports.default = /*#__PURE__*/function (_React$Compone
|
|
|
359
354
|
width: this.calcPxWidth(),
|
|
360
355
|
innerPadding: _editorSharedStyles.akEditorMediaResizeHandlerPadding
|
|
361
356
|
};
|
|
362
|
-
var isLeftResizeHandleDisabled = (0, _expValEquals.expValEquals)('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true);
|
|
363
357
|
var enable = {};
|
|
364
358
|
_ui.handleSides.forEach(function (side) {
|
|
365
359
|
if (isResizeDisabled) {
|
|
366
360
|
enable[side] = false;
|
|
367
361
|
return;
|
|
368
362
|
}
|
|
369
|
-
|
|
370
|
-
// Disable the left handle up-front (except for layouts where it is the
|
|
371
|
-
// only handle) before computing whether it would otherwise be enabled.
|
|
372
|
-
if (side === 'left' && isLeftResizeHandleDisabled && !leftHandleOnlyLayouts.includes(layout)) {
|
|
373
|
-
enable[side] = false;
|
|
374
|
-
return;
|
|
375
|
-
}
|
|
376
363
|
var oppositeSide = side === 'left' ? 'right' : 'left';
|
|
377
364
|
enable[side] = ['full-width', 'wide', 'center'].concat("wrap-".concat(oppositeSide)).concat("align-".concat(_ui.imageAlignmentMap[oppositeSide])).indexOf(layout) > -1;
|
|
378
365
|
if (side === 'left' && _this2.insideInlineLike) {
|
|
@@ -13,12 +13,7 @@ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
13
13
|
import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
14
14
|
import { akEditorBreakoutPadding, akEditorMediaResizeHandlerPadding, akEditorWideLayoutWidth, breakoutWideScaleRatio, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
15
15
|
import { embedHeaderHeight } from '@atlaskit/smart-card';
|
|
16
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
16
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
|
-
// Layouts where the left handle is the only resize handle today.
|
|
19
|
-
// These must keep the left handle.
|
|
20
|
-
// Remove during 'platform_editor_lovability_resize_dividers_panels' cleanup
|
|
21
|
-
const leftHandleOnlyLayouts = ['wrap-right', 'align-end'];
|
|
22
17
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
23
18
|
export default class ResizableEmbedCard extends React.Component {
|
|
24
19
|
constructor(...args) {
|
|
@@ -341,20 +336,12 @@ export default class ResizableEmbedCard extends React.Component {
|
|
|
341
336
|
width: this.calcPxWidth(),
|
|
342
337
|
innerPadding: akEditorMediaResizeHandlerPadding
|
|
343
338
|
};
|
|
344
|
-
const isLeftResizeHandleDisabled = expValEquals('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true);
|
|
345
339
|
const enable = {};
|
|
346
340
|
handleSides.forEach(side => {
|
|
347
341
|
if (isResizeDisabled) {
|
|
348
342
|
enable[side] = false;
|
|
349
343
|
return;
|
|
350
344
|
}
|
|
351
|
-
|
|
352
|
-
// Disable the left handle up-front (except for layouts where it is the
|
|
353
|
-
// only handle) before computing whether it would otherwise be enabled.
|
|
354
|
-
if (side === 'left' && isLeftResizeHandleDisabled && !leftHandleOnlyLayouts.includes(layout)) {
|
|
355
|
-
enable[side] = false;
|
|
356
|
-
return;
|
|
357
|
-
}
|
|
358
345
|
const oppositeSide = side === 'left' ? 'right' : 'left';
|
|
359
346
|
enable[side] = ['full-width', 'wide', 'center'].concat(`wrap-${oppositeSide}`).concat(`align-${imageAlignmentMap[oppositeSide]}`).indexOf(layout) > -1;
|
|
360
347
|
if (side === 'left' && this.insideInlineLike) {
|
|
@@ -22,12 +22,7 @@ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
22
22
|
import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
23
23
|
import { akEditorBreakoutPadding, akEditorMediaResizeHandlerPadding, akEditorWideLayoutWidth, breakoutWideScaleRatio, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
24
24
|
import { embedHeaderHeight } from '@atlaskit/smart-card';
|
|
25
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
26
25
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
27
|
-
// Layouts where the left handle is the only resize handle today.
|
|
28
|
-
// These must keep the left handle.
|
|
29
|
-
// Remove during 'platform_editor_lovability_resize_dividers_panels' cleanup
|
|
30
|
-
var leftHandleOnlyLayouts = ['wrap-right', 'align-end'];
|
|
31
26
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
32
27
|
var ResizableEmbedCard = /*#__PURE__*/function (_React$Component) {
|
|
33
28
|
function ResizableEmbedCard() {
|
|
@@ -355,20 +350,12 @@ var ResizableEmbedCard = /*#__PURE__*/function (_React$Component) {
|
|
|
355
350
|
width: this.calcPxWidth(),
|
|
356
351
|
innerPadding: akEditorMediaResizeHandlerPadding
|
|
357
352
|
};
|
|
358
|
-
var isLeftResizeHandleDisabled = expValEquals('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true);
|
|
359
353
|
var enable = {};
|
|
360
354
|
handleSides.forEach(function (side) {
|
|
361
355
|
if (isResizeDisabled) {
|
|
362
356
|
enable[side] = false;
|
|
363
357
|
return;
|
|
364
358
|
}
|
|
365
|
-
|
|
366
|
-
// Disable the left handle up-front (except for layouts where it is the
|
|
367
|
-
// only handle) before computing whether it would otherwise be enabled.
|
|
368
|
-
if (side === 'left' && isLeftResizeHandleDisabled && !leftHandleOnlyLayouts.includes(layout)) {
|
|
369
|
-
enable[side] = false;
|
|
370
|
-
return;
|
|
371
|
-
}
|
|
372
359
|
var oppositeSide = side === 'left' ? 'right' : 'left';
|
|
373
360
|
enable[side] = ['full-width', 'wide', 'center'].concat("wrap-".concat(oppositeSide)).concat("align-".concat(imageAlignmentMap[oppositeSide])).indexOf(layout) > -1;
|
|
374
361
|
if (side === 'left' && _this2.insideInlineLike) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.0.11",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"@atlaskit/platform-feature-flags-react": "^1.0.0",
|
|
58
58
|
"@atlaskit/primitives": "^20.0.0",
|
|
59
59
|
"@atlaskit/prosemirror-history": "^1.0.0",
|
|
60
|
-
"@atlaskit/smart-card": "^45.
|
|
61
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
60
|
+
"@atlaskit/smart-card": "^45.4.0",
|
|
61
|
+
"@atlaskit/tmp-editor-statsig": "^113.0.0",
|
|
62
62
|
"@atlaskit/tokens": "^15.0.0",
|
|
63
63
|
"@babel/runtime": "^7.0.0",
|
|
64
64
|
"@emotion/react": "^11.7.1",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"uuid": "^3.1.0"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@atlaskit/editor-common": "^116.
|
|
71
|
+
"@atlaskit/editor-common": "^116.12.0",
|
|
72
72
|
"@atlaskit/link-provider": "^5.0.0",
|
|
73
73
|
"react": "^18.2.0",
|
|
74
74
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|