@atlaskit/adf-schema 49.0.6 → 49.1.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.
Files changed (181) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/index.js +114 -0
  3. package/dist/cjs/next-schema/generated/nodeTypes.js +118 -1
  4. package/dist/cjs/next-schema/nodes/blockCard.js +15 -0
  5. package/dist/cjs/next-schema/nodes/blockquote.js +16 -2
  6. package/dist/cjs/next-schema/nodes/caption.js +7 -0
  7. package/dist/cjs/next-schema/nodes/codeBlock.js +5 -0
  8. package/dist/cjs/next-schema/nodes/date.js +5 -0
  9. package/dist/cjs/next-schema/nodes/embedCard.js +5 -0
  10. package/dist/cjs/next-schema/nodes/emoji.js +5 -0
  11. package/dist/cjs/next-schema/nodes/expand.js +5 -0
  12. package/dist/cjs/next-schema/nodes/hardBreak.js +5 -0
  13. package/dist/cjs/next-schema/nodes/inlineCard.js +10 -0
  14. package/dist/cjs/next-schema/nodes/layoutColumn.js +5 -0
  15. package/dist/cjs/next-schema/nodes/layoutSection.js +12 -0
  16. package/dist/cjs/next-schema/nodes/list.js +20 -1
  17. package/dist/cjs/next-schema/nodes/media.js +10 -0
  18. package/dist/cjs/next-schema/nodes/mediaInline.js +5 -0
  19. package/dist/cjs/next-schema/nodes/mediaSingle.js +10 -0
  20. package/dist/cjs/next-schema/nodes/nestedExpand.js +5 -0
  21. package/dist/cjs/next-schema/nodes/panel.js +5 -0
  22. package/dist/cjs/next-schema/nodes/placeholder.js +5 -0
  23. package/dist/cjs/next-schema/nodes/rule.js +9 -1
  24. package/dist/cjs/schema/index.js +120 -0
  25. package/dist/cjs/schema/nodes/block-card.js +48 -1
  26. package/dist/cjs/schema/nodes/blockquote.js +20 -2
  27. package/dist/cjs/schema/nodes/bullet-list.js +20 -1
  28. package/dist/cjs/schema/nodes/caption.js +20 -1
  29. package/dist/cjs/schema/nodes/code-block.js +72 -2
  30. package/dist/cjs/schema/nodes/date.js +22 -1
  31. package/dist/cjs/schema/nodes/embed-card.js +36 -1
  32. package/dist/cjs/schema/nodes/emoji.js +73 -1
  33. package/dist/cjs/schema/nodes/expand.js +56 -1
  34. package/dist/cjs/schema/nodes/hard-break.js +18 -1
  35. package/dist/cjs/schema/nodes/index.js +120 -0
  36. package/dist/cjs/schema/nodes/inline-card.js +46 -1
  37. package/dist/cjs/schema/nodes/layout-column.js +37 -1
  38. package/dist/cjs/schema/nodes/layout-section.js +31 -1
  39. package/dist/cjs/schema/nodes/list-item.js +34 -1
  40. package/dist/cjs/schema/nodes/media-inline.js +12 -2
  41. package/dist/cjs/schema/nodes/media-single.js +22 -2
  42. package/dist/cjs/schema/nodes/media.js +21 -4
  43. package/dist/cjs/schema/nodes/nested-expand.js +34 -7
  44. package/dist/cjs/schema/nodes/ordered-list.js +54 -3
  45. package/dist/cjs/schema/nodes/panel.js +13 -5
  46. package/dist/cjs/schema/nodes/placeholder.js +24 -1
  47. package/dist/cjs/schema/nodes/rule.js +18 -1
  48. package/dist/cjs/validator-schema/generated/validatorSpec.js +142 -0
  49. package/dist/es2019/index.js +2 -2
  50. package/dist/es2019/next-schema/generated/nodeTypes.js +118 -1
  51. package/dist/es2019/next-schema/nodes/blockCard.js +15 -0
  52. package/dist/es2019/next-schema/nodes/blockquote.js +16 -2
  53. package/dist/es2019/next-schema/nodes/caption.js +7 -0
  54. package/dist/es2019/next-schema/nodes/codeBlock.js +5 -0
  55. package/dist/es2019/next-schema/nodes/date.js +5 -0
  56. package/dist/es2019/next-schema/nodes/embedCard.js +5 -0
  57. package/dist/es2019/next-schema/nodes/emoji.js +5 -0
  58. package/dist/es2019/next-schema/nodes/expand.js +5 -0
  59. package/dist/es2019/next-schema/nodes/hardBreak.js +5 -0
  60. package/dist/es2019/next-schema/nodes/inlineCard.js +10 -0
  61. package/dist/es2019/next-schema/nodes/layoutColumn.js +5 -0
  62. package/dist/es2019/next-schema/nodes/layoutSection.js +12 -0
  63. package/dist/es2019/next-schema/nodes/list.js +20 -1
  64. package/dist/es2019/next-schema/nodes/media.js +10 -0
  65. package/dist/es2019/next-schema/nodes/mediaInline.js +5 -0
  66. package/dist/es2019/next-schema/nodes/mediaSingle.js +10 -0
  67. package/dist/es2019/next-schema/nodes/nestedExpand.js +5 -0
  68. package/dist/es2019/next-schema/nodes/panel.js +5 -0
  69. package/dist/es2019/next-schema/nodes/placeholder.js +5 -0
  70. package/dist/es2019/next-schema/nodes/rule.js +9 -1
  71. package/dist/es2019/schema/index.js +1 -1
  72. package/dist/es2019/schema/nodes/block-card.js +50 -0
  73. package/dist/es2019/schema/nodes/blockquote.js +19 -1
  74. package/dist/es2019/schema/nodes/bullet-list.js +19 -0
  75. package/dist/es2019/schema/nodes/caption.js +19 -0
  76. package/dist/es2019/schema/nodes/code-block.js +68 -0
  77. package/dist/es2019/schema/nodes/date.js +19 -0
  78. package/dist/es2019/schema/nodes/embed-card.js +34 -0
  79. package/dist/es2019/schema/nodes/emoji.js +71 -0
  80. package/dist/es2019/schema/nodes/expand.js +59 -0
  81. package/dist/es2019/schema/nodes/hard-break.js +15 -0
  82. package/dist/es2019/schema/nodes/index.js +19 -19
  83. package/dist/es2019/schema/nodes/inline-card.js +45 -0
  84. package/dist/es2019/schema/nodes/layout-column.js +38 -0
  85. package/dist/es2019/schema/nodes/layout-section.js +32 -0
  86. package/dist/es2019/schema/nodes/list-item.js +29 -0
  87. package/dist/es2019/schema/nodes/media-inline.js +8 -1
  88. package/dist/es2019/schema/nodes/media-single.js +20 -1
  89. package/dist/es2019/schema/nodes/media.js +17 -4
  90. package/dist/es2019/schema/nodes/nested-expand.js +21 -6
  91. package/dist/es2019/schema/nodes/ordered-list.js +51 -2
  92. package/dist/es2019/schema/nodes/panel.js +11 -5
  93. package/dist/es2019/schema/nodes/placeholder.js +23 -0
  94. package/dist/es2019/schema/nodes/rule.js +15 -0
  95. package/dist/es2019/validator-schema/generated/validatorSpec.js +142 -0
  96. package/dist/esm/index.js +2 -2
  97. package/dist/esm/next-schema/generated/nodeTypes.js +118 -1
  98. package/dist/esm/next-schema/nodes/blockCard.js +15 -0
  99. package/dist/esm/next-schema/nodes/blockquote.js +16 -2
  100. package/dist/esm/next-schema/nodes/caption.js +7 -0
  101. package/dist/esm/next-schema/nodes/codeBlock.js +5 -0
  102. package/dist/esm/next-schema/nodes/date.js +5 -0
  103. package/dist/esm/next-schema/nodes/embedCard.js +5 -0
  104. package/dist/esm/next-schema/nodes/emoji.js +5 -0
  105. package/dist/esm/next-schema/nodes/expand.js +5 -0
  106. package/dist/esm/next-schema/nodes/hardBreak.js +5 -0
  107. package/dist/esm/next-schema/nodes/inlineCard.js +10 -0
  108. package/dist/esm/next-schema/nodes/layoutColumn.js +5 -0
  109. package/dist/esm/next-schema/nodes/layoutSection.js +12 -0
  110. package/dist/esm/next-schema/nodes/list.js +20 -1
  111. package/dist/esm/next-schema/nodes/media.js +10 -0
  112. package/dist/esm/next-schema/nodes/mediaInline.js +5 -0
  113. package/dist/esm/next-schema/nodes/mediaSingle.js +10 -0
  114. package/dist/esm/next-schema/nodes/nestedExpand.js +5 -0
  115. package/dist/esm/next-schema/nodes/panel.js +5 -0
  116. package/dist/esm/next-schema/nodes/placeholder.js +5 -0
  117. package/dist/esm/next-schema/nodes/rule.js +9 -1
  118. package/dist/esm/schema/index.js +1 -1
  119. package/dist/esm/schema/nodes/block-card.js +47 -0
  120. package/dist/esm/schema/nodes/blockquote.js +19 -1
  121. package/dist/esm/schema/nodes/bullet-list.js +19 -0
  122. package/dist/esm/schema/nodes/caption.js +19 -0
  123. package/dist/esm/schema/nodes/code-block.js +71 -1
  124. package/dist/esm/schema/nodes/date.js +21 -0
  125. package/dist/esm/schema/nodes/embed-card.js +35 -0
  126. package/dist/esm/schema/nodes/emoji.js +71 -0
  127. package/dist/esm/schema/nodes/expand.js +55 -0
  128. package/dist/esm/schema/nodes/hard-break.js +17 -0
  129. package/dist/esm/schema/nodes/index.js +19 -19
  130. package/dist/esm/schema/nodes/inline-card.js +45 -0
  131. package/dist/esm/schema/nodes/layout-column.js +36 -0
  132. package/dist/esm/schema/nodes/layout-section.js +30 -0
  133. package/dist/esm/schema/nodes/list-item.js +33 -0
  134. package/dist/esm/schema/nodes/media-inline.js +10 -1
  135. package/dist/esm/schema/nodes/media-single.js +21 -1
  136. package/dist/esm/schema/nodes/media.js +19 -3
  137. package/dist/esm/schema/nodes/nested-expand.js +32 -6
  138. package/dist/esm/schema/nodes/ordered-list.js +53 -2
  139. package/dist/esm/schema/nodes/panel.js +12 -4
  140. package/dist/esm/schema/nodes/placeholder.js +23 -0
  141. package/dist/esm/schema/nodes/rule.js +17 -0
  142. package/dist/esm/validator-schema/generated/validatorSpec.js +142 -0
  143. package/dist/json-schema/v1/full.json +125 -2
  144. package/dist/json-schema/v1/stage-0.json +137 -2
  145. package/dist/types/index.d.ts +2 -2
  146. package/dist/types/next-schema/generated/nodeTypes.d.ts +62 -0
  147. package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +7 -0
  148. package/dist/types/next-schema/groups/tableCellContentPseudoGroup.d.ts +7 -0
  149. package/dist/types/next-schema/nodes/blockquote.d.ts +7 -0
  150. package/dist/types/next-schema/nodes/layoutSection.d.ts +5 -0
  151. package/dist/types/schema/index.d.ts +1 -1
  152. package/dist/types/schema/nodes/block-card.d.ts +4 -0
  153. package/dist/types/schema/nodes/blockquote.d.ts +4 -0
  154. package/dist/types/schema/nodes/bullet-list.d.ts +1 -0
  155. package/dist/types/schema/nodes/caption.d.ts +4 -0
  156. package/dist/types/schema/nodes/code-block.d.ts +2 -0
  157. package/dist/types/schema/nodes/date.d.ts +2 -0
  158. package/dist/types/schema/nodes/embed-card.d.ts +2 -0
  159. package/dist/types/schema/nodes/emoji.d.ts +2 -0
  160. package/dist/types/schema/nodes/expand.d.ts +2 -0
  161. package/dist/types/schema/nodes/hard-break.d.ts +2 -0
  162. package/dist/types/schema/nodes/index.d.ts +19 -19
  163. package/dist/types/schema/nodes/inline-card.d.ts +1 -0
  164. package/dist/types/schema/nodes/layout-column.d.ts +2 -0
  165. package/dist/types/schema/nodes/layout-section.d.ts +4 -0
  166. package/dist/types/schema/nodes/list-item.d.ts +2 -0
  167. package/dist/types/schema/nodes/media-inline.d.ts +1 -0
  168. package/dist/types/schema/nodes/media-single.d.ts +3 -1
  169. package/dist/types/schema/nodes/media.d.ts +3 -1
  170. package/dist/types/schema/nodes/nested-expand.d.ts +2 -0
  171. package/dist/types/schema/nodes/ordered-list.d.ts +2 -0
  172. package/dist/types/schema/nodes/panel.d.ts +2 -0
  173. package/dist/types/schema/nodes/placeholder.d.ts +2 -0
  174. package/dist/types/schema/nodes/rule.d.ts +4 -0
  175. package/dist/types/schema/nodes/types/list.d.ts +7 -0
  176. package/dist/types/schema/nodes/types/rich-media-common.d.ts +1 -0
  177. package/dist/types/validator-schema/generated/validatorSpec.d.ts +142 -0
  178. package/json-schema/v1/full.json +125 -2
  179. package/json-schema/v1/stage-0.json +137 -2
  180. package/package.json +2 -2
  181. package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +1 -0
