@atlaskit/adf-schema 24.0.3 → 25.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 +110 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/schema/bitbucket-schema.js +3 -0
- package/dist/cjs/schema/confluence-schema.js +8 -0
- package/dist/cjs/schema/create-schema.js +1 -1
- package/dist/cjs/schema/index.js +6 -0
- package/dist/cjs/schema/jira-schema.js +47 -0
- package/dist/cjs/schema/marks/alignment.js +1 -1
- package/dist/cjs/schema/marks/annotation.js +1 -1
- package/dist/cjs/schema/marks/text-color.js +7 -15
- package/dist/cjs/schema/nodes/bullet-list.js +0 -5
- package/dist/cjs/schema/nodes/index.js +6 -0
- package/dist/cjs/schema/nodes/list-item.js +0 -6
- package/dist/cjs/schema/nodes/media.js +3 -0
- package/dist/cjs/schema/nodes/ordered-list.js +66 -6
- package/dist/cjs/schema/nodes/tableNodes.js +11 -6
- package/dist/cjs/schema/nodes/types/list.js +5 -0
- package/dist/cjs/utils/url.js +7 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/index.js +3 -1
- package/dist/es2019/schema/bitbucket-schema.js +4 -0
- package/dist/es2019/schema/confluence-schema.js +8 -0
- package/dist/es2019/schema/create-schema.js +2 -2
- package/dist/es2019/schema/index.js +4 -2
- package/dist/es2019/schema/jira-schema.js +48 -0
- package/dist/es2019/schema/marks/alignment.js +1 -1
- package/dist/es2019/schema/marks/annotation.js +1 -1
- package/dist/es2019/schema/marks/text-color.js +7 -9
- package/dist/es2019/schema/nodes/bullet-list.js +0 -5
- package/dist/es2019/schema/nodes/index.js +1 -1
- package/dist/es2019/schema/nodes/list-item.js +0 -6
- package/dist/es2019/schema/nodes/media.js +3 -0
- package/dist/es2019/schema/nodes/ordered-list.js +55 -5
- package/dist/es2019/schema/nodes/tableNodes.js +11 -6
- package/dist/es2019/schema/nodes/types/list.js +1 -0
- package/dist/es2019/utils/url.js +7 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/schema/bitbucket-schema.js +4 -0
- package/dist/esm/schema/confluence-schema.js +8 -0
- package/dist/esm/schema/create-schema.js +2 -2
- package/dist/esm/schema/index.js +4 -2
- package/dist/esm/schema/jira-schema.js +48 -0
- package/dist/esm/schema/marks/alignment.js +1 -1
- package/dist/esm/schema/marks/annotation.js +1 -1
- package/dist/esm/schema/marks/text-color.js +7 -15
- package/dist/esm/schema/nodes/bullet-list.js +0 -5
- package/dist/esm/schema/nodes/index.js +1 -1
- package/dist/esm/schema/nodes/list-item.js +0 -6
- package/dist/esm/schema/nodes/media.js +3 -0
- package/dist/esm/schema/nodes/ordered-list.js +59 -5
- package/dist/esm/schema/nodes/tableNodes.js +11 -6
- package/dist/esm/schema/nodes/types/list.js +1 -0
- package/dist/esm/utils/url.js +7 -2
- package/dist/esm/version.json +1 -1
- package/dist/json-schema/v1/full.json +38 -41
- package/dist/json-schema/v1/stage-0.json +38 -41
- package/dist/types/index.d.ts +3 -1
- package/dist/types/schema/bitbucket-schema.d.ts +3 -0
- package/dist/types/schema/confluence-schema.d.ts +6 -0
- package/dist/types/schema/index.d.ts +4 -2
- package/dist/types/schema/jira-schema.d.ts +39 -0
- package/dist/types/schema/marks/text-color.d.ts +1 -0
- package/dist/types/schema/nodes/bullet-list.d.ts +0 -11
- package/dist/types/schema/nodes/index.d.ts +4 -4
- package/dist/types/schema/nodes/list-item.d.ts +0 -18
- package/dist/types/schema/nodes/media.d.ts +1 -0
- package/dist/types/schema/nodes/ordered-list.d.ts +1 -17
- package/dist/types/schema/nodes/panel.d.ts +2 -2
- package/dist/types/schema/nodes/tableNodes.d.ts +2 -2
- package/dist/types/schema/nodes/types/block-content.d.ts +2 -2
- package/dist/types/schema/nodes/types/list.d.ts +42 -0
- package/dist/types/schema/nodes/types/non-nestable-block-content.d.ts +2 -2
- package/dist/types/utils/url.d.ts +4 -0
- package/json-schema/v1/full.json +38 -41
- package/json-schema/v1/stage-0.json +38 -41
- package/package.json +3 -3
- package/report.api.md +19 -3
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,115 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 25.1.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- [`055a333dad9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/055a333dad9) - [ux] Remove `moreTextColors` feature flag and deprecate `allowMoreTextColors` field of `allowTextColor` editor prop and `colorPaletteExtended` mark.
|
8
|
+
|
9
|
+
Showing more colors in the color selection palette is now a default behaviour.
|
10
|
+
|
11
|
+
## **DEPRECATION WARNING:**
|
12
|
+
|
13
|
+
There are 2 deprecations in this change:
|
14
|
+
|
15
|
+
### 1. `allowMoreTextColors` field of `allowTextColor` editor prop.
|
16
|
+
|
17
|
+
`allowMoreTextColors` field of `allowTextColor` editor prop. **is now deprecated and will be removed in the next stable release of `@atlaskit/editor-core` package**. Please take steps to remove that field from your code. E.g.:
|
18
|
+
|
19
|
+
```tsx
|
20
|
+
<Editor
|
21
|
+
...
|
22
|
+
allowTextColor ={
|
23
|
+
allowMoreTextColors: true // <-- Deprecated
|
24
|
+
defaultColour: {color: 'red', label: 'red'}
|
25
|
+
}
|
26
|
+
/>
|
27
|
+
```
|
28
|
+
|
29
|
+
Remove all instances of `allowMoreTextColors` field from `allowTextColor` `Editor` prop. I.e.:
|
30
|
+
|
31
|
+
```tsx
|
32
|
+
<Editor
|
33
|
+
...
|
34
|
+
allowTextColor ={
|
35
|
+
defaultColour: {color: 'red', label: 'red'}
|
36
|
+
}
|
37
|
+
/>
|
38
|
+
```
|
39
|
+
|
40
|
+
If the resulting `allowTextColor` prop is an empty object, set `allowTextColor` property value to `true`. E.g.:
|
41
|
+
|
42
|
+
```tsx
|
43
|
+
<Editor
|
44
|
+
appearance="full-page"
|
45
|
+
...
|
46
|
+
allowTextColor ={
|
47
|
+
allowMoreTextColors: true // <-- Invalid
|
48
|
+
}
|
49
|
+
/>
|
50
|
+
```
|
51
|
+
|
52
|
+
should become
|
53
|
+
|
54
|
+
```tsx
|
55
|
+
<Editor
|
56
|
+
appearance="full-page"
|
57
|
+
...
|
58
|
+
allowTextColor={true}
|
59
|
+
/>
|
60
|
+
```
|
61
|
+
|
62
|
+
### 2. `colorPaletteExtended` mark of the ADF schema
|
63
|
+
|
64
|
+
`colorPaletteExtended` mark of the ADF schema **is now deprecated and will be removed in the next stable release**. The extended palette is now rolled into the main one. use `colorPalette` instead.
|
65
|
+
|
66
|
+
## 25.0.0
|
67
|
+
|
68
|
+
### Major Changes
|
69
|
+
|
70
|
+
- [`5d317ed8aa3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5d317ed8aa3) - [ux] ED-15882: Implement custom starting numbers for orderedList nodes in adf-schema, editor, renderer, transformers behind restartNumberedLists feature flag. Users will be able to set a custom starting number when typing to create a numbered list in the Editor and this will be persisted across Renderer and other format transformations.
|
71
|
+
|
72
|
+
Note: restartNumberedLists will be off by default. To enable it, consumers will need to set <Editor featureFlags={{ restartNumberedLists: true }}> or <Renderer featureFlags={{ restartNumberedLists: true }}>
|
73
|
+
|
74
|
+
### Minor Changes
|
75
|
+
|
76
|
+
- [`92613b1f023`](https://bitbucket.org/atlassian/atlassian-frontend/commits/92613b1f023) - ED-15018 and ED-13913 - Remove all circular dependencies and ignored warnings in editor
|
77
|
+
|
78
|
+
### Patch Changes
|
79
|
+
|
80
|
+
- [`aa3c130c43a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/aa3c130c43a) - Changes the annotation mark to inclusive in order to fix the annotation being deleted when doing composition
|
81
|
+
- [`7590e54ccc2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7590e54ccc2) - ED-15676 deprecated product-specific schema exports from @atlaskit/adf-schema (`schema-bitbucket`, `schema-confluence` and `schema-jira`). Use `@atlaskit/adf-schema/schema-default` instead.
|
82
|
+
|
83
|
+
From `@atlaskit/adf-schema/schema-bitbucket`
|
84
|
+
|
85
|
+
- `default (bitbucketSchema)`
|
86
|
+
|
87
|
+
From `@atlaskit/adf-schema/schema-confluence`
|
88
|
+
|
89
|
+
- `default (confluenceSchema)`
|
90
|
+
- `confluenceSchemaWithMediaSingle`
|
91
|
+
|
92
|
+
From `@atlaskit/adf-schema/schema-jira`
|
93
|
+
|
94
|
+
- `default (jiraSchema)`
|
95
|
+
- `JIRASchemaConfig`
|
96
|
+
- `isSchemaWithLists`
|
97
|
+
- `isSchemaWithMentions`
|
98
|
+
- `isSchemaWithEmojis`
|
99
|
+
- `isSchemaWithLinks`
|
100
|
+
- `isSchemaWithAdvancedTextFormattingMarks`
|
101
|
+
- `isSchemaWithSubSupMark`
|
102
|
+
- `isSchemaWithCodeBlock`
|
103
|
+
- `isSchemaWithBlockQuotes`
|
104
|
+
- `isSchemaWithMedia`
|
105
|
+
- `isSchemaWithTextColor`
|
106
|
+
- `isSchemaWithTables`
|
107
|
+
|
108
|
+
- [`ec05886ac07`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ec05886ac07) - [ux] ED-15871 Fixed issue with pasting a table from renderer does not respect theme mode
|
109
|
+
- [`3a35da6c331`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3a35da6c331) - DTR-825 ED-9775: added jamfselfservice:// to whitelistedURLPatterns
|
110
|
+
- [`1267ffe2c42`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1267ffe2c42) - Add media traceId into copy/paste operations
|
111
|
+
- [`b2fa6d3e611`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b2fa6d3e611) - [ED-16106] Fix margin top when paragraph has alignment marks
|
112
|
+
|
3
113
|
## 24.0.3
|
4
114
|
|
5
115
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
@@ -759,6 +759,12 @@ Object.defineProperty(exports, "orderedListSelector", {
|
|
759
759
|
return _schema.orderedListSelector;
|
760
760
|
}
|
761
761
|
});
|
762
|
+
Object.defineProperty(exports, "orderedListWithOrder", {
|
763
|
+
enumerable: true,
|
764
|
+
get: function get() {
|
765
|
+
return _schema.orderedListWithOrder;
|
766
|
+
}
|
767
|
+
});
|
762
768
|
Object.defineProperty(exports, "panel", {
|
763
769
|
enumerable: true,
|
764
770
|
get: function get() {
|
@@ -7,6 +7,9 @@ exports.bitbucketSchema = void 0;
|
|
7
7
|
|
8
8
|
var _createSchema = require("./create-schema");
|
9
9
|
|
10
|
+
/**
|
11
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
12
|
+
**/
|
10
13
|
var bitbucketSchema = (0, _createSchema.createSchema)({
|
11
14
|
nodes: ['doc', 'caption', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'hardBreak', 'rule', 'image', 'media', 'mediaSingle', 'mention', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'inlineCard', 'unsupportedBlock', 'unsupportedInline'],
|
12
15
|
marks: ['em', 'strong', 'strike', 'link', 'code', 'unsupportedMark', 'unsupportedNodeAttribute']
|
@@ -9,10 +9,18 @@ var _createSchema = require("./create-schema");
|
|
9
9
|
|
10
10
|
var nodes = ['doc', 'paragraph', 'blockquote', 'codeBlock', 'panel', 'hardBreak', 'orderedList', 'bulletList', 'heading', 'mediaInline', 'mediaGroup', 'mediaSingle', 'media', 'caption', 'confluenceUnsupportedBlock', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'listItem', 'mention', 'text', 'confluenceUnsupportedInline', 'media', 'rule', 'table', 'tableCell', 'tableHeader', 'tableRow', 'emoji', 'taskList', 'taskItem', 'date', 'placeholder', 'decisionList', 'decisionItem', 'layoutSection', 'layoutColumn', 'inlineCard', 'unsupportedBlock', 'unsupportedInline'];
|
11
11
|
var marks = ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'mentionQuery', 'code', 'textColor', 'confluenceInlineComment', 'annotation', 'unsupportedMark', 'unsupportedNodeAttribute'];
|
12
|
+
/**
|
13
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
14
|
+
**/
|
15
|
+
|
12
16
|
var confluenceSchema = (0, _createSchema.createSchema)({
|
13
17
|
nodes: nodes,
|
14
18
|
marks: marks
|
15
19
|
});
|
20
|
+
/**
|
21
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
22
|
+
**/
|
23
|
+
|
16
24
|
exports.confluenceSchema = confluenceSchema;
|
17
25
|
var confluenceSchemaWithMediaSingle = (0, _createSchema.createSchema)({
|
18
26
|
nodes: nodes.concat('mediaSingle'),
|
package/dist/cjs/schema/index.js
CHANGED
@@ -405,6 +405,12 @@ Object.defineProperty(exports, "orderedListSelector", {
|
|
405
405
|
return _nodes.orderedListSelector;
|
406
406
|
}
|
407
407
|
});
|
408
|
+
Object.defineProperty(exports, "orderedListWithOrder", {
|
409
|
+
enumerable: true,
|
410
|
+
get: function get() {
|
411
|
+
return _nodes.orderedListWithOrder;
|
412
|
+
}
|
413
|
+
});
|
408
414
|
Object.defineProperty(exports, "panel", {
|
409
415
|
enumerable: true,
|
410
416
|
get: function get() {
|
@@ -18,6 +18,9 @@ exports.isSchemaWithTextColor = isSchemaWithTextColor;
|
|
18
18
|
|
19
19
|
var _createSchema = require("./create-schema");
|
20
20
|
|
21
|
+
/**
|
22
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
23
|
+
**/
|
21
24
|
function makeSchema(config) {
|
22
25
|
var nodes = ['doc', 'paragraph', 'text', 'hardBreak', 'heading', 'rule'];
|
23
26
|
var marks = ['strong', 'em', 'underline', 'typeAheadQuery', 'unsupportedMark', 'unsupportedNodeAttribute'];
|
@@ -72,46 +75,90 @@ function makeSchema(config) {
|
|
72
75
|
marks: marks
|
73
76
|
});
|
74
77
|
}
|
78
|
+
/**
|
79
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
80
|
+
**/
|
81
|
+
|
75
82
|
|
76
83
|
function isSchemaWithLists(schema) {
|
77
84
|
return !!schema.nodes.bulletList;
|
78
85
|
}
|
86
|
+
/**
|
87
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
88
|
+
**/
|
89
|
+
|
79
90
|
|
80
91
|
function isSchemaWithMentions(schema) {
|
81
92
|
return !!schema.nodes.mention;
|
82
93
|
}
|
94
|
+
/**
|
95
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
96
|
+
**/
|
97
|
+
|
83
98
|
|
84
99
|
function isSchemaWithEmojis(schema) {
|
85
100
|
return !!schema.nodes.emoji;
|
86
101
|
}
|
102
|
+
/**
|
103
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
104
|
+
**/
|
105
|
+
|
87
106
|
|
88
107
|
function isSchemaWithLinks(schema) {
|
89
108
|
return !!schema.marks.link;
|
90
109
|
}
|
110
|
+
/**
|
111
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
112
|
+
**/
|
113
|
+
|
91
114
|
|
92
115
|
function isSchemaWithAdvancedTextFormattingMarks(schema) {
|
93
116
|
return !!schema.marks.code && !!schema.marks.strike;
|
94
117
|
}
|
118
|
+
/**
|
119
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
120
|
+
**/
|
121
|
+
|
95
122
|
|
96
123
|
function isSchemaWithSubSupMark(schema) {
|
97
124
|
return !!schema.marks.subsup;
|
98
125
|
}
|
126
|
+
/**
|
127
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
128
|
+
**/
|
129
|
+
|
99
130
|
|
100
131
|
function isSchemaWithCodeBlock(schema) {
|
101
132
|
return !!schema.nodes.codeBlock;
|
102
133
|
}
|
134
|
+
/**
|
135
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
136
|
+
**/
|
137
|
+
|
103
138
|
|
104
139
|
function isSchemaWithBlockQuotes(schema) {
|
105
140
|
return !!schema.nodes.blockquote;
|
106
141
|
}
|
142
|
+
/**
|
143
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
144
|
+
**/
|
145
|
+
|
107
146
|
|
108
147
|
function isSchemaWithMedia(schema) {
|
109
148
|
return !!schema.nodes.mediaGroup && !!schema.nodes.media && !!schema.nodes.mediaInline;
|
110
149
|
}
|
150
|
+
/**
|
151
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
152
|
+
**/
|
153
|
+
|
111
154
|
|
112
155
|
function isSchemaWithTextColor(schema) {
|
113
156
|
return !!schema.marks.textColor;
|
114
157
|
}
|
158
|
+
/**
|
159
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
160
|
+
**/
|
161
|
+
|
115
162
|
|
116
163
|
function isSchemaWithTables(schema) {
|
117
164
|
return !!schema.nodes.table && !!schema.nodes.tableCell && !!schema.nodes.tableHeader && !!schema.nodes.tableRow;
|
@@ -31,7 +31,7 @@ var alignment = {
|
|
31
31
|
}],
|
32
32
|
toDOM: function toDOM(mark) {
|
33
33
|
return ['div', {
|
34
|
-
class: "fabric-editor-block-mark fabric-editor-align-".concat(mark.attrs.align),
|
34
|
+
class: "fabric-editor-block-mark fabric-editor-alignment fabric-editor-align-".concat(mark.attrs.align),
|
35
35
|
'data-align': mark.attrs.align
|
36
36
|
}, 0];
|
37
37
|
}
|
@@ -17,11 +17,8 @@ var _groups = require("../groups");
|
|
17
17
|
|
18
18
|
var _colors = require("../../utils/colors");
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
[_colors.N80, 'Light gray'], [_colors.P300, 'Purple'], [_colors.T300, 'Teal'], [_colors.G300, 'Green'], [_colors.R300, 'Red'], [_colors.Y400, 'Orange']]; // used for extended palette in text color picker
|
23
|
-
|
24
|
-
var colorArrayPaletteExtended = [// default row - first color is added programatically
|
20
|
+
// used for extended palette in text color picker
|
21
|
+
var colorArrayPalette = [// default row - first color is added programatically
|
25
22
|
// [N800, 'Squid ink'], // default dark gray
|
26
23
|
[_colors.B500, 'Dark blue'], // Chore coat
|
27
24
|
[_colors.T500, 'Dark teal'], // Shabby chic
|
@@ -47,8 +44,10 @@ var colorArrayPaletteExtended = [// default row - first color is added programat
|
|
47
44
|
]; // @see https://product-fabric.atlassian.net/wiki/spaces/E/pages/55979455/Colour+picker+decisions#Colourpickerdecisions-Visualdesigndecisions
|
48
45
|
|
49
46
|
var colorPalette = new Map();
|
47
|
+
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
48
|
+
|
50
49
|
exports.colorPalette = colorPalette;
|
51
|
-
var colorPaletteExtended =
|
50
|
+
var colorPaletteExtended = colorPalette;
|
52
51
|
exports.colorPaletteExtended = colorPaletteExtended;
|
53
52
|
colorArrayPalette.forEach(function (_ref) {
|
54
53
|
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
@@ -57,13 +56,6 @@ colorArrayPalette.forEach(function (_ref) {
|
|
57
56
|
|
58
57
|
return colorPalette.set(color.toLowerCase(), label);
|
59
58
|
});
|
60
|
-
colorArrayPaletteExtended.forEach(function (_ref3) {
|
61
|
-
var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
|
62
|
-
color = _ref4[0],
|
63
|
-
label = _ref4[1];
|
64
|
-
|
65
|
-
return colorPaletteExtended.set(color.toLowerCase(), label);
|
66
|
-
});
|
67
59
|
var textColor = {
|
68
60
|
attrs: {
|
69
61
|
color: {}
|
@@ -83,7 +75,7 @@ var textColor = {
|
|
83
75
|
} // else handle other colour formats
|
84
76
|
|
85
77
|
|
86
|
-
return hexColor &&
|
78
|
+
return hexColor && colorPalette.has(hexColor) ? {
|
87
79
|
color: hexColor
|
88
80
|
} : false;
|
89
81
|
}
|
@@ -103,7 +95,7 @@ var textColor = {
|
|
103
95
|
}
|
104
96
|
|
105
97
|
var hexColor = maybeElement.dataset.textCustomColor;
|
106
|
-
return hexColor &&
|
98
|
+
return hexColor && colorPalette.has(hexColor) ? {
|
107
99
|
color: hexColor
|
108
100
|
} : false;
|
109
101
|
}
|
@@ -4,11 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.bulletListSelector = exports.bulletList = void 0;
|
7
|
-
// eslint-disable-next-line import/no-cycle
|
8
|
-
|
9
|
-
/**
|
10
|
-
* @name bulletList_node
|
11
|
-
*/
|
12
7
|
var bulletListSelector = '.ak-ul';
|
13
8
|
exports.bulletListSelector = bulletListSelector;
|
14
9
|
var bulletList = {
|
@@ -281,6 +281,12 @@ Object.defineProperty(exports, "orderedListSelector", {
|
|
281
281
|
return _orderedList.orderedListSelector;
|
282
282
|
}
|
283
283
|
});
|
284
|
+
Object.defineProperty(exports, "orderedListWithOrder", {
|
285
|
+
enumerable: true,
|
286
|
+
get: function get() {
|
287
|
+
return _orderedList.orderedListWithOrder;
|
288
|
+
}
|
289
|
+
});
|
284
290
|
Object.defineProperty(exports, "panel", {
|
285
291
|
enumerable: true,
|
286
292
|
get: function get() {
|
@@ -4,12 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.listItem = void 0;
|
7
|
-
// eslint-disable-next-line import/no-cycle
|
8
|
-
// eslint-disable-next-line import/no-cycle
|
9
|
-
|
10
|
-
/**
|
11
|
-
* @name listItem_node
|
12
|
-
*/
|
13
7
|
var listItem = {
|
14
8
|
content: '(paragraph | mediaSingle | codeBlock) (paragraph | bulletList | orderedList | mediaSingle | codeBlock)*',
|
15
9
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
@@ -1,18 +1,27 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
4
6
|
value: true
|
5
7
|
});
|
6
|
-
exports.orderedListSelector = exports.orderedList = void 0;
|
7
|
-
|
8
|
+
exports.orderedListWithOrder = exports.orderedListSelector = exports.orderedList = void 0;
|
9
|
+
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
11
|
+
|
12
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
13
|
+
|
14
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
8
15
|
|
9
|
-
/**
|
10
|
-
* @name orderedList_node
|
11
|
-
*/
|
12
16
|
var orderedListSelector = '.ak-ol';
|
13
17
|
exports.orderedListSelector = orderedListSelector;
|
14
18
|
var orderedList = {
|
15
19
|
group: 'block',
|
20
|
+
attrs: {
|
21
|
+
order: {
|
22
|
+
default: 1
|
23
|
+
}
|
24
|
+
},
|
16
25
|
content: 'listItem+',
|
17
26
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
18
27
|
selectable: false,
|
@@ -25,5 +34,56 @@ var orderedList = {
|
|
25
34
|
};
|
26
35
|
return ['ol', attrs, 0];
|
27
36
|
}
|
37
|
+
}; // resolve "start" to a safe, 0+ integer, otherwise return undefined
|
38
|
+
// Note: Any changes to this function should also be made to "resolveOrder"
|
39
|
+
// in packages/editor/editor-common/src/utils/list.ts
|
40
|
+
|
41
|
+
exports.orderedList = orderedList;
|
42
|
+
|
43
|
+
var resolveStart = function resolveStart(start) {
|
44
|
+
var num = Number(start);
|
45
|
+
|
46
|
+
if (Number.isNaN(num)) {
|
47
|
+
return;
|
48
|
+
}
|
49
|
+
|
50
|
+
if (num < 0) {
|
51
|
+
return;
|
52
|
+
}
|
53
|
+
|
54
|
+
return Math.floor(Math.max(num, 0));
|
28
55
|
};
|
29
|
-
|
56
|
+
|
57
|
+
var orderedListWithOrder = _objectSpread(_objectSpread({}, orderedList), {}, {
|
58
|
+
parseDOM: [{
|
59
|
+
tag: 'ol',
|
60
|
+
getAttrs: function getAttrs(domNode) {
|
61
|
+
var dom = domNode;
|
62
|
+
var startDOMAttr = dom.getAttribute('start');
|
63
|
+
|
64
|
+
if (startDOMAttr) {
|
65
|
+
var start = resolveStart(startDOMAttr);
|
66
|
+
|
67
|
+
if (typeof start === 'number') {
|
68
|
+
return {
|
69
|
+
order: start
|
70
|
+
};
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
return null;
|
75
|
+
}
|
76
|
+
}],
|
77
|
+
toDOM: function toDOM(node) {
|
78
|
+
var _node$attrs;
|
79
|
+
|
80
|
+
var start = resolveStart(node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.order);
|
81
|
+
var attrs = {
|
82
|
+
start: typeof start === 'number' ? String(start) : undefined,
|
83
|
+
class: orderedListSelector.substr(1)
|
84
|
+
};
|
85
|
+
return ['ol', attrs, 0];
|
86
|
+
}
|
87
|
+
});
|
88
|
+
|
89
|
+
exports.orderedListWithOrder = orderedListWithOrder;
|
@@ -33,13 +33,17 @@ var getCellAttrs = function getCellAttrs(dom) {
|
|
33
33
|
return Number(str);
|
34
34
|
}) : null;
|
35
35
|
var colspan = Number(dom.getAttribute('colspan') || 1);
|
36
|
-
var backgroundColor = dom.style.backgroundColor;
|
36
|
+
var backgroundColor = dom.style.backgroundColor; // ignore setting background attr if ds neutral token is detected
|
37
37
|
|
38
|
-
if (backgroundColor
|
39
|
-
|
38
|
+
if (backgroundColor.includes('--ds-background-neutral')) {
|
39
|
+
backgroundColor = '';
|
40
|
+
} else {
|
41
|
+
if (backgroundColor && (0, _colors.isRgb)(backgroundColor)) {
|
42
|
+
var result = (0, _colors.rgbToHex)(backgroundColor);
|
40
43
|
|
41
|
-
|
42
|
-
|
44
|
+
if (result !== null) {
|
45
|
+
backgroundColor = result;
|
46
|
+
}
|
43
47
|
}
|
44
48
|
}
|
45
49
|
|
@@ -77,8 +81,9 @@ var getCellDomAttrs = function getCellDomAttrs(node) {
|
|
77
81
|
var background = node.attrs.background; // to ensure that we don't overwrite product's style:
|
78
82
|
// - it clears background color for <th> if its set to gray
|
79
83
|
// - it clears background color for <td> if its set to white
|
84
|
+
// - it clears background color for <th> if ds neutral token is detected
|
80
85
|
|
81
|
-
var ignored = nodeType === 'tableHeader' && background === tableBackgroundColorNames.get('light gray') || nodeType === 'tableCell' && background === tableBackgroundColorNames.get('white');
|
86
|
+
var ignored = nodeType === 'tableHeader' && background === tableBackgroundColorNames.get('light gray') || nodeType === 'tableCell' && background === tableBackgroundColorNames.get('white') || nodeType === 'tableHeader' && background.includes('--ds-background-neutral');
|
82
87
|
|
83
88
|
if (ignored) {
|
84
89
|
attrs.style = '';
|
package/dist/cjs/utils/url.js
CHANGED
@@ -12,7 +12,11 @@ exports.normalizeUrl = normalizeUrl;
|
|
12
12
|
|
13
13
|
var _linkifyIt = _interopRequireDefault(require("linkify-it"));
|
14
14
|
|
15
|
-
|
15
|
+
/**
|
16
|
+
* This file has been duplicated in packages/linking-platform/link-picker/src/common/utils/url.ts
|
17
|
+
* Any changes made here should be mirrored there.
|
18
|
+
*/
|
19
|
+
var whitelistedURLPatterns = [/^https?:\/\//im, /^ftps?:\/\//im, /^jamfselfservice:\/\//im, /^\//im, /^mailto:/im, /^skype:/im, /^callto:/im, /^facetime:/im, /^git:/im, /^irc6?:/im, /^news:/im, /^nntp:/im, /^feed:/im, /^cvs:/im, /^svn:/im, /^mvn:/im, /^ssh:/im, /^scp:\/\//im, /^sftp:\/\//im, /^itms:/im, /^notes:/im, /^hipchat:\/\//im, /^sourcetree:/im, /^urn:/im, /^tel:/im, /^xmpp:/im, /^telnet:/im, /^vnc:/im, /^rdp:/im, /^whatsapp:/im, /^slack:/im, /^sips?:/im, /^magnet:/im, /^#/im];
|
16
20
|
/**
|
17
21
|
* Please notify the Editor Mobile team (Slack: #help-mobilekit) if the logic for this changes.
|
18
22
|
*/
|
@@ -33,11 +37,12 @@ exports.isSafeUrl = isSafeUrl;
|
|
33
37
|
var linkify = (0, _linkifyIt.default)();
|
34
38
|
exports.linkify = linkify;
|
35
39
|
linkify.add('sourcetree:', 'http:');
|
40
|
+
linkify.add('jamfselfservice:', 'http:');
|
36
41
|
var tlds = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');
|
37
42
|
var tlds2Char = 'a[cdefgilmnoqrtuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrtuvwxyz]|n[acefgilopruz]|om|p[aefghkmnrtw]|qa|r[eosuw]|s[abcdegijklmnrtuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';
|
38
43
|
tlds.push(tlds2Char);
|
39
44
|
linkify.tlds(tlds, false);
|
40
|
-
var LINK_REGEXP = /(https?|ftp):\/\/[^\s]+/;
|
45
|
+
var LINK_REGEXP = /(https?|ftp|jamfselfservice):\/\/[^\s]+/;
|
41
46
|
exports.LINK_REGEXP = LINK_REGEXP;
|
42
47
|
|
43
48
|
var linkifyMatch = function linkifyMatch(text) {
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/index.js
CHANGED
@@ -1,2 +1,4 @@
|
|
1
|
-
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette,
|
1
|
+
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette,
|
2
|
+
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
3
|
+
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute } from './schema';
|
2
4
|
export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid } from './utils';
|
@@ -1,4 +1,8 @@
|
|
1
1
|
import { createSchema } from './create-schema';
|
2
|
+
/**
|
3
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
4
|
+
**/
|
5
|
+
|
2
6
|
export const bitbucketSchema = createSchema({
|
3
7
|
nodes: ['doc', 'caption', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'hardBreak', 'rule', 'image', 'media', 'mediaSingle', 'mention', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'inlineCard', 'unsupportedBlock', 'unsupportedInline'],
|
4
8
|
marks: ['em', 'strong', 'strike', 'link', 'code', 'unsupportedMark', 'unsupportedNodeAttribute']
|
@@ -1,10 +1,18 @@
|
|
1
1
|
import { createSchema } from './create-schema';
|
2
2
|
const nodes = ['doc', 'paragraph', 'blockquote', 'codeBlock', 'panel', 'hardBreak', 'orderedList', 'bulletList', 'heading', 'mediaInline', 'mediaGroup', 'mediaSingle', 'media', 'caption', 'confluenceUnsupportedBlock', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'listItem', 'mention', 'text', 'confluenceUnsupportedInline', 'media', 'rule', 'table', 'tableCell', 'tableHeader', 'tableRow', 'emoji', 'taskList', 'taskItem', 'date', 'placeholder', 'decisionList', 'decisionItem', 'layoutSection', 'layoutColumn', 'inlineCard', 'unsupportedBlock', 'unsupportedInline'];
|
3
3
|
const marks = ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'mentionQuery', 'code', 'textColor', 'confluenceInlineComment', 'annotation', 'unsupportedMark', 'unsupportedNodeAttribute'];
|
4
|
+
/**
|
5
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
6
|
+
**/
|
7
|
+
|
4
8
|
export const confluenceSchema = createSchema({
|
5
9
|
nodes,
|
6
10
|
marks
|
7
11
|
});
|
12
|
+
/**
|
13
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
14
|
+
**/
|
15
|
+
|
8
16
|
export const confluenceSchemaWithMediaSingle = createSchema({
|
9
17
|
nodes: nodes.concat('mediaSingle'),
|
10
18
|
marks
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Schema } from 'prosemirror-model';
|
2
2
|
import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups';
|
3
3
|
import { link, em, strong, textColor, strike, subsup, underline, code, typeAheadQuery, confluenceInlineComment, breakout, alignment, indentation, annotation, unsupportedMark, unsupportedNodeAttribute, dataConsumer, fragment } from './marks';
|
4
|
-
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList,
|
4
|
+
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, blockquote, codeBlock, panel, rule, image, mention, media, mediaInline, mediaGroup, mediaSingleWithCaption, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expand, nestedExpand, embedCard, caption } from './nodes';
|
5
5
|
|
6
6
|
function addItems(builtInItems, config, customSpecs = {}) {
|
7
7
|
if (!config) {
|
@@ -68,7 +68,7 @@ const nodesInOrder = [{
|
|
68
68
|
spec: bulletList
|
69
69
|
}, {
|
70
70
|
name: 'orderedList',
|
71
|
-
spec:
|
71
|
+
spec: orderedListWithOrder
|
72
72
|
}, {
|
73
73
|
name: 'listItem',
|
74
74
|
spec: listItem
|