@atlaskit/editor-plugin-card 4.5.10 → 4.5.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
|
@@ -265,7 +265,7 @@ export class EmbedCardComponent extends React.PureComponent {
|
|
|
265
265
|
actionOptions,
|
|
266
266
|
onClick
|
|
267
267
|
} = this.props;
|
|
268
|
-
|
|
268
|
+
const {
|
|
269
269
|
url,
|
|
270
270
|
width: pctWidth,
|
|
271
271
|
layout,
|
|
@@ -280,7 +280,7 @@ export class EmbedCardComponent extends React.PureComponent {
|
|
|
280
280
|
|
|
281
281
|
// We don't want to use `originalHeight` when `originalWidth` also present,
|
|
282
282
|
// since `heightAlone` is defined only when just height is available.
|
|
283
|
-
|
|
283
|
+
const heightAlone = liveHeight !== null && liveHeight !== void 0 ? liveHeight : !originalWidth && originalHeight || undefined;
|
|
284
284
|
const aspectRatio = !heightAlone && (
|
|
285
285
|
// No need getting aspectRatio if heightAlone defined already
|
|
286
286
|
initialAspectRatio ||
|
|
@@ -72,7 +72,7 @@ export const replaceQueuedUrlWithCard = (url, cardData, analyticsAction, editorA
|
|
|
72
72
|
// try to transform response to ADF
|
|
73
73
|
const schema = editorState.schema;
|
|
74
74
|
const cardAdf = processRawValue(schema, cardData);
|
|
75
|
-
|
|
75
|
+
const tr = editorState.tr;
|
|
76
76
|
if (cardAdf) {
|
|
77
77
|
// Should prevent any other node than cards? [inlineCard, blockCard].includes(cardAdf.type)
|
|
78
78
|
const nodeContexts = requests.map(request => replaceLinksToCards(tr, cardAdf, schema, request)).filter(context => !!context); // context exist
|
|
@@ -193,7 +193,7 @@ export const queueCardFromChangedTr = (state, tr, source, analyticsAction, norma
|
|
|
193
193
|
const {
|
|
194
194
|
link
|
|
195
195
|
} = schema.marks;
|
|
196
|
-
|
|
196
|
+
const requests = [];
|
|
197
197
|
nodesBetweenChanged(tr, (node, pos) => {
|
|
198
198
|
if (!node.isText) {
|
|
199
199
|
return true;
|
|
@@ -38,7 +38,7 @@ export const resolveWithProvider = (view, provider, request, options, editorAnal
|
|
|
38
38
|
const isEmbedFriendlyLocation = fg('hardcoded-embeds-only-on-new-line') ? isFreshlyPastedOnNewLine(view) : true;
|
|
39
39
|
|
|
40
40
|
// When user manually changes appearance from blue link to smart link, we should respect that,
|
|
41
|
-
|
|
41
|
+
const shouldForceAppearance =
|
|
42
42
|
// This flag is set to true only in one place atm:
|
|
43
43
|
// packages/editor/editor-core/src/plugins/card/pm-plugins/doc.ts @ convertHyperlinkToSmartCard
|
|
44
44
|
// Which is used when user switching from URL to smart link appearance.
|
|
@@ -223,7 +223,7 @@ export default class ResizableEmbedCard extends React.Component {
|
|
|
223
223
|
// full width
|
|
224
224
|
snapTargets.push(lineLength - offsetLeft);
|
|
225
225
|
const minimumWidth = calcPxFromColumns(this.wrappedLayout || this.insideInlineLike ? 1 : 2, lineLength, this.props.gridSize);
|
|
226
|
-
|
|
226
|
+
const snapPoints = snapTargets.filter(width => width >= minimumWidth);
|
|
227
227
|
const $pos = this.$pos;
|
|
228
228
|
if (!$pos) {
|
|
229
229
|
return snapPoints;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.11",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
35
35
|
"@atlaskit/analytics-next": "^10.2.0",
|
|
36
36
|
"@atlaskit/custom-steps": "^0.9.0",
|
|
37
|
-
"@atlaskit/editor-common": "^
|
|
37
|
+
"@atlaskit/editor-common": "^98.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
39
39
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
40
40
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"@atlaskit/menu": "2.13.7",
|
|
56
56
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
57
57
|
"@atlaskit/primitives": "^13.3.0",
|
|
58
|
-
"@atlaskit/smart-card": "^33.
|
|
58
|
+
"@atlaskit/smart-card": "^33.3.0",
|
|
59
59
|
"@atlaskit/theme": "^14.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^2.31.0",
|
|
61
61
|
"@atlaskit/tokens": "^2.5.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|
|
63
63
|
"@emotion/react": "^11.7.1",
|