@@ -1,3 +1,4 @@
1
+ import { uuid } from '../../utils';
1
2
  import { orderedList as orderedListFactory } from '../../next-schema/generated/nodeTypes';
2
3
  export const orderedListSelector = '.ak-ol';
3
4
  export const orderedList = orderedListFactory({
@@ -11,6 +12,22 @@ export const orderedList = orderedListFactory({
11
12
  return ['ol', attrs, 0];
12
13
  }
13
14
  });
15
+ export const orderedListWithLocalId = orderedListFactory({
16
+ parseDOM: [{
17
+ tag: 'ol',
18
+ getAttrs: () => ({
19
+ localId: uuid.generate()
20
+ })
21
+ }],
22
+ toDOM(node) {
23
+ var _node$attrs;
24
+ const attrs = {
25
+ class: orderedListSelector.substr(1),
26
+ 'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) || undefined
27
+ };
28
+ return ['ol', attrs, 0];
29
+ }
30
+ });
14
31
 
15
32
  // resolve "start" to a safe, 0+ integer, otherwise return undefined
16
33
  // Note: Any changes to this function should also be made to "resolveOrder"
@@ -43,12 +60,44 @@ export const orderedListWithOrder = orderedListFactory({
43
60
  }
44
61
  }],
45
62
  toDOM(node) {
46
- var _node$attrs;
47
- const start = resolveStart(node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.order);
63
+ var _node$attrs2;
64
+ const start = resolveStart(node === null || node === void 0 ? void 0 : (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.order);
48
65
  const attrs = {
49
66
  start: typeof start === 'number' ? String(start) : undefined,
50
67
  class: orderedListSelector.substr(1)
51
68
  };
52
69
  return ['ol', attrs, 0];
53
70
  }
71
+ });
72
+ export const orderedListWithOrderAndLocalId = orderedListFactory({
73
+ parseDOM: [{
74
+ tag: 'ol',
75
+ getAttrs: domNode => {
76
+ const dom = domNode;
77
+ const startDOMAttr = dom.getAttribute('start');
78
+ const localId = uuid.generate();
79
+ if (startDOMAttr) {
80
+ const start = resolveStart(startDOMAttr);
81
+ if (typeof start === 'number') {
82
+ return {
83
+ order: start,
84
+ localId
85
+ };
86
+ }
87
+ }
88
+ return {
89
+ localId
90
+ };
91
+ }
92
+ }],
93
+ toDOM(node) {
94
+ var _node$attrs3, _node$attrs4;
95
+ const start = resolveStart(node === null || node === void 0 ? void 0 : (_node$attrs3 = node.attrs) === null || _node$attrs3 === void 0 ? void 0 : _node$attrs3.order);
96
+ const attrs = {
97
+ start: typeof start === 'number' ? String(start) : undefined,
98
+ class: orderedListSelector.substr(1),
99
+ 'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs4 = node.attrs) === null || _node$attrs4 === void 0 ? void 0 : _node$attrs4.localId) || undefined
100
+ };
101
+ return ['ol', attrs, 0];
102
+ }
54
103
  });
