@atlaskit/editor-plugin-card 21.0.2 → 21.0.3
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 +24 -0
- package/dist/cjs/pm-plugins/doc.js +1 -1
- package/dist/cjs/ui/ResizableEmbedCard.js +2 -3
- package/dist/es2019/pm-plugins/doc.js +1 -1
- package/dist/es2019/ui/ResizableEmbedCard.js +2 -3
- package/dist/esm/pm-plugins/doc.js +1 -1
- package/dist/esm/ui/ResizableEmbedCard.js +2 -3
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 21.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`76e9f6152bf16`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/76e9f6152bf16) -
|
|
8
|
+
Enable launched synced block integrations and remove obsolete experiment scaffolding.
|
|
9
|
+
|
|
10
|
+
BREAKING: `@atlaskit/tmp-editor-statsig` no longer defines the `platform_synced_block` editor
|
|
11
|
+
experiment. Consumers that use `editorExperiment('platform_synced_block', ...)` to conditionally
|
|
12
|
+
enable synced-block integrations will no longer be able to look up that experiment; synced-block
|
|
13
|
+
integrations are now enabled by default. Remove each lookup and its conditional branch:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
// Before
|
|
17
|
+
if (editorExperiment('platform_synced_block', true)) {
|
|
18
|
+
enableSyncedBlocks();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// After
|
|
22
|
+
enableSyncedBlocks();
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
|
|
3
27
|
## 21.0.2
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -503,7 +503,7 @@ var setSelectedCardAppearance = exports.setSelectedCardAppearance = function set
|
|
|
503
503
|
if ((0, _utils2.appearanceForNodeType)(selectedNode.type) === appearance && !selectedNode.attrs.datasource) {
|
|
504
504
|
return false;
|
|
505
505
|
}
|
|
506
|
-
var attrs =
|
|
506
|
+
var attrs = getAttrsForAppearance(appearance, selectedNode, state.selection.$from.parent.type.name === 'bodiedSyncBlock');
|
|
507
507
|
var _state$selection = state.selection,
|
|
508
508
|
from = _state$selection.from,
|
|
509
509
|
to = _state$selection.to;
|
|
@@ -20,7 +20,6 @@ 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
22
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
23
|
-
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; }
|
|
26
25
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
@@ -130,7 +129,7 @@ var ResizableEmbedCard = exports.default = /*#__PURE__*/function (_React$Compone
|
|
|
130
129
|
bodiedSyncBlock = _this$props$view$stat.bodiedSyncBlock;
|
|
131
130
|
|
|
132
131
|
// Hide resizing guideline when embed is nested
|
|
133
|
-
if (_this.$pos && !!(0, _utils.findParentNodeOfTypeClosestToPos)(_this.$pos,
|
|
132
|
+
if (_this.$pos && !!(0, _utils.findParentNodeOfTypeClosestToPos)(_this.$pos, [layoutColumn, table, expand, nestedExpand, bodiedSyncBlock])) {
|
|
134
133
|
return [];
|
|
135
134
|
}
|
|
136
135
|
if (snapWidth > _this.wideLayoutWidth) {
|
|
@@ -417,7 +416,7 @@ var ResizableEmbedCard = exports.default = /*#__PURE__*/function (_React$Compone
|
|
|
417
416
|
scaleFactor: !this.wrappedLayout && !this.insideInlineLike ? 2 : 1,
|
|
418
417
|
highlights: this.highlights,
|
|
419
418
|
nodeType: "embed",
|
|
420
|
-
onResizeStart:
|
|
419
|
+
onResizeStart: this.handleResizeStart,
|
|
421
420
|
handleStyles: nestedInTableHandleStyles(this.isNestedInTable())
|
|
422
421
|
// Ignored via go/ees005
|
|
423
422
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -467,7 +467,7 @@ export const setSelectedCardAppearance = (appearance, editorAnalyticsApi) => (st
|
|
|
467
467
|
if (appearanceForNodeType(selectedNode.type) === appearance && !selectedNode.attrs.datasource) {
|
|
468
468
|
return false;
|
|
469
469
|
}
|
|
470
|
-
const attrs =
|
|
470
|
+
const attrs = getAttrsForAppearance(appearance, selectedNode, state.selection.$from.parent.type.name === 'bodiedSyncBlock');
|
|
471
471
|
const {
|
|
472
472
|
from,
|
|
473
473
|
to
|
|
@@ -14,7 +14,6 @@ import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from '@atlaskit
|
|
|
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
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
17
|
// Layouts where the left handle is the only resize handle today.
|
|
19
18
|
// These must keep the left handle.
|
|
20
19
|
// Remove during 'platform_editor_lovability_resize_dividers_panels' cleanup
|
|
@@ -124,7 +123,7 @@ export default class ResizableEmbedCard extends React.Component {
|
|
|
124
123
|
} = this.props.view.state.schema.nodes;
|
|
125
124
|
|
|
126
125
|
// Hide resizing guideline when embed is nested
|
|
127
|
-
if (this.$pos && !!findParentNodeOfTypeClosestToPos(this.$pos,
|
|
126
|
+
if (this.$pos && !!findParentNodeOfTypeClosestToPos(this.$pos, [layoutColumn, table, expand, nestedExpand, bodiedSyncBlock])) {
|
|
128
127
|
return [];
|
|
129
128
|
}
|
|
130
129
|
if (snapWidth > this.wideLayoutWidth) {
|
|
@@ -399,7 +398,7 @@ export default class ResizableEmbedCard extends React.Component {
|
|
|
399
398
|
scaleFactor: !this.wrappedLayout && !this.insideInlineLike ? 2 : 1,
|
|
400
399
|
highlights: this.highlights,
|
|
401
400
|
nodeType: "embed",
|
|
402
|
-
onResizeStart:
|
|
401
|
+
onResizeStart: this.handleResizeStart,
|
|
403
402
|
handleStyles: nestedInTableHandleStyles(this.isNestedInTable())
|
|
404
403
|
// Ignored via go/ees005
|
|
405
404
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -497,7 +497,7 @@ export var setSelectedCardAppearance = function setSelectedCardAppearance(appear
|
|
|
497
497
|
if (appearanceForNodeType(selectedNode.type) === appearance && !selectedNode.attrs.datasource) {
|
|
498
498
|
return false;
|
|
499
499
|
}
|
|
500
|
-
var attrs =
|
|
500
|
+
var attrs = getAttrsForAppearance(appearance, selectedNode, state.selection.$from.parent.type.name === 'bodiedSyncBlock');
|
|
501
501
|
var _state$selection = state.selection,
|
|
502
502
|
from = _state$selection.from,
|
|
503
503
|
to = _state$selection.to;
|
|
@@ -23,7 +23,6 @@ import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from '@atlaskit
|
|
|
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
25
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
26
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
27
26
|
// Layouts where the left handle is the only resize handle today.
|
|
28
27
|
// These must keep the left handle.
|
|
29
28
|
// Remove during 'platform_editor_lovability_resize_dividers_panels' cleanup
|
|
@@ -126,7 +125,7 @@ var ResizableEmbedCard = /*#__PURE__*/function (_React$Component) {
|
|
|
126
125
|
bodiedSyncBlock = _this$props$view$stat.bodiedSyncBlock;
|
|
127
126
|
|
|
128
127
|
// Hide resizing guideline when embed is nested
|
|
129
|
-
if (_this.$pos && !!findParentNodeOfTypeClosestToPos(_this.$pos,
|
|
128
|
+
if (_this.$pos && !!findParentNodeOfTypeClosestToPos(_this.$pos, [layoutColumn, table, expand, nestedExpand, bodiedSyncBlock])) {
|
|
130
129
|
return [];
|
|
131
130
|
}
|
|
132
131
|
if (snapWidth > _this.wideLayoutWidth) {
|
|
@@ -413,7 +412,7 @@ var ResizableEmbedCard = /*#__PURE__*/function (_React$Component) {
|
|
|
413
412
|
scaleFactor: !this.wrappedLayout && !this.insideInlineLike ? 2 : 1,
|
|
414
413
|
highlights: this.highlights,
|
|
415
414
|
nodeType: "embed",
|
|
416
|
-
onResizeStart:
|
|
415
|
+
onResizeStart: this.handleResizeStart,
|
|
417
416
|
handleStyles: nestedInTableHandleStyles(this.isNestedInTable())
|
|
418
417
|
// Ignored via go/ees005
|
|
419
418
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.3",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -52,16 +52,16 @@
|
|
|
52
52
|
"@atlaskit/link-client-extension": "^7.1.0",
|
|
53
53
|
"@atlaskit/link-datasource": "^6.4.0",
|
|
54
54
|
"@atlaskit/link-extractors": "^4.0.0",
|
|
55
|
-
"@atlaskit/linking-common": "^11.
|
|
55
|
+
"@atlaskit/linking-common": "^11.2.0",
|
|
56
56
|
"@atlaskit/linking-types": "^15.0.0",
|
|
57
57
|
"@atlaskit/menu": "^10.0.0",
|
|
58
58
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
59
59
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
60
60
|
"@atlaskit/platform-feature-flags-react": "^1.1.0",
|
|
61
61
|
"@atlaskit/primitives": "^22.2.0",
|
|
62
|
-
"@atlaskit/prosemirror-history": "^1.
|
|
62
|
+
"@atlaskit/prosemirror-history": "^1.2.0",
|
|
63
63
|
"@atlaskit/smart-card": "^45.17.0",
|
|
64
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
64
|
+
"@atlaskit/tmp-editor-statsig": "^149.0.0",
|
|
65
65
|
"@atlaskit/tokens": "^16.7.0",
|
|
66
66
|
"@babel/runtime": "^7.0.0",
|
|
67
67
|
"@emotion/react": "^11.7.1",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"uuid": "^3.1.0"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"@atlaskit/editor-common": "^119.
|
|
74
|
+
"@atlaskit/editor-common": "^119.7.0",
|
|
75
75
|
"@atlaskit/link-provider": "^5.3.0",
|
|
76
76
|
"react": "^18.2.0 || ^19.2.0",
|
|
77
77
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|