@atlaskit/adf-schema 26.0.0 → 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 +12 -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 +2 -1
- package/dist/types/schema/marks/border.d.ts +0 -1
- package/dist/types/steps/analytics.d.ts +2 -2
- package/dist/types/steps/link-meta-step.d.ts +2 -2
- package/dist/types/steps/set-attrs.d.ts +1 -1
- package/dist/types/steps/table/add-column.d.ts +5 -5
- package/dist/types/steps/table/sort-column.d.ts +2 -2
- package/dist/types/steps/type-ahead.d.ts +2 -2
- package/dist/types-ts4.5/schema/default-schema.d.ts +2 -1
- package/dist/types-ts4.5/schema/marks/border.d.ts +0 -1
- package/dist/types-ts4.5/steps/analytics.d.ts +2 -2
- package/dist/types-ts4.5/steps/link-meta-step.d.ts +2 -2
- package/dist/types-ts4.5/steps/set-attrs.d.ts +1 -1
- package/dist/types-ts4.5/steps/table/add-column.d.ts +5 -5
- package/dist/types-ts4.5/steps/table/sort-column.d.ts +2 -2
- package/dist/types-ts4.5/steps/type-ahead.d.ts +2 -2
- package/json-schema/v1/full.json +42 -1
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
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
|
+
|
9
|
+
## 26.0.1
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- [`5f5ba16de66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f5ba16de66) - [ED-13910] Fix prosemirror types
|
14
|
+
|
3
15
|
## 26.0.0
|
4
16
|
|
5
17
|
### Major 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,6 +1,7 @@
|
|
1
|
+
/// <reference path="../../../../../../typings/prosemirror.d.ts" />
|
1
2
|
import { SchemaConfig } from './create-schema';
|
2
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';
|
3
|
-
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';
|
4
5
|
export declare const defaultSchemaConfig: SchemaConfig<DefaultSchemaNodes, DefaultSchemaMarks>;
|
5
6
|
export declare const getSchemaBasedOnStage: import("memoize-one").MemoizedFn<(this: any, stage?: any) => import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>>;
|
6
7
|
export declare const defaultSchema: import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>;
|
@@ -47,13 +47,13 @@ export declare class AnalyticsStep<P extends AnalyticsPayload> extends Step {
|
|
47
47
|
* Generate new undo/redo analytics event when step is inverted
|
48
48
|
*/
|
49
49
|
invert(): AnalyticsStep<AnalyticsInvertPayload>;
|
50
|
-
apply(doc: PMNode): StepResult
|
50
|
+
apply(doc: PMNode): StepResult;
|
51
51
|
map(mapping: Mappable): AnalyticsStep<P>;
|
52
52
|
getMap(): StepMap;
|
53
53
|
merge(other: Step): AnalyticsStep<P> | null;
|
54
54
|
toJSON(): {
|
55
55
|
stepType: string;
|
56
56
|
};
|
57
|
-
static fromJSON(): ReplaceStep
|
57
|
+
static fromJSON(): ReplaceStep;
|
58
58
|
}
|
59
59
|
export {};
|
@@ -36,7 +36,7 @@ export declare class LinkMetaStep extends Step {
|
|
36
36
|
* Generate new undo/redo analytics event when step is inverted
|
37
37
|
*/
|
38
38
|
invert(): LinkMetaStep;
|
39
|
-
apply(doc: PMNode): StepResult
|
39
|
+
apply(doc: PMNode): StepResult;
|
40
40
|
map(mapping: Mappable): LinkMetaStep;
|
41
41
|
getMap(): StepMap;
|
42
42
|
merge(): null;
|
@@ -47,5 +47,5 @@ export declare class LinkMetaStep extends Step {
|
|
47
47
|
};
|
48
48
|
static fromJSON<S extends Schema = any>(_: S, __: {
|
49
49
|
[key: string]: any;
|
50
|
-
}): ReplaceStep
|
50
|
+
}): ReplaceStep;
|
51
51
|
}
|
@@ -8,7 +8,7 @@ export declare class SetAttrsStep extends Step {
|
|
8
8
|
pos: number;
|
9
9
|
attrs: object;
|
10
10
|
constructor(pos: number, attrs: object);
|
11
|
-
apply(doc: ProseMirrorNode): StepResult
|
11
|
+
apply(doc: ProseMirrorNode): StepResult;
|
12
12
|
invert(doc: ProseMirrorNode): SetAttrsStep;
|
13
13
|
map(mapping: Mappable): SetAttrsStep | null;
|
14
14
|
toJSON(): {
|
@@ -29,7 +29,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
|
|
29
29
|
*
|
30
30
|
* @param doc Current document
|
31
31
|
*/
|
32
|
-
apply(doc: ProseMirrorNode
|
32
|
+
apply(doc: ProseMirrorNode): StepResult;
|
33
33
|
/**
|
34
34
|
* Update tablePos with the new position. If tablePos doesnt exist any more remove the step
|
35
35
|
* Update all the cellStep inside columnInfo. If cellStep.from position gets deleted removed it from column info
|
@@ -37,7 +37,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
|
|
37
37
|
* Create a new step with all the position updated
|
38
38
|
* @param mapping
|
39
39
|
*/
|
40
|
-
map(mapping: Mappable): Step
|
40
|
+
map(mapping: Mappable): Step | null;
|
41
41
|
/**
|
42
42
|
* if isDelete
|
43
43
|
* Get the original cell node at columnInfo.cellStep[].from to columnInfo.cellStep[].to
|
@@ -49,7 +49,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
|
|
49
49
|
* return new step inverted
|
50
50
|
* @param originalDoc
|
51
51
|
*/
|
52
|
-
invert(originalDoc: ProseMirrorNode
|
52
|
+
invert(originalDoc: ProseMirrorNode): Step;
|
53
53
|
/**
|
54
54
|
* StepMap is created based on columnInfo.
|
55
55
|
* ColumnInfo is created on constructor and once is applied (the document could have new cells that weren't part of the original set)
|
@@ -70,7 +70,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
|
|
70
70
|
* after it. Returns the merged step when possible, null if the
|
71
71
|
* steps can't be merged.
|
72
72
|
*/
|
73
|
-
merge(other: Step
|
73
|
+
merge(other: Step): Step | null;
|
74
74
|
/**
|
75
75
|
* Create a JSON-serializeable representation of this step. When
|
76
76
|
* defining this for a custom subclass, make sure the result object
|
@@ -82,7 +82,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
|
|
82
82
|
* Deserialize a step from its JSON representation. Will call
|
83
83
|
* through to the step class' own implementation of this method.
|
84
84
|
*/
|
85
|
-
static fromJSON<S extends Schema = any>(schema: S, json: AddColumnStepJson): Step
|
85
|
+
static fromJSON<S extends Schema = any>(schema: S, json: AddColumnStepJson): Step;
|
86
86
|
static create(doc: ProseMirrorNode, tablePos: number, column: number, isDelete?: boolean): AddColumnStep<any>;
|
87
87
|
private applyCellSteps;
|
88
88
|
}
|
@@ -8,11 +8,11 @@ export declare class TableSortStep extends Step {
|
|
8
8
|
pos: number;
|
9
9
|
constructor(pos: number, prev?: TableColumnOrdering, next?: TableColumnOrdering);
|
10
10
|
invert(): TableSortStep;
|
11
|
-
apply(doc: PMNode): StepResult
|
11
|
+
apply(doc: PMNode): StepResult;
|
12
12
|
map(): null;
|
13
13
|
getMap(): StepMap;
|
14
14
|
toJSON(): {
|
15
15
|
stepType: string;
|
16
16
|
};
|
17
|
-
static fromJSON(): ReplaceStep
|
17
|
+
static fromJSON(): ReplaceStep;
|
18
18
|
}
|
@@ -19,7 +19,7 @@ export declare class InsertTypeAheadStep extends Step {
|
|
19
19
|
trigger: string;
|
20
20
|
constructor({ stage, query, trigger, selectedIndex }: Config, isInvertStep?: boolean);
|
21
21
|
invert(): InsertTypeAheadStep;
|
22
|
-
apply(doc: PMNode): StepResult
|
22
|
+
apply(doc: PMNode): StepResult;
|
23
23
|
merge(): null;
|
24
24
|
isInsertionStep(): boolean;
|
25
25
|
isUndoingStep(): boolean;
|
@@ -30,6 +30,6 @@ export declare class InsertTypeAheadStep extends Step {
|
|
30
30
|
from: number;
|
31
31
|
to: number;
|
32
32
|
};
|
33
|
-
static fromJSON(): ReplaceStep
|
33
|
+
static fromJSON(): ReplaceStep;
|
34
34
|
}
|
35
35
|
export {};
|
@@ -1,6 +1,7 @@
|
|
1
|
+
/// <reference path="../../../../../../typings/prosemirror.d.ts" />
|
1
2
|
import { SchemaConfig } from './create-schema';
|
2
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';
|
3
|
-
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';
|
4
5
|
export declare const defaultSchemaConfig: SchemaConfig<DefaultSchemaNodes, DefaultSchemaMarks>;
|
5
6
|
export declare const getSchemaBasedOnStage: import("memoize-one").MemoizedFn<(this: any, stage?: any) => import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>>;
|
6
7
|
export declare const defaultSchema: import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>;
|
@@ -47,13 +47,13 @@ export declare class AnalyticsStep<P extends AnalyticsPayload> extends Step {
|
|
47
47
|
* Generate new undo/redo analytics event when step is inverted
|
48
48
|
*/
|
49
49
|
invert(): AnalyticsStep<AnalyticsInvertPayload>;
|
50
|
-
apply(doc: PMNode): StepResult
|
50
|
+
apply(doc: PMNode): StepResult;
|
51
51
|
map(mapping: Mappable): AnalyticsStep<P>;
|
52
52
|
getMap(): StepMap;
|
53
53
|
merge(other: Step): AnalyticsStep<P> | null;
|
54
54
|
toJSON(): {
|
55
55
|
stepType: string;
|
56
56
|
};
|
57
|
-
static fromJSON(): ReplaceStep
|
57
|
+
static fromJSON(): ReplaceStep;
|
58
58
|
}
|
59
59
|
export {};
|
@@ -36,7 +36,7 @@ export declare class LinkMetaStep extends Step {
|
|
36
36
|
* Generate new undo/redo analytics event when step is inverted
|
37
37
|
*/
|
38
38
|
invert(): LinkMetaStep;
|
39
|
-
apply(doc: PMNode): StepResult
|
39
|
+
apply(doc: PMNode): StepResult;
|
40
40
|
map(mapping: Mappable): LinkMetaStep;
|
41
41
|
getMap(): StepMap;
|
42
42
|
merge(): null;
|
@@ -47,5 +47,5 @@ export declare class LinkMetaStep extends Step {
|
|
47
47
|
};
|
48
48
|
static fromJSON<S extends Schema = any>(_: S, __: {
|
49
49
|
[key: string]: any;
|
50
|
-
}): ReplaceStep
|
50
|
+
}): ReplaceStep;
|
51
51
|
}
|
@@ -8,7 +8,7 @@ export declare class SetAttrsStep extends Step {
|
|
8
8
|
pos: number;
|
9
9
|
attrs: object;
|
10
10
|
constructor(pos: number, attrs: object);
|
11
|
-
apply(doc: ProseMirrorNode): StepResult
|
11
|
+
apply(doc: ProseMirrorNode): StepResult;
|
12
12
|
invert(doc: ProseMirrorNode): SetAttrsStep;
|
13
13
|
map(mapping: Mappable): SetAttrsStep | null;
|
14
14
|
toJSON(): {
|
@@ -29,7 +29,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
|
|
29
29
|
*
|
30
30
|
* @param doc Current document
|
31
31
|
*/
|
32
|
-
apply(doc: ProseMirrorNode
|
32
|
+
apply(doc: ProseMirrorNode): StepResult;
|
33
33
|
/**
|
34
34
|
* Update tablePos with the new position. If tablePos doesnt exist any more remove the step
|
35
35
|
* Update all the cellStep inside columnInfo. If cellStep.from position gets deleted removed it from column info
|
@@ -37,7 +37,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
|
|
37
37
|
* Create a new step with all the position updated
|
38
38
|
* @param mapping
|
39
39
|
*/
|
40
|
-
map(mapping: Mappable): Step
|
40
|
+
map(mapping: Mappable): Step | null;
|
41
41
|
/**
|
42
42
|
* if isDelete
|
43
43
|
* Get the original cell node at columnInfo.cellStep[].from to columnInfo.cellStep[].to
|
@@ -49,7 +49,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
|
|
49
49
|
* return new step inverted
|
50
50
|
* @param originalDoc
|
51
51
|
*/
|
52
|
-
invert(originalDoc: ProseMirrorNode
|
52
|
+
invert(originalDoc: ProseMirrorNode): Step;
|
53
53
|
/**
|
54
54
|
* StepMap is created based on columnInfo.
|
55
55
|
* ColumnInfo is created on constructor and once is applied (the document could have new cells that weren't part of the original set)
|
@@ -70,7 +70,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
|
|
70
70
|
* after it. Returns the merged step when possible, null if the
|
71
71
|
* steps can't be merged.
|
72
72
|
*/
|
73
|
-
merge(other: Step
|
73
|
+
merge(other: Step): Step | null;
|
74
74
|
/**
|
75
75
|
* Create a JSON-serializeable representation of this step. When
|
76
76
|
* defining this for a custom subclass, make sure the result object
|
@@ -82,7 +82,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
|
|
82
82
|
* Deserialize a step from its JSON representation. Will call
|
83
83
|
* through to the step class' own implementation of this method.
|
84
84
|
*/
|
85
|
-
static fromJSON<S extends Schema = any>(schema: S, json: AddColumnStepJson): Step
|
85
|
+
static fromJSON<S extends Schema = any>(schema: S, json: AddColumnStepJson): Step;
|
86
86
|
static create(doc: ProseMirrorNode, tablePos: number, column: number, isDelete?: boolean): AddColumnStep<any>;
|
87
87
|
private applyCellSteps;
|
88
88
|
}
|
@@ -8,11 +8,11 @@ export declare class TableSortStep extends Step {
|
|
8
8
|
pos: number;
|
9
9
|
constructor(pos: number, prev?: TableColumnOrdering, next?: TableColumnOrdering);
|
10
10
|
invert(): TableSortStep;
|
11
|
-
apply(doc: PMNode): StepResult
|
11
|
+
apply(doc: PMNode): StepResult;
|
12
12
|
map(): null;
|
13
13
|
getMap(): StepMap;
|
14
14
|
toJSON(): {
|
15
15
|
stepType: string;
|
16
16
|
};
|
17
|
-
static fromJSON(): ReplaceStep
|
17
|
+
static fromJSON(): ReplaceStep;
|
18
18
|
}
|
@@ -19,7 +19,7 @@ export declare class InsertTypeAheadStep extends Step {
|
|
19
19
|
trigger: string;
|
20
20
|
constructor({ stage, query, trigger, selectedIndex }: Config, isInvertStep?: boolean);
|
21
21
|
invert(): InsertTypeAheadStep;
|
22
|
-
apply(doc: PMNode): StepResult
|
22
|
+
apply(doc: PMNode): StepResult;
|
23
23
|
merge(): null;
|
24
24
|
isInsertionStep(): boolean;
|
25
25
|
isUndoingStep(): boolean;
|
@@ -30,6 +30,6 @@ export declare class InsertTypeAheadStep extends Step {
|
|
30
30
|
from: number;
|
31
31
|
to: number;
|
32
32
|
};
|
33
|
-
static fromJSON(): ReplaceStep
|
33
|
+
static fromJSON(): ReplaceStep;
|
34
34
|
}
|
35
35
|
export {};
|
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.
|
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,12 +58,9 @@
|
|
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
|
-
"@types/prosemirror-history": "^1.0.1",
|
65
|
-
"@types/prosemirror-model": "^1.11.0",
|
66
|
-
"@types/prosemirror-state": "^1.2.0",
|
67
64
|
"prosemirror-history": "^1.1.3",
|
68
65
|
"prosemirror-state": "1.3.4",
|
69
66
|
"typescript": "~4.9.5"
|