@atlaskit/adf-schema 25.8.3 → 25.9.1

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,17 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 25.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`bf7e8e4968b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bf7e8e4968b) - ED-15895 add unsupportedinline support to caption
8
+
9
+ ## 25.9.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`6de13a329d4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6de13a329d4) - Move `width` and `layout` out from `datasource` into `attr` root (context blockCard node)
14
+
3
15
  ## 25.8.3
4
16
 
5
17
  ### Patch Changes
@@ -1,9 +1,13 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.blockCard = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
11
  /**
8
12
  * @stage 0
9
13
  */
@@ -12,6 +16,17 @@ exports.blockCard = void 0;
12
16
  * @name blockCard_node
13
17
  */
14
18
 
19
+ var getCommonAttributesFromDom = function getCommonAttributesFromDom(dom) {
20
+ var anchor = dom;
21
+ var data = anchor.getAttribute('data-card-data');
22
+ var datasource = anchor.getAttribute('data-datasource');
23
+ return {
24
+ data: data ? JSON.parse(data) : undefined,
25
+ layout: datasource ? dom.getAttribute('data-layout') || 'center' : undefined,
26
+ width: Number(dom.getAttribute('data-width')) || undefined,
27
+ datasource: datasource ? JSON.parse(datasource) : undefined
28
+ };
29
+ };
15
30
  var blockCard = {
16
31
  inline: false,
17
32
  group: 'block',
@@ -26,6 +41,12 @@ var blockCard = {
26
41
  },
27
42
  datasource: {
28
43
  default: null
44
+ },
45
+ layout: {
46
+ default: null
47
+ },
48
+ width: {
49
+ default: null
29
50
  }
30
51
  },
