@atlaskit/editor-jira-transformer 19.0.2 → 20.0.1

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 CHANGED
@@ -1,5 +1,37 @@
1
1
  # @atlaskit/editor-jira-transformer
2
2
 
3
+ ## 20.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 20.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
14
+ Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
15
+
16
+ Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
17
+
18
+ Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
19
+
20
+ ```diff
21
+ - "typesVersions": {
22
+ - ">=4.5 <4.9": {
23
+ - "*": [
24
+ - "dist/types-ts4.5/*",
25
+ - "dist/types-ts4.5/index.d.ts"
26
+ - ]
27
+ - }
28
+ - },
29
+ ```
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies
34
+
3
35
  ## 19.0.2
4
36
 
5
37
  ### Patch Changes
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/collapse-whitespace.js",
5
5
  "module:es2019": "../dist/es2019/collapse-whitespace.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/collapse-whitespace.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/collapse-whitespace.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/collapse-whitespace.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/emojiHelper.js",
5
5
  "module:es2019": "../dist/es2019/emojiHelper.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/emojiHelper.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/emojiHelper.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/emojiHelper.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/fix-doc.js",
5
5
  "module:es2019": "../dist/es2019/fix-doc.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/fix-doc.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/fix-doc.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/fix-doc.d.ts"
15
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-jira-transformer",
3
- "version": "19.0.2",
3
+ "version": "20.0.1",
4
4
  "description": "Editor JIRA transformer's",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,14 +12,6 @@
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
- },
23
15
  "sideEffects": false,
24
16
  "atlaskit:src": "src/index.ts",
25
17
  "atlassian": {
@@ -29,24 +21,24 @@
29
21
  }
30
22
  },
31
23
  "dependencies": {
32
- "@atlaskit/adf-schema": "^54.0.0",
33
- "@atlaskit/editor-prosemirror": "^7.3.0",
24
+ "@atlaskit/adf-schema": "^56.0.0",
25
+ "@atlaskit/editor-prosemirror": "^8.0.0",
34
26
  "@babel/runtime": "^7.0.0",
35
27
  "collapse-whitespace": "^1.1.6"
36
28
  },
37
29
  "peerDependencies": {
38
- "@atlaskit/editor-common": "^115.13.0",
30
+ "@atlaskit/editor-common": "^116.4.0",
39
31
  "react": "^18.2.0"
40
32
  },
41
33
  "devDependencies": {
42
34
  "@atlaskit/activity": "^1.0.1",
43
- "@atlaskit/editor-core": "^220.3.0",
44
- "@atlaskit/editor-json-transformer": "^8.33.0",
35
+ "@atlaskit/editor-core": "^221.1.0",
36
+ "@atlaskit/editor-json-transformer": "^9.0.0",
45
37
  "@atlaskit/editor-test-helpers": "workspace:^",
46
- "@atlaskit/mention": "^26.2.0",
47
- "@atlaskit/theme": "^25.0.0",
48
- "@atlaskit/tokens": "^13.3.0",
49
- "@atlaskit/util-data-test": "^18.6.0",
38
+ "@atlaskit/mention": "^27.1.0",
39
+ "@atlaskit/theme": "^26.0.0",
40
+ "@atlaskit/tokens": "^14.0.0",
41
+ "@atlaskit/util-data-test": "^19.0.0",
50
42
  "@atlassian/structured-docs-types": "workspace:^",
51
43
  "@emotion/react": "^11.7.1",
52
44
  "react": "^18.2.0"
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/parse-html.js",
5
5
  "module:es2019": "../dist/es2019/parse-html.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/parse-html.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/parse-html.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/parse-html.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/utils.js",
5
5
  "module:es2019": "../dist/es2019/utils.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/utils.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/utils.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/utils.d.ts"
15
8
  }
@@ -1,6 +0,0 @@
1
- declare module 'collapse-whitespace';
2
- export interface ICollapseWhitespace {
3
- (node: Node, blockTest?: (node: Node) => boolean): void;
4
- }
5
- declare const collapseWhitespace: ICollapseWhitespace;
6
- export default collapseWhitespace;
@@ -1 +0,0 @@
1
- export declare function mapImageToEmoji(imageElement: HTMLImageElement): string | null;
@@ -1 +0,0 @@
1
- export default function (doc: Document): Document;
@@ -1,49 +0,0 @@
1
- import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
- import type { Schema } from '@atlaskit/editor-prosemirror/model';
3
- import type { Transformer } from '@atlaskit/editor-common/types';
4
- export type CustomEncoder = (userId: string) => string;
5
- export interface JIRACustomEncoders {
6
- mention?: CustomEncoder;
7
- }
8
- export interface ContextInfo {
9
- baseUrl: string;
10
- clientId: string;
11
- collection: string;
12
- token: string;
13
- }
14
- export interface MediaContextInfo {
15
- uploadContext?: ContextInfo;
16
- viewContext?: ContextInfo;
17
- }
18
- export declare class JIRATransformer implements Transformer<string> {
19
- private schema;
20
- private customEncoders;
21
- private mediaContextInfo?;
22
- private doc;
23
- constructor(schema: Schema, customEncoders?: JIRACustomEncoders, mediaContextInfo?: MediaContextInfo);
24
- encode(node: PMNode): string;
25
- parse(html: string): PMNode;
26
- private getContent;
27
- private encodeNode;
28
- private makeDocument;
29
- private encodeFragment;
30
- private encodeHeading;
31
- private encodeParagraph;
32
- private encodeText;
33
- private encodeHardBreak;
34
- private encodeHorizontalRule;
35
- private encodeBulletList;
36
- private encodeOrderedList;
37
- private encodeListItem;
38
- private encodeMention;
39
- private encodeEmoji;
40
- private encodeCodeBlock;
41
- private encodeBlockQuote;
42
- private encodeMediaGroup;
43
- private encodeMediaSingle;
44
- private addDataToNode;
45
- private buildURLWithContextInfo;
46
- private isImageMimeType;
47
- private encodeMedia;
48
- private encodeTable;
49
- }
@@ -1 +0,0 @@
1
- export default function (fragment: string): Document;
@@ -1,13 +0,0 @@
1
- import { Fragment } from '@atlaskit/editor-prosemirror/model';
2
- import type { Mark, Node as PMNode, Schema, NodeType } from '@atlaskit/editor-prosemirror/model';
3
- /**
4
- * Ensure that each node in the fragment is a block, wrapping
5
- * in a block node if necessary.
6
- */
7
- export declare function ensureBlocks(fragment: Fragment, schema: Schema, nodeType?: NodeType): Fragment;
8
- /**
9
- * This function will convert all content to inline nodes
10
- */
11
- export declare const ensureInline: (schema: Schema, content: Fragment, supportedMarks: Mark[]) => Fragment;
12
- export declare function convert(content: Fragment, node: Node, schema: Schema): Fragment | PMNode | null | undefined;
13
- export declare function bfsOrder(root: Node): Node[];