@atlaskit/adf-schema 26.0.1 → 26.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.
- package/CHANGELOG.md +6 -0
- package/dist/cjs/schema/default-schema.js +1 -5
- package/dist/cjs/schema/marks/border.js +0 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/schema/default-schema.js +1 -5
- package/dist/es2019/schema/marks/border.js +0 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/schema/default-schema.js +1 -5
- package/dist/esm/schema/marks/border.js +0 -1
- package/dist/esm/version.json +1 -1
- package/dist/json-schema/v1/full.json +42 -1
- package/dist/types/schema/default-schema.d.ts +1 -1
- package/dist/types/schema/marks/border.d.ts +0 -1
- package/dist/types-ts4.5/schema/default-schema.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/border.d.ts +0 -1
- package/json-schema/v1/full.json +42 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 26.1.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- [`65fe45e0cc0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/65fe45e0cc0) - Promoted border mark to full schema and add border support for email renderer
|
8
|
+
|
3
9
|
## 26.0.1
|
4
10
|
|
5
11
|
### Patch Changes
|
@@ -7,12 +7,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
exports.getSchemaBasedOnStage = exports.defaultSchemaConfig = exports.defaultSchema = void 0;
|
8
8
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
9
9
|
var _nodes = require("./nodes");
|
10
|
-
var _marks = require("./marks");
|
11
10
|
var _createSchema = require("./create-schema");
|
12
11
|
var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
13
12
|
var defaultSchemaConfig = {
|
14
13
|
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'],
|
15
|
-
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
14
|
+
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
16
15
|
// https://product-fabric.atlassian.net/browse/ED-10214,
|
17
16
|
'fragment']
|
18
17
|
};
|
@@ -29,9 +28,6 @@ var getSchemaBasedOnStage = (0, _memoizeOne.default)(function () {
|
|
29
28
|
table: _nodes.tableWithCustomWidth,
|
30
29
|
mediaSingle: _nodes.mediaSingleFull
|
31
30
|
};
|
32
|
-
defaultSchemaConfig.customMarkSpecs = {
|
33
|
-
border: _marks.border
|
34
|
-
};
|
35
31
|
}
|
36
32
|
return (0, _createSchema.createSchema)(defaultSchemaConfig);
|
37
33
|
});
|
@@ -10,7 +10,6 @@ var _editorPalette = require("@atlaskit/editor-palette");
|
|
10
10
|
var _colors = require("../../utils/colors");
|
11
11
|
/**
|
12
12
|
* @name border_mark
|
13
|
-
* @stage 0
|
14
13
|
* @description This mark adds decoration to an element, and any element decorated with it will also have a border style.
|
15
14
|
*/
|
16
15
|
|
package/dist/cjs/version.json
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
2
2
|
import { mediaSingleFull, layoutSectionWithSingleColumn, tableWithCustomWidth } from './nodes';
|
3
|
-
import { border } from './marks';
|
4
3
|
import { createSchema } from './create-schema';
|
5
4
|
const getDefaultSchemaConfig = () => {
|
6
5
|
let defaultSchemaConfig = {
|
7
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'],
|
8
|
-
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
7
|
+
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
9
8
|
// https://product-fabric.atlassian.net/browse/ED-10214,
|
10
9
|
'fragment']
|
11
10
|
};
|
@@ -20,9 +19,6 @@ export const getSchemaBasedOnStage = memoizeOne((stage = 'final') => {
|
|
20
19
|
table: tableWithCustomWidth,
|
21
20
|
mediaSingle: mediaSingleFull
|
22
21
|
};
|
23
|
-
defaultSchemaConfig.customMarkSpecs = {
|
24
|
-
border
|
25
|
-
};
|
26
22
|
}
|
27
23
|
return createSchema(defaultSchemaConfig);
|
28
24
|
});
|
package/dist/es2019/version.json
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
2
2
|
import { mediaSingleFull, layoutSectionWithSingleColumn, tableWithCustomWidth } from './nodes';
|
3
|
-
import { border } from './marks';
|
4
3
|
import { createSchema } from './create-schema';
|
5
4
|
var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
6
5
|
var defaultSchemaConfig = {
|
7
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'],
|
8
|
-
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
7
|
+
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
9
8
|
// https://product-fabric.atlassian.net/browse/ED-10214,
|
10
9
|
'fragment']
|
11
10
|
};
|
@@ -21,9 +20,6 @@ export var getSchemaBasedOnStage = memoizeOne(function () {
|
|
21
20
|
table: tableWithCustomWidth,
|
22
21
|
mediaSingle: mediaSingleFull
|
23
22
|
};
|
24
|
-
defaultSchemaConfig.customMarkSpecs = {
|
25
|
-
border: border
|
26
|
-
};
|
27
23
|
}
|
28
24
|
return createSchema(defaultSchemaConfig);
|
29
25
|
});
|
package/dist/esm/version.json
CHANGED
@@ -458,6 +458,40 @@
|
|
458
458
|
],
|
459
459
|
"additionalProperties": false
|
460
460
|
},
|
461
|
+
"border_mark": {
|
462
|
+
"type": "object",
|
463
|
+
"properties": {
|
464
|
+
"type": {
|
465
|
+
"enum": [
|
466
|
+
"border"
|
467
|
+
]
|
468
|
+
},
|
469
|
+
"attrs": {
|
470
|
+
"type": "object",
|
471
|
+
"properties": {
|
472
|
+
"size": {
|
473
|
+
"type": "number",
|
474
|
+
"minimum": 1,
|
475
|
+
"maximum": 3
|
476
|
+
},
|
477
|
+
"color": {
|
478
|
+
"type": "string",
|
479
|
+
"pattern": "^#[0-9a-fA-F]{8}$|^#[0-9a-fA-F]{6}$"
|
480
|
+
}
|
481
|
+
},
|
482
|
+
"required": [
|
483
|
+
"size",
|
484
|
+
"color"
|
485
|
+
],
|
486
|
+
"additionalProperties": false
|
487
|
+
}
|
488
|
+
},
|
489
|
+
"required": [
|
490
|
+
"type",
|
491
|
+
"attrs"
|
492
|
+
],
|
493
|
+
"additionalProperties": false
|
494
|
+
},
|
461
495
|
"hardBreak_node": {
|
462
496
|
"type": "object",
|
463
497
|
"properties": {
|
@@ -887,7 +921,14 @@
|
|
887
921
|
"marks": {
|
888
922
|
"type": "array",
|
889
923
|
"items": {
|
890
|
-
"
|
924
|
+
"anyOf": [
|
925
|
+
{
|
926
|
+
"$ref": "#/definitions/link_mark"
|
927
|
+
},
|
928
|
+
{
|
929
|
+
"$ref": "#/definitions/border_mark"
|
930
|
+
}
|
931
|
+
]
|
891
932
|
}
|
892
933
|
}
|
893
934
|
},
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference path="../../../../../../typings/prosemirror.d.ts" />
|
2
2
|
import { SchemaConfig } from './create-schema';
|
3
3
|
type DefaultSchemaNodes = 'doc' | 'paragraph' | 'text' | 'bulletList' | 'orderedList' | 'listItem' | 'heading' | 'blockquote' | 'codeBlock' | 'panel' | 'rule' | 'image' | 'mention' | 'media' | 'caption' | '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';
|
4
|
-
type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer' | 'fragment';
|
4
|
+
type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'border' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer' | 'fragment';
|
5
5
|
export declare const defaultSchemaConfig: SchemaConfig<DefaultSchemaNodes, DefaultSchemaMarks>;
|
6
6
|
export declare const getSchemaBasedOnStage: import("memoize-one").MemoizedFn<(this: any, stage?: any) => import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>>;
|
7
7
|
export declare const defaultSchema: import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference path="../../../../../../typings/prosemirror.d.ts" />
|
2
2
|
import { SchemaConfig } from './create-schema';
|
3
3
|
type DefaultSchemaNodes = 'doc' | 'paragraph' | 'text' | 'bulletList' | 'orderedList' | 'listItem' | 'heading' | 'blockquote' | 'codeBlock' | 'panel' | 'rule' | 'image' | 'mention' | 'media' | 'caption' | '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';
|
4
|
-
type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer' | 'fragment';
|
4
|
+
type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'border' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer' | 'fragment';
|
5
5
|
export declare const defaultSchemaConfig: SchemaConfig<DefaultSchemaNodes, DefaultSchemaMarks>;
|
6
6
|
export declare const getSchemaBasedOnStage: import("memoize-one").MemoizedFn<(this: any, stage?: any) => import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>>;
|
7
7
|
export declare const defaultSchema: import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>;
|
package/json-schema/v1/full.json
CHANGED
@@ -458,6 +458,40 @@
|
|
458
458
|
],
|
459
459
|
"additionalProperties": false
|
460
460
|
},
|
461
|
+
"border_mark": {
|
462
|
+
"type": "object",
|
463
|
+
"properties": {
|
464
|
+
"type": {
|
465
|
+
"enum": [
|
466
|
+
"border"
|
467
|
+
]
|
468
|
+
},
|
469
|
+
"attrs": {
|
470
|
+
"type": "object",
|
471
|
+
"properties": {
|
472
|
+
"size": {
|
473
|
+
"type": "number",
|
474
|
+
"minimum": 1,
|
475
|
+
"maximum": 3
|
476
|
+
},
|
477
|
+
"color": {
|
478
|
+
"type": "string",
|
479
|
+
"pattern": "^#[0-9a-fA-F]{8}$|^#[0-9a-fA-F]{6}$"
|
480
|
+
}
|
481
|
+
},
|
482
|
+
"required": [
|
483
|
+
"size",
|
484
|
+
"color"
|
485
|
+
],
|
486
|
+
"additionalProperties": false
|
487
|
+
}
|
488
|
+
},
|
489
|
+
"required": [
|
490
|
+
"type",
|
491
|
+
"attrs"
|
492
|
+
],
|
493
|
+
"additionalProperties": false
|
494
|
+
},
|
461
495
|
"hardBreak_node": {
|
462
496
|
"type": "object",
|
463
497
|
"properties": {
|
@@ -887,7 +921,14 @@
|
|
887
921
|
"marks": {
|
888
922
|
"type": "array",
|
889
923
|
"items": {
|
890
|
-
"
|
924
|
+
"anyOf": [
|
925
|
+
{
|
926
|
+
"$ref": "#/definitions/link_mark"
|
927
|
+
},
|
928
|
+
{
|
929
|
+
"$ref": "#/definitions/border_mark"
|
930
|
+
}
|
931
|
+
]
|
891
932
|
}
|
892
933
|
}
|
893
934
|
},
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "26.0
|
3
|
+
"version": "26.1.0",
|
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.
|
61
|
+
"@atlaskit/editor-test-helpers": "^18.9.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
|
"prosemirror-history": "^1.1.3",
|