@atlaskit/editor-jira-transformer 8.3.0 → 8.3.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 +13 -0
- package/collapse-whitespace/package.json +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types-ts4.5/collapse-whitespace.d.ts +6 -0
- package/dist/types-ts4.5/emojiHelper.d.ts +1 -0
- package/dist/types-ts4.5/fix-doc.d.ts +1 -0
- package/dist/types-ts4.5/index.d.ts +48 -0
- package/dist/types-ts4.5/parse-html.d.ts +1 -0
- package/dist/types-ts4.5/schema.d.ts +1 -0
- package/dist/types-ts4.5/utils.d.ts +12 -0
- package/emojiHelper/package.json +2 -2
- package/fix-doc/package.json +2 -2
- package/package.json +14 -6
- package/parse-html/package.json +2 -2
- package/schema/package.json +2 -2
- package/utils/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-jira-transformer
|
|
2
2
|
|
|
3
|
+
## 8.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a142ba1aa28`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a142ba1aa28) - [ED17172] Bump prosemirror-model to 1.16.0 and prosemirror-view to 1.23.7 and removed work-arounds for fixed issues
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 8.3.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
15
|
+
|
|
3
16
|
## 8.3.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"types": "../dist/types/collapse-whitespace.d.ts",
|
|
8
8
|
"typesVersions": {
|
|
9
|
-
">=4.
|
|
9
|
+
">=4.5 <4.9": {
|
|
10
10
|
"*": [
|
|
11
|
-
"../dist/types-ts4.
|
|
11
|
+
"../dist/types-ts4.5/collapse-whitespace.d.ts"
|
|
12
12
|
]
|
|
13
13
|
}
|
|
14
14
|
}
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Node as PMNode, Schema } from 'prosemirror-model';
|
|
2
2
|
import { Transformer } from '@atlaskit/editor-common/types';
|
|
3
|
-
export
|
|
3
|
+
export type CustomEncoder = (userId: string) => string;
|
|
4
4
|
export interface JIRACustomEncoders {
|
|
5
5
|
mention?: CustomEncoder;
|
|
6
6
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mapImageToEmoji(imageElement: HTMLImageElement): string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (doc: Document): Document;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Node as PMNode, Schema } from 'prosemirror-model';
|
|
2
|
+
import { Transformer } from '@atlaskit/editor-common/types';
|
|
3
|
+
export type CustomEncoder = (userId: string) => string;
|
|
4
|
+
export interface JIRACustomEncoders {
|
|
5
|
+
mention?: CustomEncoder;
|
|
6
|
+
}
|
|
7
|
+
export interface ContextInfo {
|
|
8
|
+
clientId: string;
|
|
9
|
+
baseUrl: string;
|
|
10
|
+
token: string;
|
|
11
|
+
collection: string;
|
|
12
|
+
}
|
|
13
|
+
export interface MediaContextInfo {
|
|
14
|
+
viewContext?: ContextInfo;
|
|
15
|
+
uploadContext?: ContextInfo;
|
|
16
|
+
}
|
|
17
|
+
export declare class JIRATransformer implements Transformer<string> {
|
|
18
|
+
private schema;
|
|
19
|
+
private customEncoders;
|
|
20
|
+
private mediaContextInfo?;
|
|
21
|
+
private doc;
|
|
22
|
+
constructor(schema: Schema, customEncoders?: JIRACustomEncoders, mediaContextInfo?: MediaContextInfo);
|
|
23
|
+
encode(node: PMNode): string;
|
|
24
|
+
parse(html: string): PMNode;
|
|
25
|
+
private getContent;
|
|
26
|
+
private encodeNode;
|
|
27
|
+
private makeDocument;
|
|
28
|
+
private encodeFragment;
|
|
29
|
+
private encodeHeading;
|
|
30
|
+
private encodeParagraph;
|
|
31
|
+
private encodeText;
|
|
32
|
+
private encodeHardBreak;
|
|
33
|
+
private encodeHorizontalRule;
|
|
34
|
+
private encodeBulletList;
|
|
35
|
+
private encodeOrderedList;
|
|
36
|
+
private encodeListItem;
|
|
37
|
+
private encodeMention;
|
|
38
|
+
private encodeEmoji;
|
|
39
|
+
private encodeCodeBlock;
|
|
40
|
+
private encodeBlockQuote;
|
|
41
|
+
private encodeMediaGroup;
|
|
42
|
+
private encodeMediaSingle;
|
|
43
|
+
private addDataToNode;
|
|
44
|
+
private buildURLWithContextInfo;
|
|
45
|
+
private isImageMimeType;
|
|
46
|
+
private encodeMedia;
|
|
47
|
+
private encodeTable;
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (fragment: string): Document;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { isSchemaWithLists, isSchemaWithMentions, isSchemaWithLinks, isSchemaWithAdvancedTextFormattingMarks, isSchemaWithSubSupMark, isSchemaWithCodeBlock, isSchemaWithBlockQuotes, isSchemaWithMedia, isSchemaWithTextColor, isSchemaWithTables, } from '@atlaskit/adf-schema/schema-jira';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Fragment, Mark, Node as PMNode, Schema, NodeType } from 'prosemirror-model';
|
|
2
|
+
/**
|
|
3
|
+
* Ensure that each node in the fragment is a block, wrapping
|
|
4
|
+
* in a block node if necessary.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ensureBlocks(fragment: Fragment, schema: Schema, nodeType?: NodeType): Fragment;
|
|
7
|
+
/**
|
|
8
|
+
* This function will convert all content to inline nodes
|
|
9
|
+
*/
|
|
10
|
+
export declare const ensureInline: (schema: Schema, content: Fragment, supportedMarks: Mark[]) => Fragment<any>;
|
|
11
|
+
export declare function convert(content: Fragment, node: Node, schema: Schema): Fragment | PMNode | null | undefined;
|
|
12
|
+
export declare function bfsOrder(root: Node): Node[];
|
package/emojiHelper/package.json
CHANGED
package/fix-doc/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-jira-transformer",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.2",
|
|
4
4
|
"description": "Editor JIRA transformer's",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,6 +12,14 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
">=4.5 <4.9": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.5/*",
|
|
19
|
+
"dist/types-ts4.5/index.d.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
15
23
|
"sideEffects": false,
|
|
16
24
|
"atlaskit:src": "src/index.ts",
|
|
17
25
|
"atlassian": {
|
|
@@ -25,10 +33,10 @@
|
|
|
25
33
|
},
|
|
26
34
|
"dependencies": {
|
|
27
35
|
"@atlaskit/adf-schema": "^25.6.0",
|
|
28
|
-
"@atlaskit/editor-common": "^74.
|
|
36
|
+
"@atlaskit/editor-common": "^74.1.0",
|
|
29
37
|
"@babel/runtime": "^7.0.0",
|
|
30
38
|
"collapse-whitespace": "^1.1.6",
|
|
31
|
-
"prosemirror-model": "1.
|
|
39
|
+
"prosemirror-model": "1.16.0"
|
|
32
40
|
},
|
|
33
41
|
"peerDependencies": {
|
|
34
42
|
"react": "^16.8.0"
|
|
@@ -36,15 +44,15 @@
|
|
|
36
44
|
"devDependencies": {
|
|
37
45
|
"@atlaskit/activity": "^1.0.1",
|
|
38
46
|
"@atlaskit/docs": "*",
|
|
39
|
-
"@atlaskit/editor-core": "^183.
|
|
47
|
+
"@atlaskit/editor-core": "^183.1.0",
|
|
40
48
|
"@atlaskit/editor-json-transformer": "^8.9.0",
|
|
41
|
-
"@atlaskit/editor-test-helpers": "^18.
|
|
49
|
+
"@atlaskit/editor-test-helpers": "^18.3.0",
|
|
42
50
|
"@atlaskit/theme": "^12.5.0",
|
|
43
51
|
"@atlaskit/util-data-test": "^17.8.0",
|
|
44
52
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
45
53
|
"@emotion/react": "^11.7.1",
|
|
46
54
|
"@types/prosemirror-model": "^1.11.0",
|
|
47
|
-
"typescript": "4.
|
|
55
|
+
"typescript": "~4.9.5"
|
|
48
56
|
},
|
|
49
57
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
|
|
50
58
|
"techstack": {
|
package/parse-html/package.json
CHANGED
package/schema/package.json
CHANGED