31
52
  parseDOM: [{
@@ -34,34 +55,36 @@ var blockCard = {
34
55
  priority: 100,
35
56
  getAttrs: function getAttrs(dom) {
36
57
  var anchor = dom;
37
- var data = anchor.getAttribute('data-card-data');
38
- var datasource = anchor.getAttribute('data-datasource');
39
- return {
40
- url: anchor.getAttribute('href') || null,
41
- data: data ? JSON.parse(data) : null,
42
- datasource: datasource ? JSON.parse(datasource) : null
43
- };
58
+ return _objectSpread({
59
+ url: anchor.getAttribute('href') || undefined
60
+ }, getCommonAttributesFromDom(dom));
44
61
  }
45
62
  }, {
46
63
  tag: 'div[data-block-card]',
47
64
  getAttrs: function getAttrs(dom) {
48
65
  var anchor = dom;
49
- var data = anchor.getAttribute('data-card-data');
50
- var datasource = anchor.getAttribute('data-datasource');
51
- return {
52
- url: anchor.getAttribute('data-card-url') || null,
53
- data: data ? JSON.parse(data) : null,
54
- datasource: datasource ? JSON.parse(datasource) : null
55
- };
66
+ return _objectSpread({
67
+ url: anchor.getAttribute('data-card-url') || undefined
68
+ }, getCommonAttributesFromDom(dom));
56
69
  }
57
70
  }],
58
71
  toDOM: function toDOM(node) {
59
72
  var _node$attrs;
73
+ var _ref = node.attrs,
74
+ url = _ref.url;
75
+ var _ref2 = node.attrs,
76
+ data = _ref2.data;
77
+ var _ref3 = node.attrs,
78
+ layout = _ref3.layout,
79
+ width = _ref3.width,
80
+ datasource = _ref3.datasource;
60
81
  var attrs = {
61
82
  'data-block-card': '',
62
- href: node.attrs.url || '',
63
- 'data-card-data': node.attrs.data ? JSON.stringify(node.attrs.data) : '',
64
- 'data-datasource': node.attrs.datasource ? JSON.stringify(node.attrs.datasource) : ''
83
+ href: url || '',
84
+ 'data-card-data': data ? JSON.stringify(data) : '',
85
+ 'data-datasource': datasource ? JSON.stringify(datasource) : '',
86
+ 'data-layout': layout,
87
+ 'data-width': "".concat(width)
65
88
  };
66
89
  return ['a', attrs, (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.url) || ' '];
67
90
  }
@@ -9,7 +9,7 @@ exports.caption = void 0;
9
9
  */
10
10
 
11
11
  var caption = {
12
- content: '(text|hardBreak|mention|emoji|date|placeholder|inlineCard|status)*',
12
+ content: '(text|hardBreak|mention|emoji|date|placeholder|inlineCard|status|unsupportedInline)*',
13
13
  isolating: true,
14
14
  marks: '_',
15
15
  selectable: false,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "25.8.3",
3
+ "version": "25.9.1",
4
4
  "sideEffects": false
5
5
  }
@@ -6,6 +6,17 @@
6
6
  * @name blockCard_node
7
7
  */
8
8
 
9
+ const getCommonAttributesFromDom = dom => {
10
+ const anchor = dom;
11
+ const data = anchor.getAttribute('data-card-data');
12
+ const datasource = anchor.getAttribute('data-datasource');
13
+ return {
14
+ data: data ? JSON.parse(data) : undefined,
15
+ layout: datasource ? dom.getAttribute('data-layout') || 'center' : undefined,
16
+ width: Number(dom.getAttribute('data-width')) || undefined,
17
+ datasource: datasource ? JSON.parse(datasource) : undefined
18
+ };
19
+ };
9
20
  export const blockCard = {
10
21
  inline: false,
11
22
  group: 'block',
@@ -20,6 +31,12 @@ export const blockCard = {
20
31
  },
21
32
  datasource: {
22
33
  default: null
34
+ },
35
+ layout: {
36
+ default: null
37
+ },
38
+ width: {
39
+ default: null
23
40
  }
24
41
  },
25
42
  parseDOM: [{
@@ -28,34 +45,41 @@ export const blockCard = {
28
45
  priority: 100,
29
46
  getAttrs: dom => {
30
47
  const anchor = dom;
31
- const data = anchor.getAttribute('data-card-data');
32
- const datasource = anchor.getAttribute('data-datasource');
33
48
  return {
34
- url: anchor.getAttribute('href') || null,
35
- data: data ? JSON.parse(data) : null,
36
- datasource: datasource ? JSON.parse(datasource) : null
49
+ url: anchor.getAttribute('href') || undefined,
50
+ ...getCommonAttributesFromDom(dom)
37
51
  };
38
52
  }
39
53
  }, {
40
54
  tag: 'div[data-block-card]',
41
55
  getAttrs: dom => {
42
56
  const anchor = dom;
43
- const data = anchor.getAttribute('data-card-data');
44
- const datasource = anchor.getAttribute('data-datasource');
45
57
  return {
46
- url: anchor.getAttribute('data-card-url') || null,
47
- data: data ? JSON.parse(data) : null,
48
- datasource: datasource ? JSON.parse(datasource) : null
58
+ url: anchor.getAttribute('data-card-url') || undefined,
59
+ ...getCommonAttributesFromDom(dom)
49
60
  };
50
61
  }
51
62
  }],
52
63
  toDOM(node) {
53
64
  var _node$attrs;
65
+ const {
66
+ url
67
+ } = node.attrs;
68
+ const {
69
+ data
70
+ } = node.attrs;
71
+ const {
72
+ layout,
73
+ width,
74
+ datasource
75
+ } = node.attrs;
54
76
  const attrs = {
55
77
  'data-block-card': '',
56
- href: node.attrs.url || '',
57
- 'data-card-data': node.attrs.data ? JSON.stringify(node.attrs.data) : '',
58
- 'data-datasource': node.attrs.datasource ? JSON.stringify(node.attrs.datasource) : ''
78
+ href: url || '',
79
+ 'data-card-data': data ? JSON.stringify(data) : '',
80
+ 'data-datasource': datasource ? JSON.stringify(datasource) : '',
81
+ 'data-layout': layout,
82
+ 'data-width': `${width}`
59
83
  };
60
84
  return ['a', attrs, (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.url) || ' '];
61
85
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  export const caption = {
6
- content: '(text|hardBreak|mention|emoji|date|placeholder|inlineCard|status)*',
6
+ content: '(text|hardBreak|mention|emoji|date|placeholder|inlineCard|status|unsupportedInline)*',
7
7
  isolating: true,
8
8
  marks: '_',
9
9
  selectable: false,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "25.8.3",
3
+ "version": "25.9.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,3 +1,6 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1
4
  /**
2
5
  * @stage 0
3
6
  */
@@ -6,6 +9,17 @@
6
9
  * @name blockCard_node
7
10
  */
8
11
 
12
+ var getCommonAttributesFromDom = function getCommonAttributesFromDom(dom) {
13
+ var anchor = dom;
14
+ var data = anchor.getAttribute('data-card-data');
15
+ var datasource = anchor.getAttribute('data-datasource');
16
+ return {
17
+ data: data ? JSON.parse(data) : undefined,
18
+ layout: datasource ? dom.getAttribute('data-layout') || 'center' : undefined,
19
+ width: Number(dom.getAttribute('data-width')) || undefined,
20
+ datasource: datasource ? JSON.parse(datasource) : undefined
21
+ };
22
+ };
9
23
  export var blockCard = {
10
24
  inline: false,
11
25
  group: 'block',
@@ -20,6 +34,12 @@ export var blockCard = {
20
34
  },
21
35
  datasource: {
22
36
  default: null
37
+ },
38
+ layout: {
39
+ default: null
40
+ },
41
+ width: {
42
+ default: null
23
43
  }
24
44
  },
25
45
  parseDOM: [{
@@ -28,34 +48,36 @@ export var blockCard = {
28
48
  priority: 100,
29
49
  getAttrs: function getAttrs(dom) {
30
50
  var anchor = dom;
31
- var data = anchor.getAttribute('data-card-data');
32
- var datasource = anchor.getAttribute('data-datasource');
33
- return {
34
- url: anchor.getAttribute('href') || null,
35
- data: data ? JSON.parse(data) : null,
36
- datasource: datasource ? JSON.parse(datasource) : null
37
- };
51
+ return _objectSpread({
52
+ url: anchor.getAttribute('href') || undefined
53
+ }, getCommonAttributesFromDom(dom));
38
54
  }
39
55
  }, {
40
56
  tag: 'div[data-block-card]',
41
57
  getAttrs: function getAttrs(dom) {
42
58
  var anchor = dom;
43
- var data = anchor.getAttribute('data-card-data');
44
- var datasource = anchor.getAttribute('data-datasource');
45
- return {
46
- url: anchor.getAttribute('data-card-url') || null,
47
- data: data ? JSON.parse(data) : null,
48
- datasource: datasource ? JSON.parse(datasource) : null
49
- };
59
+ return _objectSpread({
60
+ url: anchor.getAttribute('data-card-url') || undefined
61
+ }, getCommonAttributesFromDom(dom));
50
62
  }
51
63
  }],
52
64
  toDOM: function toDOM(node) {
53
65
  var _node$attrs;
66
+ var _ref = node.attrs,
67
+ url = _ref.url;
68
+ var _ref2 = node.attrs,
69
+ data = _ref2.data;
70
+ var _ref3 = node.attrs,
71
+ layout = _ref3.layout,
72
+ width = _ref3.width,
73
+ datasource = _ref3.datasource;
54
74
  var attrs = {
55
75
  'data-block-card': '',
56
- href: node.attrs.url || '',
57
- 'data-card-data': node.attrs.data ? JSON.stringify(node.attrs.data) : '',
58
- 'data-datasource': node.attrs.datasource ? JSON.stringify(node.attrs.datasource) : ''
76
+ href: url || '',
77
+ 'data-card-data': data ? JSON.stringify(data) : '',
78
+ 'data-datasource': datasource ? JSON.stringify(datasource) : '',
79
+ 'data-layout': layout,
80
+ 'data-width': "".concat(width)
59
81
  };
60
82
  return ['a', attrs, (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.url) || ' '];
61
83
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  export var caption = {
6
- content: '(text|hardBreak|mention|emoji|date|placeholder|inlineCard|status)*',
6
+ content: '(text|hardBreak|mention|emoji|date|placeholder|inlineCard|status|unsupportedInline)*',
7
7
  isolating: true,
8
8
  marks: '_',
9
9
  selectable: false,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "25.8.3",
3
+ "version": "25.9.1",
4
4
  "sideEffects": false
5
5
  }
@@ -774,32 +774,30 @@
774
774
  "type"
775
775
  ],
776
776
  "additionalProperties": false
777
- }
778
- },
779
- "width": {
780
- "type": "number",
781
- "minimum": 0,
782
- "maximum": 100
783
- },
784
- "layout": {
785
- "enum": [
786
- "wide",
787
- "full-width",
788
- "center",
789
- "wrap-right",
790
- "wrap-left",
791
- "align-end",
792
- "align-start"
793
- ]
777
+ },
778
+ "minItems": 1
794
779
  }
795
780
  },
796
781
  "required": [
797
782
  "id",
798
783
  "parameters",
799
- "views",
800
- "layout"
784
+ "views"
801
785
  ],
802
786
  "additionalProperties": false
787
+ },
788
+ "width": {
789
+ "type": "number"
790
+ },
791
+ "layout": {
792
+ "enum": [
793
+ "wide",
794
+ "full-width",
795
+ "center",
796
+ "wrap-right",
797
+ "wrap-left",
798
+ "align-end",
799
+ "align-start"
800
+ ]
803
801
  }
