@atlaskit/native-embeds-common 2.1.1 → 2.2.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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/native-embeds-common
2
2
 
3
+ ## 2.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`53006a460ecb2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/53006a460ecb2) -
8
+ [ux] Allow opted-in native embed experiences to use the editor text layout width as their maximum
9
+ width when the `platform_native_embeds_max_width` dynamic configuration is enabled. MAUI opts in
10
+ to the new `allowMaxWidth` manifest capability. Other experiences can opt in with:
11
+
12
+ ```ts
13
+ const MyExperienceManifest: ExperienceManifest = {
14
+ allowMaxWidth: true,
15
+ // other manifest fields
16
+ };
17
+ ```
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 2.1.1
4
24
 
5
25
  ### Patch Changes
@@ -48,6 +48,7 @@ var NATIVE_EMBED_PARAMETER_DEFAULTS = exports.NATIVE_EMBED_PARAMETER_DEFAULTS =
48
48
  borderSize: undefined,
49
49
  displayText: undefined,
50
50
  height: 600,
51
+ isMaxWidth: false,
51
52
  aspectRatio: 1,
52
53
  width: undefined
53
54
  };
@@ -44,6 +44,7 @@ var PARAMETER_TYPES = {
44
44
  borderSize: 'number',
45
45
  displayText: 'string',
46
46
  height: 'number',
47
+ isMaxWidth: 'boolean',
47
48
  url: 'string',
48
49
  width: 'number'
49
50
  };
@@ -42,6 +42,7 @@ export const NATIVE_EMBED_PARAMETER_DEFAULTS = {
42
42
  borderSize: undefined,
43
43
  displayText: undefined,
44
44
  height: 600,
45
+ isMaxWidth: false,
45
46
  aspectRatio: 1,
46
47
  width: undefined
47
48
  };
@@ -28,6 +28,7 @@ const PARAMETER_TYPES = {
28
28
  borderSize: 'number',
29
29
  displayText: 'string',
30
30
  height: 'number',
31
+ isMaxWidth: 'boolean',
31
32
  url: 'string',
32
33
  width: 'number'
33
34
  };
@@ -42,6 +42,7 @@ export var NATIVE_EMBED_PARAMETER_DEFAULTS = {
42
42
  borderSize: undefined,
43
43
  displayText: undefined,
44
44
  height: 600,
45
+ isMaxWidth: false,
45
46
  aspectRatio: 1,
46
47
  width: undefined
47
48
  };
@@ -35,6 +35,7 @@ var PARAMETER_TYPES = {
35
35
  borderSize: 'number',
36
36
  displayText: 'string',
37
37
  height: 'number',
38
+ isMaxWidth: 'boolean',
38
39
  url: 'string',
39
40
  width: 'number'
40
41
  };
@@ -20,6 +20,12 @@ export type NativeEmbedParameterValues = {
20
20
  borderSize?: number;
21
21
  displayText?: string;
22
22
  height: number;
23
+ /**
24
+ * Whether the embed should follow the editor text layout maximum width.
25
+ *
26
+ * Omitted for existing embeds; parameter resolution treats an omitted value as `false`.
27
+ */
28
+ isMaxWidth?: boolean;
23
29
  url?: string;
24
30
  width?: number;
25
31
  };
@@ -35,6 +41,7 @@ export type NativeEmbedParameters = {
35
41
  borderSize?: NativeEmbedParameterValue;
36
42
  displayText?: NativeEmbedParameterValue;
37
43
  height?: NativeEmbedParameterValue;
44
+ isMaxWidth?: NativeEmbedParameterValue;
38
45
  url?: NativeEmbedParameterValue;
39
46
  width?: NativeEmbedParameterValue;
40
47
  };
package/package.json CHANGED
@@ -17,13 +17,13 @@
17
17
  "atlaskit:src": "src/index.ts",
18
18
  "dependencies": {
19
19
  "@atlaskit/button": "^24.3.0",
20
- "@atlaskit/editor-common": "^116.25.0",
20
+ "@atlaskit/editor-common": "^116.30.0",
21
21
  "@atlaskit/editor-plugin-local-id": "^10.1.0",
22
22
  "@atlaskit/editor-prosemirror": "^8.0.0",
23
23
  "@atlaskit/heading": "^6.2.0",
24
24
  "@atlaskit/icon": "^37.0.0",
25
- "@atlaskit/primitives": "^20.5.0",
26
- "@atlaskit/tokens": "^15.5.0",
25
+ "@atlaskit/primitives": "^20.6.0",
26
+ "@atlaskit/tokens": "^15.8.0",
27
27
  "@atlassian/afm-i18n-platform-native-embeds-native-embeds-common": "1.7.0",
28
28
  "@babel/runtime": "^7.0.0",
29
29
  "@compiled/react": "^0.20.0"
@@ -80,7 +80,7 @@
80
80
  }
81
81
  },
82
82
  "name": "@atlaskit/native-embeds-common",
83
- "version": "2.1.1",
83
+ "version": "2.2.0",
84
84
  "description": "A shared package for native embeds to be used across experiences and plugin",
85
85
  "author": "Atlassian Pty Ltd",
86
86
  "license": "Apache-2.0",