@atlaskit/adf-schema 52.3.1 → 52.4.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 +22 -0
- package/dist/cjs/next-schema/generated/nodeTypes.js +3 -3
- package/dist/cjs/next-schema/marks/fontSize.js +2 -1
- package/dist/cjs/schema/default-schema.js +4 -0
- package/dist/es2019/next-schema/generated/nodeTypes.js +3 -3
- package/dist/es2019/next-schema/marks/fontSize.js +2 -1
- package/dist/es2019/schema/default-schema.js +4 -0
- package/dist/esm/next-schema/generated/nodeTypes.js +3 -3
- package/dist/esm/next-schema/marks/fontSize.js +2 -1
- package/dist/esm/schema/default-schema.js +4 -0
- package/dist/types/schema/default-schema.d.ts +1 -1
- package/dist/types-ts4.5/schema/default-schema.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/adf-schema
|
|
2
2
|
|
|
3
|
+
## 52.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`8b781b3b3f9ca`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8b781b3b3f9ca) -
|
|
8
|
+
Add setSmallText and setSmallTextWithAnalytics commands, modify setNormalText to remove fontSize
|
|
9
|
+
mark, add FORMAT_SMALL_TEXT analytics enum.
|
|
10
|
+
|
|
11
|
+
Add support to the renderer to render 'small text'.
|
|
12
|
+
|
|
13
|
+
Add 'fontSize' to stage0 default schema.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
19
|
+
## 52.3.2
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 52.3.1
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -76,7 +76,7 @@ var blockTaskItem = exports.blockTaskItem = (0, _createPMSpecFactory.createPMNod
|
|
|
76
76
|
});
|
|
77
77
|
var bodiedExtension = exports.bodiedExtension = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
78
78
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
|
|
79
|
-
marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
|
|
79
|
+
marks: 'dataConsumer fontSize fragment unsupportedMark unsupportedNodeAttribute',
|
|
80
80
|
group: 'block',
|
|
81
81
|
attrs: {
|
|
82
82
|
extensionKey: {
|
|
@@ -103,7 +103,7 @@ var bodiedExtension = exports.bodiedExtension = (0, _createPMSpecFactory.createP
|
|
|
103
103
|
isolating: true
|
|
104
104
|
});
|
|
105
105
|
var bodiedExtensionWithMarks = exports.bodiedExtensionWithMarks = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
106
|
-
marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
|
|
106
|
+
marks: 'dataConsumer fontSize fragment unsupportedMark unsupportedNodeAttribute',
|
|
107
107
|
group: 'block',
|
|
108
108
|
attrs: {
|
|
109
109
|
extensionKey: {
|
|
@@ -444,7 +444,7 @@ var extensionWithMarks = exports.extensionWithMarks = (0, _createPMSpecFactory.c
|
|
|
444
444
|
});
|
|
445
445
|
var extensionFrameStage0 = exports.extensionFrameStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
446
446
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | extension | bodiedExtension | unsupportedBlock | blockCard | embedCard)+',
|
|
447
|
-
marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
|
|
447
|
+
marks: 'dataConsumer fontSize fragment unsupportedMark unsupportedNodeAttribute',
|
|
448
448
|
attrs: {},
|
|
449
449
|
selectable: false,
|
|
450
450
|
definingAsContext: false,
|
|
@@ -8,6 +8,7 @@ exports.getSchemaBasedOnStage = exports.defaultSchemaConfig = exports.defaultSch
|
|
|
8
8
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
9
9
|
var _nodes = require("./nodes");
|
|
10
10
|
var _createSchema = require("./create-schema");
|
|
11
|
+
var _fontSize = require("./marks/font-size");
|
|
11
12
|
var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
|
12
13
|
var defaultSchemaConfig = {
|
|
13
14
|
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', 'blockTaskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'syncBlock', 'bodiedSyncBlock', 'unsupportedBlock', 'unsupportedInline'],
|
|
@@ -38,6 +39,9 @@ function () {
|
|
|
38
39
|
tableCell: _nodes.tableCellWithNestedTable,
|
|
39
40
|
tableHeader: _nodes.tableHeaderWithNestedTable
|
|
40
41
|
};
|
|
42
|
+
defaultSchemaConfig.customMarkSpecs = {
|
|
43
|
+
fontSize: _fontSize.fontSize
|
|
44
|
+
};
|
|
41
45
|
}
|
|
42
46
|
return (0, _createSchema.createSchema)(defaultSchemaConfig);
|
|
43
47
|
});
|
|
@@ -70,7 +70,7 @@ export const blockTaskItem = createPMNodeSpecFactory({
|
|
|
70
70
|
});
|
|
71
71
|
export const bodiedExtension = createPMNodeSpecFactory({
|
|
72
72
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
|
|
73
|
-
marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
|
|
73
|
+
marks: 'dataConsumer fontSize fragment unsupportedMark unsupportedNodeAttribute',
|
|
74
74
|
group: 'block',
|
|
75
75
|
attrs: {
|
|
76
76
|
extensionKey: {
|
|
@@ -97,7 +97,7 @@ export const bodiedExtension = createPMNodeSpecFactory({
|
|
|
97
97
|
isolating: true
|
|
98
98
|
});
|
|
99
99
|
export const bodiedExtensionWithMarks = createPMNodeSpecFactory({
|
|
100
|
-
marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
|
|
100
|
+
marks: 'dataConsumer fontSize fragment unsupportedMark unsupportedNodeAttribute',
|
|
101
101
|
group: 'block',
|
|
102
102
|
attrs: {
|
|
103
103
|
extensionKey: {
|
|
@@ -438,7 +438,7 @@ export const extensionWithMarks = createPMNodeSpecFactory({
|
|
|
438
438
|
});
|
|
439
439
|
export const extensionFrameStage0 = createPMNodeSpecFactory({
|
|
440
440
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | extension | bodiedExtension | unsupportedBlock | blockCard | embedCard)+',
|
|
441
|
-
marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
|
|
441
|
+
marks: 'dataConsumer fontSize fragment unsupportedMark unsupportedNodeAttribute',
|
|
442
442
|
attrs: {},
|
|
443
443
|
selectable: false,
|
|
444
444
|
definingAsContext: false,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
|
2
2
|
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, listItemWithFlexibleFirstChildStage0, taskListWithFlexibleFirstChildStage0, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
|
|
3
3
|
import { createSchema } from './create-schema';
|
|
4
|
+
import { fontSize } from './marks/font-size';
|
|
4
5
|
const getDefaultSchemaConfig = () => {
|
|
5
6
|
const defaultSchemaConfig = {
|
|
6
7
|
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', 'blockTaskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'syncBlock', 'bodiedSyncBlock', 'unsupportedBlock', 'unsupportedInline'],
|
|
@@ -30,6 +31,9 @@ export const getSchemaBasedOnStage = memoizeOne(
|
|
|
30
31
|
tableCell: tableCellWithNestedTable,
|
|
31
32
|
tableHeader: tableHeaderWithNestedTable
|
|
32
33
|
};
|
|
34
|
+
defaultSchemaConfig.customMarkSpecs = {
|
|
35
|
+
fontSize: fontSize
|
|
36
|
+
};
|
|
33
37
|
}
|
|
34
38
|
return createSchema(defaultSchemaConfig);
|
|
35
39
|
});
|
|
@@ -70,7 +70,7 @@ export var blockTaskItem = createPMNodeSpecFactory({
|
|
|
70
70
|
});
|
|
71
71
|
export var bodiedExtension = createPMNodeSpecFactory({
|
|
72
72
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
|
|
73
|
-
marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
|
|
73
|
+
marks: 'dataConsumer fontSize fragment unsupportedMark unsupportedNodeAttribute',
|
|
74
74
|
group: 'block',
|
|
75
75
|
attrs: {
|
|
76
76
|
extensionKey: {
|
|
@@ -97,7 +97,7 @@ export var bodiedExtension = createPMNodeSpecFactory({
|
|
|
97
97
|
isolating: true
|
|
98
98
|
});
|
|
99
99
|
export var bodiedExtensionWithMarks = createPMNodeSpecFactory({
|
|
100
|
-
marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
|
|
100
|
+
marks: 'dataConsumer fontSize fragment unsupportedMark unsupportedNodeAttribute',
|
|
101
101
|
group: 'block',
|
|
102
102
|
attrs: {
|
|
103
103
|
extensionKey: {
|
|
@@ -438,7 +438,7 @@ export var extensionWithMarks = createPMNodeSpecFactory({
|
|
|
438
438
|
});
|
|
439
439
|
export var extensionFrameStage0 = createPMNodeSpecFactory({
|
|
440
440
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | extension | bodiedExtension | unsupportedBlock | blockCard | embedCard)+',
|
|
441
|
-
marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
|
|
441
|
+
marks: 'dataConsumer fontSize fragment unsupportedMark unsupportedNodeAttribute',
|
|
442
442
|
attrs: {},
|
|
443
443
|
selectable: false,
|
|
444
444
|
definingAsContext: false,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
|
2
2
|
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, listItemWithFlexibleFirstChildStage0, taskListWithFlexibleFirstChildStage0, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
|
|
3
3
|
import { createSchema } from './create-schema';
|
|
4
|
+
import { fontSize } from './marks/font-size';
|
|
4
5
|
var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
|
5
6
|
var defaultSchemaConfig = {
|
|
6
7
|
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', 'blockTaskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'syncBlock', 'bodiedSyncBlock', 'unsupportedBlock', 'unsupportedInline'],
|
|
@@ -31,6 +32,9 @@ function () {
|
|
|
31
32
|
tableCell: tableCellWithNestedTable,
|
|
32
33
|
tableHeader: tableHeaderWithNestedTable
|
|
33
34
|
};
|
|
35
|
+
defaultSchemaConfig.customMarkSpecs = {
|
|
36
|
+
fontSize: fontSize
|
|
37
|
+
};
|
|
34
38
|
}
|
|
35
39
|
return createSchema(defaultSchemaConfig);
|
|
36
40
|
});
|
|
@@ -2,7 +2,7 @@ import type { MemoizedFn } from 'memoize-one';
|
|
|
2
2
|
import type { SchemaConfig } from './create-schema';
|
|
3
3
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
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' | 'blockTaskItem' | 'unknownBlock' | 'date' | 'status' | 'placeholder' | 'layoutSection' | 'layoutColumn' | 'inlineCard' | 'blockCard' | 'embedCard' | 'syncBlock' | 'bodiedSyncBlock' | 'unsupportedBlock' | 'unsupportedInline';
|
|
5
|
-
type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'backgroundColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'border' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer' | 'fragment';
|
|
5
|
+
type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'backgroundColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'border' | 'fontSize' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer' | 'fragment';
|
|
6
6
|
export declare const defaultSchemaConfig: SchemaConfig<DefaultSchemaNodes, DefaultSchemaMarks>;
|
|
7
7
|
export declare const getSchemaBasedOnStage: MemoizedFn<(this: any, stage?: any) => Schema<DefaultSchemaNodes, DefaultSchemaMarks>>;
|
|
8
8
|
export declare const defaultSchema: Schema<DefaultSchemaNodes, DefaultSchemaMarks>;
|
|
@@ -2,7 +2,7 @@ import type { MemoizedFn } from 'memoize-one';
|
|
|
2
2
|
import type { SchemaConfig } from './create-schema';
|
|
3
3
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
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' | 'blockTaskItem' | 'unknownBlock' | 'date' | 'status' | 'placeholder' | 'layoutSection' | 'layoutColumn' | 'inlineCard' | 'blockCard' | 'embedCard' | 'syncBlock' | 'bodiedSyncBlock' | 'unsupportedBlock' | 'unsupportedInline';
|
|
5
|
-
type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'backgroundColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'border' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer' | 'fragment';
|
|
5
|
+
type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'backgroundColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'border' | 'fontSize' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer' | 'fragment';
|
|
6
6
|
export declare const defaultSchemaConfig: SchemaConfig<DefaultSchemaNodes, DefaultSchemaMarks>;
|
|
7
7
|
export declare const getSchemaBasedOnStage: MemoizedFn<(this: any, stage?: any) => Schema<DefaultSchemaNodes, DefaultSchemaMarks>>;
|
|
8
8
|
export declare const defaultSchema: Schema<DefaultSchemaNodes, DefaultSchemaMarks>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/adf-schema",
|
|
3
|
-
"version": "52.
|
|
3
|
+
"version": "52.4.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/"
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"build:schema:all": "yarn build:schema:pm && yarn build:schema:json && yarn build:schema:validator"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@atlaskit/adf-schema-generator": "^2.
|
|
43
|
+
"@atlaskit/adf-schema-generator": "^2.2.0",
|
|
44
44
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^40.3.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0",
|
|
47
47
|
"css-color-names": "0.0.4",
|
|
48
48
|
"linkify-it": "^3.0.3",
|