@atlaskit/adf-utils 19.28.0 → 19.29.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 +17 -0
- package/dist/cjs/validator/specs/index.js +12 -12
- package/dist/cjs/validator/validator.js +6 -1
- package/dist/es2019/validator/specs/index.js +1 -1
- package/dist/es2019/validator/validator.js +6 -1
- package/dist/esm/validator/specs/index.js +1 -1
- package/dist/esm/validator/validator.js +6 -1
- package/dist/types/validator/specs/index.d.ts +1 -1
- package/dist/types-ts4.5/validator/specs/index.d.ts +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/adf-utils
|
|
2
2
|
|
|
3
|
+
## 19.29.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 19.29.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`2fb1c8a74a856`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2fb1c8a74a856) -
|
|
14
|
+
ADF Change 101: Add wrap and hideLineNumbers attributes to codeBlock stage-0 variants
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 19.28.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -111,6 +111,18 @@ Object.defineProperty(exports, "codeBlock_root_only", {
|
|
|
111
111
|
return _schemaValidator.codeBlock_root_only;
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
+
Object.defineProperty(exports, "codeBlock_root_only_with_extended_attributes", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function get() {
|
|
117
|
+
return _schemaValidator.codeBlock_root_only_with_extended_attributes;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "codeBlock_with_extended_attributes", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function get() {
|
|
123
|
+
return _schemaValidator.codeBlock_with_extended_attributes;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
114
126
|
Object.defineProperty(exports, "confluenceInlineComment", {
|
|
115
127
|
enumerable: true,
|
|
116
128
|
get: function get() {
|
|
@@ -405,18 +417,6 @@ Object.defineProperty(exports, "paragraph_with_font_size", {
|
|
|
405
417
|
return _schemaValidator.paragraph_with_font_size;
|
|
406
418
|
}
|
|
407
419
|
});
|
|
408
|
-
Object.defineProperty(exports, "paragraph_with_font_size_and_alignment", {
|
|
409
|
-
enumerable: true,
|
|
410
|
-
get: function get() {
|
|
411
|
-
return _schemaValidator.paragraph_with_font_size_and_alignment;
|
|
412
|
-
}
|
|
413
|
-
});
|
|
414
|
-
Object.defineProperty(exports, "paragraph_with_font_size_and_indentation", {
|
|
415
|
-
enumerable: true,
|
|
416
|
-
get: function get() {
|
|
417
|
-
return _schemaValidator.paragraph_with_font_size_and_indentation;
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
420
|
Object.defineProperty(exports, "paragraph_with_indentation", {
|
|
421
421
|
enumerable: true,
|
|
422
422
|
get: function get() {
|
|
@@ -16,6 +16,7 @@ var specs = _interopRequireWildcard(require("./specs"));
|
|
|
16
16
|
var _utils = require("./utils");
|
|
17
17
|
var _extractAllowedContent = require("./extractAllowedContent");
|
|
18
18
|
var _rules = require("./rules");
|
|
19
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
19
20
|
var _excluded = ["items"]; // Ignored via go/ees005
|
|
20
21
|
// eslint-disable-next-line import/no-namespace
|
|
21
22
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -355,7 +356,11 @@ var unsupportedNodeAttributesContent = function unsupportedNodeAttributesContent
|
|
|
355
356
|
* under the base spec must also be valid under the variant.
|
|
356
357
|
*/
|
|
357
358
|
var getVariantSpecOverrides = function getVariantSpecOverrides() {
|
|
358
|
-
|
|
359
|
+
var overrides = {};
|
|
360
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true)) {
|
|
361
|
+
overrides.codeBlock = 'codeBlock_with_extended_attributes';
|
|
362
|
+
}
|
|
363
|
+
return overrides;
|
|
359
364
|
};
|
|
360
365
|
|
|
361
366
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size,
|
|
2
|
+
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, codeBlock_with_extended_attributes, codeBlock_root_only_with_extended_attributes, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, syncBlock, bodiedSyncBlock } from '@atlaskit/adf-schema/schema-validator';
|
|
@@ -4,6 +4,7 @@ import * as specs from './specs';
|
|
|
4
4
|
import { copy, isBoolean, isDefined, isInteger, isNumber, isPlainObject, isString, makeArray } from './utils';
|
|
5
5
|
import { extractAllowedContent } from './extractAllowedContent';
|
|
6
6
|
import { validatorFnMap } from './rules';
|
|
7
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
8
|
|
|
8
9
|
// Ignored via go/ees005
|
|
9
10
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -316,7 +317,11 @@ const unsupportedNodeAttributesContent = (entity, errorCode, invalidAttributes,
|
|
|
316
317
|
* under the base spec must also be valid under the variant.
|
|
317
318
|
*/
|
|
318
319
|
const getVariantSpecOverrides = () => {
|
|
319
|
-
|
|
320
|
+
const overrides = {};
|
|
321
|
+
if (expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true)) {
|
|
322
|
+
overrides.codeBlock = 'codeBlock_with_extended_attributes';
|
|
323
|
+
}
|
|
324
|
+
return overrides;
|
|
320
325
|
};
|
|
321
326
|
|
|
322
327
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size,
|
|
2
|
+
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, codeBlock_with_extended_attributes, codeBlock_root_only_with_extended_attributes, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, syncBlock, bodiedSyncBlock } from '@atlaskit/adf-schema/schema-validator';
|
|
@@ -14,6 +14,7 @@ import * as specs from './specs';
|
|
|
14
14
|
import { copy, isBoolean, isDefined, isInteger, isNumber, isPlainObject, isString, makeArray } from './utils';
|
|
15
15
|
import { extractAllowedContent } from './extractAllowedContent';
|
|
16
16
|
import { validatorFnMap } from './rules';
|
|
17
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
18
|
|
|
18
19
|
// Ignored via go/ees005
|
|
19
20
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -346,7 +347,11 @@ var unsupportedNodeAttributesContent = function unsupportedNodeAttributesContent
|
|
|
346
347
|
* under the base spec must also be valid under the variant.
|
|
347
348
|
*/
|
|
348
349
|
var getVariantSpecOverrides = function getVariantSpecOverrides() {
|
|
349
|
-
|
|
350
|
+
var overrides = {};
|
|
351
|
+
if (expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true)) {
|
|
352
|
+
overrides.codeBlock = 'codeBlock_with_extended_attributes';
|
|
353
|
+
}
|
|
354
|
+
return overrides;
|
|
350
355
|
};
|
|
351
356
|
|
|
352
357
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size,
|
|
1
|
+
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, codeBlock_with_extended_attributes, codeBlock_root_only_with_extended_attributes, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, syncBlock, bodiedSyncBlock, } from '@atlaskit/adf-schema/schema-validator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size,
|
|
1
|
+
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, codeBlock_with_extended_attributes, codeBlock_root_only_with_extended_attributes, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, syncBlock, bodiedSyncBlock, } from '@atlaskit/adf-schema/schema-validator';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/adf-utils",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.29.1",
|
|
4
4
|
"description": "Set of utilities to traverse, modify and create ADF documents.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,8 +26,9 @@
|
|
|
26
26
|
"team": "Editor: Collaboration"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@atlaskit/adf-schema": "^52.
|
|
29
|
+
"@atlaskit/adf-schema": "^52.9.0",
|
|
30
30
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
31
|
+
"@atlaskit/tmp-editor-statsig": "^75.0.0",
|
|
31
32
|
"@babel/runtime": "^7.0.0"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|