@@ -1,4 +1,5 @@
1
1
  import { panel as panelFactory } from '../../next-schema/generated/nodeTypes';
2
+ import { uuid } from '../../utils/uuid';
2
3
  export let PanelType = /*#__PURE__*/function (PanelType) {
3
4
  PanelType["INFO"] = "info";
4
5
  PanelType["NOTE"] = "note";
@@ -20,14 +21,18 @@ const getDomAttrs = nodeAttrs => {
20
21
  'data-panel-icon': nodeAttrs.panelIcon,
21
22
  'data-panel-icon-id': nodeAttrs.panelIconId,
22
23
  'data-panel-icon-text': nodeAttrs.panelIconText,
23
- 'data-panel-color': nodeAttrs.panelColor
24
+ 'data-panel-color': nodeAttrs.panelColor,
25
+ 'data-local-id': (nodeAttrs === null || nodeAttrs === void 0 ? void 0 : nodeAttrs.localId) || undefined
24
26
  };
25
27
  return attrs;
26
28
  };
27
- const getParseDOMAttrs = (allowCustomPanel, dom) => {
29
+ const getParseDOMAttrs = (allowCustomPanel, dom, generateLocalId) => {
28
30
  let parseDOMAttrs = {
29
31
  panelType: dom.getAttribute('data-panel-type')
30
32
  };
33
+ if (generateLocalId) {
34
+ parseDOMAttrs.localId = uuid.generate();
35
+ }
31
36
  if (allowCustomPanel) {
32
37
  parseDOMAttrs = {
33
38
  ...parseDOMAttrs,
@@ -41,10 +46,10 @@ const getParseDOMAttrs = (allowCustomPanel, dom) => {
41
46
  }
42
47
  return parseDOMAttrs;
43
48
  };
44
- const createPanelNodeSpecOptions = allowCustomPanel => ({
49
+ const createPanelNodeSpecOptions = (allowCustomPanel, generateLocalId) => ({
45
50
  parseDOM: [{
46
51
  tag: 'div[data-panel-type]',
47
- getAttrs: dom => getParseDOMAttrs(allowCustomPanel, dom)
52
+ getAttrs: dom => getParseDOMAttrs(allowCustomPanel, dom, generateLocalId)
48
53
  }],
49
54
  toDOM(node) {
50
55
  const attrs = getDomAttrs(node.attrs);
@@ -61,4 +66,5 @@ const createPanelNodeSpecOptions = allowCustomPanel => ({
61
66
  * Specifically, it allows Media, action, code-block, rule and decision nodes in
62
67
  * addition to content allowed inside panel
63
68
  */
64
- export const extendedPanel = allowCustomPanel => panelFactory(createPanelNodeSpecOptions(allowCustomPanel));
69
+ export const extendedPanel = allowCustomPanel => panelFactory(createPanelNodeSpecOptions(allowCustomPanel));
70
+ export const extendedPanelWithLocalId = allowCustomPanel => panelFactory(createPanelNodeSpecOptions(allowCustomPanel, true));
@@ -1,4 +1,5 @@
1
1
  import { placeholder as placeholderFactory } from '../../next-schema/generated/nodeTypes';
2
+ import { uuid } from '../../utils/uuid';
2
3
 
3
4
  /**
4
5
  * @name placeholder_node
@@ -22,4 +23,26 @@ export const placeholder = placeholderFactory({
22
23
  };
23
24
  return ['span', attrs, text];
24
25
  }
26
+ });
27
+ export const placeholderWithLocalId = placeholderFactory({
28
+ parseDOM: [{
29
+ tag: 'span[data-placeholder]',
30
+ getAttrs: dom => ({
31
+ text: dom.getAttribute('data-placeholder') || placeholder.attrs.text.default,
32
+ localId: uuid.generate()
33
+ })
34
+ }],
35
+ toDOM(node) {
36
+ var _node$attrs;
37
+ const {
38
+ text
39
+ } = node.attrs;
40
+ const attrs = {
41
+ 'data-placeholder': text,
42
+ // Needs to be edtiable for mobile to not close keyboard
43
+ contenteditable: 'true',
44
+ 'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) || undefined
45
+ };
46
+ return ['span', attrs, text];
47
+ }
25
48
  });
@@ -1,4 +1,5 @@
1
1
  import { rule as ruleFactory } from '../../next-schema/generated/nodeTypes';
2
+ import { uuid } from '../../utils/uuid';
2
3
 
3
4
  /**
4
5
  * @name rule_node
@@ -12,4 +13,18 @@ export const rule = ruleFactory({
12
13
  toDOM() {
13
14
  return hrDOM;
14
15
  }
16
+ });
17
+ export const ruleWithLocalId = ruleFactory({
18
+ parseDOM: [{
19
+ tag: 'hr',
20
+ getAttrs: () => ({
21
+ localId: uuid.generate()
22
+ })
23
+ }],
24
+ toDOM(node) {
25
+ var _node$attrs;
26
+ return ['hr', {
27
+ 'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) || undefined
28
+ }];
29
+ }
15
30
  });
@@ -58,6 +58,10 @@ export const blockCard = {
58
58
  },
59
59
  attrs: [{
60
60
  props: {
61
+ localId: {
62
+ type: 'string',
63
+ optional: true
64
+ },
61
65
  url: {
62
66
  type: 'string',
63
67
  optional: true,
@@ -103,12 +107,20 @@ export const blockCard = {
103
107
  url: {
104
108
  type: 'string',
105
109
  validatorFn: 'safeUrl'
110
+ },
111
+ localId: {
112
+ type: 'string',
113
+ optional: true
106
114
  }
107
115
  }
108
116
  }, {
109
117
  props: {
110
118
  data: {
111
119
  type: 'object'
120
+ },
121
+ localId: {
122
+ type: 'string',
123
+ optional: true
112
124
  }
113
125
  }
114
126
  }]
@@ -121,6 +133,15 @@ export const blockquote = {
121
133
  type: 'enum',
122
134
  values: ['blockquote']
123
135
  },
136
+ attrs: {
137
+ props: {
138
+ localId: {
139
+ type: 'string',
140
+ optional: true
141
+ }
142
+ },
143
+ optional: true
144
+ },
124
145
  content: {
125
146
  type: 'array',
126
147
  items: [['paragraph_with_no_marks', 'orderedList', 'bulletList', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'extension_with_marks']],
@@ -235,6 +256,15 @@ export const bulletList = {
235
256
  type: 'enum',
236
257
  values: ['bulletList']
237
258
  },
259
+ attrs: {
260
+ props: {
261
+ localId: {
262
+ type: 'string',
263
+ optional: true
264
+ }
265
+ },
266
+ optional: true
267
+ },
238
268
  content: {
239
269
  type: 'array',
240
270
  items: [['listItem', 'listItem_with_nested_decision']],
@@ -248,6 +278,15 @@ export const caption = {
248
278
  type: 'enum',
249
279
  values: ['caption']
250
280
  },
281
+ attrs: {
282
+ props: {
283
+ localId: {
284
+ type: 'string',
285
+ optional: true
286
+ }
287
+ },
288
+ optional: true
289
+ },
251
290
  content: {
252
291
  type: 'array',
253
292
  items: [['hardBreak', 'mention', 'emoji', 'date', 'placeholder', 'inlineCard', 'status', 'text_formatted', 'text_code_inline']],
@@ -279,6 +318,10 @@ export const codeBlock = {
279
318
  uniqueId: {
280
319
  type: 'string',
281
320
  optional: true
321
+ },
322
+ localId: {
323
+ type: 'string',
324
+ optional: true
282
325
  }
283
326
  },
284
327
  optional: true
@@ -345,6 +388,10 @@ export const date = {
345
388
  timestamp: {
346
389
  minLength: 1,
347
390
  type: 'string'
391
+ },
392
+ localId: {
393
+ type: 'string',
394
+ optional: true
348
395
  }
349
396
  }
350
397
  },
@@ -454,6 +501,10 @@ export const embedCard = {
454
501
  originalWidth: {
455
502
  type: 'number',
456
503
  optional: true
504
+ },
505
+ localId: {
506
+ type: 'string',
507
+ optional: true
457
508
  }
458
509
  }
459
510
  }
@@ -477,6 +528,10 @@ export const emoji = {
477
528
  text: {
478
529
  type: 'string',
479
530
  optional: true
531
+ },
532
+ localId: {
533
+ type: 'string',
534
+ optional: true
480
535
  }
481
536
  }
482
537
  },
@@ -498,6 +553,10 @@ export const expand = {
498
553
  title: {
499
554
  type: 'string',
500
555
  optional: true
556
+ },
557
+ localId: {
558
+ type: 'string',
559
+ optional: true
501
560
  }
502
561
  },
503
562
  optional: true
@@ -621,6 +680,10 @@ export const hardBreak = {
621
680
  type: 'enum',
622
681
  values: ['\n'],
623
682
  optional: true
683
+ },
684
+ localId: {
685
+ type: 'string',
686
+ optional: true
624
687
  }
625
688
  },
626
689
  optional: true
@@ -716,12 +779,20 @@ export const inlineCard = {
716
779
  url: {
717
780
  type: 'string',
718
781
  validatorFn: 'safeUrl'
782
+ },
783
+ localId: {
784
+ type: 'string',
785
+ optional: true
719
786
  }
720
787
  }
721
788
  }, {
722
789
  props: {
723
790
  data: {
724
791
  type: 'object'
792
+ },
793
+ localId: {
794
+ type: 'string',
795
+ optional: true
725
796
  }
726
797
  }
727
798
  }],
@@ -792,6 +863,10 @@ export const layoutColumn = {
792
863
  type: 'number',
793
864
  minimum: 0,
794
865
  maximum: 100
866
+ },
867
+ localId: {
868
+ type: 'string',
869
+ optional: true
795
870
  }
796
871
  }
797
872
  },
@@ -809,6 +884,15 @@ export const layoutSection = {
809
884
  type: 'enum',
810
885
  values: ['layoutSection']
811
886
  },
887
+ attrs: {
888
+ props: {
889
+ localId: {
890
+ type: 'string',
891
+ optional: true
892
+ }
893
+ },
894
+ optional: true
895
+ },
812
896
  content: {
813
897
  type: 'array',
814
898
  items: ['layoutColumn'],
@@ -847,6 +931,10 @@ export const layoutSection_with_single_column = ['layoutSection', {
847
931
  type: 'enum',
848
932
  values: ['solid'],
849
933
  optional: true
934
+ },
935
+ localId: {
936
+ type: 'string',
937
+ optional: true
850
938
  }
851
939
  },
852
940
  optional: true
@@ -903,6 +991,15 @@ export const listItem = {
903
991
  type: 'enum',
904
992
  values: ['listItem']
905
993
  },
994
+ attrs: {
995
+ props: {
996
+ localId: {
997
+ type: 'string',
998
+ optional: true
999
+ }
1000
+ },
1001
+ optional: true
1002
+ },
906
1003
  content: {
907
1004
  type: 'array',
908
1005
  isTupleLike: true,
@@ -935,6 +1032,10 @@ export const media = {
935
1032
  type: 'enum',
936
1033
  values: ['link', 'file']
937
1034
  },
1035
+ localId: {
1036
+ type: 'string',
1037
+ optional: true
1038
+ },
938
1039
  id: {
939
1040
  minLength: 1,
940
1041
  type: 'string'
@@ -966,6 +1067,10 @@ export const media = {
966
1067
  type: 'enum',
967
1068
  values: ['external']
968
1069
  },
1070
+ localId: {
1071
+ type: 'string',
1072
+ optional: true
1073
+ },
969
1074
  alt: {
970
1075
  type: 'string',
971
1076
  optional: true
@@ -1018,6 +1123,10 @@ export const mediaInline = {
1018
1123
  values: ['link', 'file', 'image'],
1019
1124
  optional: true
1020
1125
  },
1126
+ localId: {
1127
+ type: 'string',
1128
+ optional: true
1129
+ },
1021
1130
  url: {
1022
1131
  type: 'string',
1023
1132
  optional: true
@@ -1067,6 +1176,10 @@ export const mediaSingle = {
1067
1176
  },
1068
1177
  attrs: [{
1069
1178
  props: {
1179
+ localId: {
1180
+ type: 'string',
1181
+ optional: true
1182
+ },
1070
1183
  width: {
1071
1184
  type: 'number',
1072
1185
  minimum: 0,
@@ -1085,6 +1198,10 @@ export const mediaSingle = {
1085
1198
  }
1086
1199
  }, {
1087
1200
  props: {
1201
+ localId: {
1202
+ type: 'string',
1203
+ optional: true
1204
+ },
1088
1205
  width: {
1089
1206
  type: 'number',
1090
1207
  minimum: 0
@@ -1235,6 +1352,10 @@ export const nestedExpand = {
1235
1352
  title: {
1236
1353
  type: 'string',
1237
1354
  optional: true
1355
+ },
1356
+ localId: {
1357
+ type: 'string',
1358
+ optional: true
1238
1359
  }
1239
1360
  }
1240
1361
  },
@@ -1271,6 +1392,10 @@ export const orderedList = {
1271
1392
  type: 'number',
1272
1393
  minimum: 0,
1273
1394
  optional: true
1395
+ },
1396
+ localId: {
1397
+ type: 'string',
1398
+ optional: true
1274
1399
  }
1275
1400
  },
1276
1401
  optional: true
@@ -1309,6 +1434,10 @@ export const panel = {
1309
1434
  panelColor: {
1310
1435
  type: 'string',
1311
1436
  optional: true
1437
+ },
1438
+ localId: {
1439
+ type: 'string',
1440
+ optional: true
1312
1441
  }
1313
1442
  }
1314
1443
  },
@@ -1386,6 +1515,10 @@ export const placeholder = {
1386
1515
  props: {
1387
1516
  text: {
1388
1517
  type: 'string'
1518
+ },
1519
+ localId: {
1520
+ type: 'string',
1521
+ optional: true
1389
1522
  }
1390
1523
  }
1391
1524
  }
@@ -1396,6 +1529,15 @@ export const rule = {
1396
1529
  type: {
1397
1530
  type: 'enum',
1398
1531
  values: ['rule']
1532
+ },
1533
+ attrs: {
1534
+ props: {
1535
+ localId: {
1536
+ type: 'string',
1537
+ optional: true
1538
+ }
1539
+ },
1540
+ optional: true
1399
1541
  }
1400
1542
  }
1401
1543
  };
package/dist/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, extendedBlockquote, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
2
- colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expandWithNestedExpand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, extendedPanel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './schema';
1
+ export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
2
+ colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, hardBreakWithLocalId, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, link, linkToJSON, listItem, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './schema';
3
3
  export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid, getDarkModeLCHColor } from './utils';
4
4
 
5
5
  // ADF createPMSpecFactory