804
802
  },
805
803
  "additionalProperties": false,
@@ -1,5 +1,5 @@
1
1
  import { NodeSpec } from 'prosemirror-model';
2
- import { RichMediaAttributes } from './types/rich-media-common';
2
+ import { OptionalRichMediaAttributes } from './types/rich-media-common';
3
3
  export interface UrlType {
4
4
  /**
5
5
  * @validatorFn safeUrl
@@ -12,18 +12,21 @@ export interface DataType {
12
12
  */
13
13
  data: object;
14
14
  }
15
- export interface DatasourceAttributeProperties extends RichMediaAttributes {
15
+ export interface DatasourceAttributeProperties {
16
16
  id: string;
17
17
  parameters: object;
18
- views: [{
18
+ /**
19
+ * @minItems 1
20
+ */
21
+ views: {
19
22
  type: string;
20
23
  properties?: object;
21
- }];
24
+ }[];
22
25
  }
23
26
  /**
24
27
  * @stage 0
25
28
  */
26
- export interface DatasourceAttributes {
29
+ export interface DatasourceAttributes extends OptionalRichMediaAttributes {
27
30
  /**
28
31
  * @validatorFn safeUrl
29
32
  */
@@ -14,6 +14,7 @@ export interface CaptionDefinition {
14
14
  type: 'caption';
15
15
  /**
16
16
  * @minItems 0
17
+ * @allowUnsupportedInline true
17
18
  */
18
19
  content: Array<InlineFormattedText | InlineCode | HardBreak | Mention | Emoji | Date | Placeholder | InlineCard | Status>;
19
20
  }
@@ -7,3 +7,7 @@ export interface RichMediaAttributes {
7
7
  width?: number;
8
8
  layout: Layout;
9
9
  }
10
+ export interface OptionalRichMediaAttributes {
11
+ width?: number;
12
+ layout?: Layout;
13
+ }
@@ -1,5 +1,5 @@
1
1
  import { NodeSpec } from 'prosemirror-model';
2
- import { RichMediaAttributes } from './types/rich-media-common';
2
+ import { OptionalRichMediaAttributes } from './types/rich-media-common';
3
3
  export interface UrlType {
4
4
  /**
5
5
  * @validatorFn safeUrl
@@ -12,20 +12,21 @@ export interface DataType {
12
12
  */
13
13
  data: object;
14
14
  }
15
- export interface DatasourceAttributeProperties extends RichMediaAttributes {
15
+ export interface DatasourceAttributeProperties {
16
16
  id: string;
17
17
  parameters: object;
18
- views: [
19
- {
20
- type: string;
21
- properties?: object;
22
- }
23
- ];
18
+ /**
19
+ * @minItems 1
20
+ */
21
+ views: {
22
+ type: string;
23
+ properties?: object;
24
+ }[];
24
25
  }
25
26
  /**
26
27
  * @stage 0
27
28
  */
28
- export interface DatasourceAttributes {
29
+ export interface DatasourceAttributes extends OptionalRichMediaAttributes {
29
30
  /**
30
31
  * @validatorFn safeUrl
31
32
  */
@@ -14,6 +14,7 @@ export interface CaptionDefinition {
14
14
  type: 'caption';
15
15
  /**
16
16
  * @minItems 0
17
+ * @allowUnsupportedInline true
17
18
  */
18
19
  content: Array<InlineFormattedText | InlineCode | HardBreak | Mention | Emoji | Date | Placeholder | InlineCard | Status>;
19
20
  }
@@ -7,3 +7,7 @@ export interface RichMediaAttributes {
7
7
  width?: number;
8
8
  layout: Layout;
9
9
  }
10
+ export interface OptionalRichMediaAttributes {
11
+ width?: number;
12
+ layout?: Layout;
13
+ }
@@ -774,32 +774,30 @@
774
774
  "type"
775
775
  ],
776
776
  "additionalProperties": false
777
- }
778
- },
779
- "width": {
780
- "type": "number",
781
- "minimum": 0,
782
- "maximum": 100
783
- },
784
- "layout": {
785
- "enum": [
786
- "wide",
787
- "full-width",
788
- "center",
789
- "wrap-right",
790
- "wrap-left",
791
- "align-end",
792
- "align-start"
793
- ]
777
+ },
778
+ "minItems": 1
794
779
  }
795
780
  },
796
781
  "required": [
797
782
  "id",
798
783
  "parameters",
799
- "views",
800
- "layout"
784
+ "views"
801
785
  ],
802
786
  "additionalProperties": false
787
+ },
788
+ "width": {
789
+ "type": "number"
790
+ },
791
+ "layout": {
792
+ "enum": [
793
+ "wide",
794
+ "full-width",
795
+ "center",
796
+ "wrap-right",
797
+ "wrap-left",
798
+ "align-end",
799
+ "align-start"
800
+ ]
803
801
  }
