@atlaskit/adf-schema 52.2.1 → 52.2.2
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/codemods/23.0.0-move-bitbucket-schema-to-own-entry-points.ts +3 -2
- package/codemods/23.0.0-move-confluence-schema-to-own-entry-points.ts +3 -2
- package/codemods/23.0.0-move-default-schema-to-own-entry-points.ts +3 -2
- package/codemods/23.0.0-move-jira-schema-to-own-entry-points.ts +3 -2
- package/codemods/migrates/update-bitbucket-schema-entry-points.ts +5 -2
- package/codemods/migrates/update-confluence-schema-entry-points.ts +5 -2
- package/codemods/migrates/update-default-schema-entry-points.ts +5 -2
- package/codemods/migrates/update-jira-schema-entry-points.ts +5 -2
- package/dist/es2019/next-schema/marks/fragment.js +1 -1
- package/dist/esm/next-schema/marks/fragment.js +1 -1
- package/dist/types/next-schema/marks/fontSize.d.ts +2 -1
- package/dist/types/next-schema/marks/fragment.d.ts +1 -1
- package/dist/types-ts4.5/next-schema/marks/fontSize.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/marks/fragment.d.ts +1 -1
- package/package.json +2 -2
- package/schema-generators/__tests__/helpers/_utils.ts +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { createTransformer } from '@atlaskit/codemod-utils';
|
|
1
|
+
import { createTransformer, type API, type FileInfo, type Options } from '@atlaskit/codemod-utils';
|
|
2
2
|
import { updateImportEntryPointsForBitbucketSchema } from './migrates/update-bitbucket-schema-entry-points';
|
|
3
3
|
|
|
4
|
-
const transformer
|
|
4
|
+
const transformer: (fileInfo: FileInfo, { jscodeshift }: API, options: Options) => string =
|
|
5
|
+
createTransformer(updateImportEntryPointsForBitbucketSchema);
|
|
5
6
|
|
|
6
7
|
export default transformer;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { createTransformer } from '@atlaskit/codemod-utils';
|
|
1
|
+
import { createTransformer, type API, type FileInfo, type Options } from '@atlaskit/codemod-utils';
|
|
2
2
|
import { updateImportEntryPointsForConfluenceSchema } from './migrates/update-confluence-schema-entry-points';
|
|
3
3
|
|
|
4
|
-
const transformer
|
|
4
|
+
const transformer: (fileInfo: FileInfo, { jscodeshift }: API, options: Options) => string =
|
|
5
|
+
createTransformer(updateImportEntryPointsForConfluenceSchema);
|
|
5
6
|
|
|
6
7
|
export default transformer;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { createTransformer } from '@atlaskit/codemod-utils';
|
|
1
|
+
import { createTransformer, type API, type FileInfo, type Options } from '@atlaskit/codemod-utils';
|
|
2
2
|
import { updateImportEntryPointsForDefaultSchema } from './migrates/update-default-schema-entry-points';
|
|
3
3
|
|
|
4
|
-
const transformer
|
|
4
|
+
const transformer: (fileInfo: FileInfo, { jscodeshift }: API, options: Options) => string =
|
|
5
|
+
createTransformer(updateImportEntryPointsForDefaultSchema);
|
|
5
6
|
|
|
6
7
|
export default transformer;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { createTransformer } from '@atlaskit/codemod-utils';
|
|
1
|
+
import { createTransformer, type API, type FileInfo, type Options } from '@atlaskit/codemod-utils';
|
|
2
2
|
import { updateImportEntryPointsForJiraSchema } from './migrates/update-jira-schema-entry-points';
|
|
3
3
|
|
|
4
|
-
const transformer
|
|
4
|
+
const transformer: (fileInfo: FileInfo, { jscodeshift }: API, options: Options) => string =
|
|
5
|
+
createTransformer(updateImportEntryPointsForJiraSchema);
|
|
5
6
|
|
|
6
7
|
export default transformer;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { changeImportEntryPoint } from '@atlaskit/codemod-utils';
|
|
1
|
+
import { changeImportEntryPoint, type JSCodeshift, type Collection } from '@atlaskit/codemod-utils';
|
|
2
2
|
|
|
3
|
-
export const updateImportEntryPointsForBitbucketSchema
|
|
3
|
+
export const updateImportEntryPointsForBitbucketSchema: ((
|
|
4
|
+
j: JSCodeshift,
|
|
5
|
+
root: Collection<Node>,
|
|
6
|
+
) => void)[] = [
|
|
4
7
|
changeImportEntryPoint(
|
|
5
8
|
'@atlaskit/adf-schema',
|
|
6
9
|
'bitbucketSchema',
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { changeImportEntryPoint } from '@atlaskit/codemod-utils';
|
|
1
|
+
import { changeImportEntryPoint, type JSCodeshift, type Collection } from '@atlaskit/codemod-utils';
|
|
2
2
|
|
|
3
|
-
export const updateImportEntryPointsForConfluenceSchema
|
|
3
|
+
export const updateImportEntryPointsForConfluenceSchema: ((
|
|
4
|
+
j: JSCodeshift,
|
|
5
|
+
root: Collection<Node>,
|
|
6
|
+
) => void)[] = [
|
|
4
7
|
changeImportEntryPoint(
|
|
5
8
|
'@atlaskit/adf-schema',
|
|
6
9
|
'confluenceSchema',
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { changeImportEntryPoint } from '@atlaskit/codemod-utils';
|
|
1
|
+
import { changeImportEntryPoint, type JSCodeshift, type Collection } from '@atlaskit/codemod-utils';
|
|
2
2
|
|
|
3
|
-
export const updateImportEntryPointsForDefaultSchema
|
|
3
|
+
export const updateImportEntryPointsForDefaultSchema: ((
|
|
4
|
+
j: JSCodeshift,
|
|
5
|
+
root: Collection<Node>,
|
|
6
|
+
) => void)[] = [
|
|
4
7
|
changeImportEntryPoint(
|
|
5
8
|
'@atlaskit/adf-schema',
|
|
6
9
|
'defaultSchema',
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { changeImportEntryPoint } from '@atlaskit/codemod-utils';
|
|
1
|
+
import { changeImportEntryPoint, type JSCodeshift, type Collection } from '@atlaskit/codemod-utils';
|
|
2
2
|
|
|
3
|
-
export const updateImportEntryPointsForJiraSchema
|
|
3
|
+
export const updateImportEntryPointsForJiraSchema: ((
|
|
4
|
+
j: JSCodeshift,
|
|
5
|
+
root: Collection<Node>,
|
|
6
|
+
) => void)[] = [
|
|
4
7
|
changeImportEntryPoint(
|
|
5
8
|
'@atlaskit/adf-schema',
|
|
6
9
|
'createJIRASchema',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ADFMark, type ADFMarkSpec } from '@atlaskit/adf-schema-generator';
|
|
1
2
|
/**
|
|
2
3
|
* fontSize mark - applies size styling to block-level content
|
|
3
4
|
*
|
|
@@ -13,4 +14,4 @@
|
|
|
13
14
|
* }
|
|
14
15
|
* ```
|
|
15
16
|
*/
|
|
16
|
-
export declare const fontSize:
|
|
17
|
+
export declare const fontSize: ADFMark<ADFMarkSpec>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ADFMark, type ADFMarkSpec } from '@atlaskit/adf-schema-generator';
|
|
2
2
|
export declare const fragment: ADFMark<ADFMarkSpec>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ADFMark, type ADFMarkSpec } from '@atlaskit/adf-schema-generator';
|
|
1
2
|
/**
|
|
2
3
|
* fontSize mark - applies size styling to block-level content
|
|
3
4
|
*
|
|
@@ -13,4 +14,4 @@
|
|
|
13
14
|
* }
|
|
14
15
|
* ```
|
|
15
16
|
*/
|
|
16
|
-
export declare const fontSize:
|
|
17
|
+
export declare const fontSize: ADFMark<ADFMarkSpec>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ADFMark, type ADFMarkSpec } from '@atlaskit/adf-schema-generator';
|
|
2
2
|
export declare const fragment: ADFMark<ADFMarkSpec>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/adf-schema",
|
|
3
|
-
"version": "52.2.
|
|
3
|
+
"version": "52.2.2",
|
|
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/"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@atlaskit/adf-schema-generator": "^2.1.0",
|
|
44
44
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^35.0.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0",
|
|
47
47
|
"css-color-names": "0.0.4",
|
|
48
48
|
"linkify-it": "^3.0.3",
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export const filterAndSortMarks
|
|
1
|
+
export const filterAndSortMarks: (marks: string, excluded?: string[]) => string = (
|
|
2
|
+
marks: string,
|
|
3
|
+
excluded: string[] = [],
|
|
4
|
+
) => {
|
|
2
5
|
return marks
|
|
3
6
|
.split(' ')
|
|
4
7
|
.filter((v) => !excluded.includes(v))
|
|
@@ -110,7 +113,10 @@ const expFormatter =
|
|
|
110
113
|
* @param skipLists a list contains node name can be removed from contents string
|
|
111
114
|
* @returns sorted content string, without node defined in skipList
|
|
112
115
|
*/
|
|
113
|
-
export const formatContent
|
|
116
|
+
export const formatContent: (content: string, skipLists?: string[]) => string = (
|
|
117
|
+
content: string,
|
|
118
|
+
skipLists: string[] = [],
|
|
119
|
+
) => {
|
|
114
120
|
const result = content.replace(/\s*\|\s*/gu, '|');
|
|
115
121
|
if (result.includes(' ')) {
|
|
116
122
|
return result.split(' ').map(expFormatter(skipLists)).join(' ').trim();
|