@atlaskit/adf-schema 30.2.1 → 30.2.3
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 +12 -0
- package/dist/es2019/schema/create-schema.js +1 -1
- package/dist/es2019/schema/default-schema.js +1 -1
- package/dist/es2019/schema/marks/annotation.js +1 -1
- package/dist/es2019/schema/marks/code.js +1 -1
- package/dist/es2019/schema/nodes/ordered-list.js +1 -1
- package/dist/es2019/schema/nodes/panel.js +2 -2
- package/dist/es2019/utils/colors.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -261,7 +261,7 @@ export function createSchema(config) {
|
|
261
261
|
const nodesConfig = Object.keys(customNodeSpecs || {}).concat(config.nodes);
|
262
262
|
const marksConfig = Object.keys(customMarkSpecs || {}).concat(config.marks || []).concat(markGroupDeclarationsNames);
|
263
263
|
let nodes = addItems(nodesInOrder, nodesConfig, customNodeSpecs);
|
264
|
-
|
264
|
+
const marks = addItems(marksInOrder, marksConfig, customMarkSpecs);
|
265
265
|
nodes = sanitizeNodes(nodes, marks);
|
266
266
|
return new Schema({
|
267
267
|
nodes,
|
@@ -2,7 +2,7 @@ import memoizeOne from 'memoize-one';
|
|
2
2
|
import { layoutSectionWithSingleColumn } from './nodes';
|
3
3
|
import { createSchema } from './create-schema';
|
4
4
|
const getDefaultSchemaConfig = () => {
|
5
|
-
|
5
|
+
const defaultSchemaConfig = {
|
6
6
|
nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'panel', 'rule', 'image', 'caption', 'mention', 'media', 'mediaGroup', 'mediaSingle', 'mediaInline', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'hardBreak', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'decisionList', 'decisionItem', 'taskList', 'taskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'unsupportedBlock', 'unsupportedInline'],
|
7
7
|
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
8
8
|
// https://product-fabric.atlassian.net/browse/ED-10214,
|
@@ -39,7 +39,7 @@ export const orderedListWithOrder = {
|
|
39
39
|
tag: 'ol',
|
40
40
|
getAttrs: domNode => {
|
41
41
|
const dom = domNode;
|
42
|
-
|
42
|
+
const startDOMAttr = dom.getAttribute('start');
|
43
43
|
if (startDOMAttr) {
|
44
44
|
const start = resolveStart(startDOMAttr);
|
45
45
|
if (typeof start === 'number') {
|
@@ -14,7 +14,7 @@ export let PanelType = /*#__PURE__*/function (PanelType) {
|
|
14
14
|
*/
|
15
15
|
|
16
16
|
const getDefaultAttrs = () => {
|
17
|
-
|
17
|
+
const attrs = {
|
18
18
|
panelType: {
|
19
19
|
default: 'info'
|
20
20
|
},
|
@@ -34,7 +34,7 @@ const getDefaultAttrs = () => {
|
|
34
34
|
return attrs;
|
35
35
|
};
|
36
36
|
const getDomAttrs = nodeAttrs => {
|
37
|
-
|
37
|
+
const attrs = {
|
38
38
|
'data-panel-type': nodeAttrs.panelType,
|
39
39
|
'data-panel-icon': nodeAttrs.panelIcon,
|
40
40
|
'data-panel-icon-id': nodeAttrs.panelIconId,
|
@@ -116,7 +116,7 @@ export function hexToRgb(color) {
|
|
116
116
|
* @param hex - hex color string (#xxx, or #xxxxxx)
|
117
117
|
*/
|
118
118
|
export function hexToRgba(rawColor, alpha) {
|
119
|
-
|
119
|
+
const color = normalizeHexColor(rawColor);
|
120
120
|
if (!color) {
|
121
121
|
return null;
|
122
122
|
}
|
package/package.json
CHANGED