804
802
  },
805
803
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "25.8.3",
3
+ "version": "25.9.1",
4
4
  "description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -58,7 +58,7 @@
58
58
  "prosemirror-transform": "1.3.2"
59
59
  },
60
60
  "devDependencies": {
61
- "@atlaskit/editor-test-helpers": "^18.6.0",
61
+ "@atlaskit/editor-test-helpers": "^18.7.0",
62
62
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
63
63
  "@types/linkify-it": "^2.0.4",
64
64
  "@types/prosemirror-history": "^1.0.1",
package/report.api.md CHANGED
@@ -276,7 +276,6 @@ export const caption: NodeSpec;
276
276
 
277
277
  // @public
278
278
  export interface CaptionDefinition {
279
- // (undocumented)
280
279
  content: Array<
281
280
  | DateDefinition
282
281
  | EmojiDefinition
@@ -427,22 +426,20 @@ export const dataConsumerToJSON: (mark: Mark) => {
427
426
  };
428
427
 
429
428
  // @public (undocumented)
430
- interface DatasourceAttributeProperties extends RichMediaAttributes {
429
+ interface DatasourceAttributeProperties {
431
430
  // (undocumented)
432
431
  id: string;
433
432
  // (undocumented)
434
433
  parameters: object;
435
434
  // (undocumented)
436
- views: [
437
- {
438
- type: string;
439
- properties?: object;
440
- },
441
- ];
435
+ views: {
436
+ type: string;
437
+ properties?: object;
438
+ }[];
442
439
  }
443
440
 
444
441
  // @public (undocumented)
445
- export interface DatasourceAttributes {
442
+ export interface DatasourceAttributes extends OptionalRichMediaAttributes {
446
443
  // (undocumented)
447
444
  datasource: DatasourceAttributeProperties;
448
445
  url?: string;
@@ -1290,6 +1287,14 @@ export function normalizeHexColor(
1290
1287
  // @public
1291
1288
  export function normalizeUrl(url?: string): string;
1292
1289
 
1290
+ // @public (undocumented)
1291
+ interface OptionalRichMediaAttributes {
1292
+ // (undocumented)
1293
+ layout?: RichMediaLayout;
1294
+ // (undocumented)
1295
+ width?: number;
1296
+ }
1297
+
1293
1298
  // @public (undocumented)
1294
1299
  export const orderedList: NodeSpec;
1295
1300
 
@@ -240,7 +240,6 @@ export const caption: NodeSpec;
240
240
 
241
241
  // @public
242
242
  export interface CaptionDefinition {
243
- // (undocumented)
244
243
  content: Array<DateDefinition | EmojiDefinition | HardBreakDefinition | InlineCardDefinition | InlineCode | InlineFormattedText | MentionDefinition | PlaceholderDefinition | StatusDefinition>;
245
244
  // (undocumented)
246
245
  type: 'caption';
@@ -373,20 +372,20 @@ export const dataConsumerToJSON: (mark: Mark) => {
373
372
  };
374
373
 
375
374
  // @public (undocumented)
376
- interface DatasourceAttributeProperties extends RichMediaAttributes {
375
+ interface DatasourceAttributeProperties {
377
376
  // (undocumented)
378
377
  id: string;
379
378
  // (undocumented)
380
379
  parameters: object;
381
380
  // (undocumented)
382
- views: [{
381
+ views: {
383
382
  type: string;
384
383
  properties?: object;
385
- }];
384
+ }[];
386
385
  }
387
386
 
388
387
  // @public (undocumented)
389
- export interface DatasourceAttributes {
388
+ export interface DatasourceAttributes extends OptionalRichMediaAttributes {
390
389
  // (undocumented)
391
390
  datasource: DatasourceAttributeProperties;
392
391
  url?: string;
@@ -1157,6 +1156,14 @@ export function normalizeHexColor(color: null | string, defaultColor?: string):
1157
1156
  // @public
1158
1157
  export function normalizeUrl(url?: string): string;
1159
1158
 
1159
+ // @public (undocumented)
1160
+ interface OptionalRichMediaAttributes {
1161
+ // (undocumented)
1162
+ layout?: RichMediaLayout;
1163
+ // (undocumented)
1164
+ width?: number;
1165
+ }
1166
+
1160
1167
  // @public (undocumented)
1161
1168
  export const orderedList: NodeSpec;
1162
1169