@atlaskit/editor-wikimarkup-transformer 11.2.7 → 11.2.8
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/dist/cjs/parser/tokenize/table.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/parser/tokenize/table.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/parser/tokenize/table.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/encoder/index.d.ts +1 -1
- package/dist/types/encoder/nodes/decisionItem.d.ts +1 -1
- package/dist/types/encoder/nodes/listItem.d.ts +1 -1
- package/dist/types/encoder/nodes/taskItem.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/interfaces.d.ts +1 -1
- package/dist/types/parser/abstract-tree.d.ts +1 -1
- package/dist/types/parser/builder/list-builder.d.ts +1 -1
- package/dist/types/parser/builder/table-builder.d.ts +1 -1
- package/dist/types/parser/nodes/mediaGroup.d.ts +1 -1
- package/dist/types/parser/nodes/mediaSingle.d.ts +1 -1
- package/dist/types/parser/nodes/paragraph.d.ts +1 -1
- package/dist/types/parser/nodes/rule.d.ts +1 -1
- package/dist/types/parser/nodes/text.d.ts +1 -1
- package/dist/types/parser/text.d.ts +1 -1
- package/dist/types/parser/tokenize/common-formatter.d.ts +1 -1
- package/dist/types/parser/tokenize/common-macro.d.ts +1 -1
- package/dist/types/parser/tokenize/file-link.d.ts +1 -1
- package/dist/types/parser/tokenize/index.d.ts +1 -1
- package/dist/types/parser/tokenize/issue-key.d.ts +1 -1
- package/dist/types/parser/tokenize/links/attachment-link.d.ts +1 -1
- package/dist/types/parser/tokenize/links/issue-link.d.ts +1 -1
- package/dist/types/parser/tokenize/links/link-resolver.d.ts +1 -1
- package/dist/types/parser/tokenize/links/mention-link.d.ts +1 -1
- package/dist/types/parser/tokenize/links/url-link.d.ts +1 -1
- package/dist/types/parser/tokenize/quote-macro.d.ts +1 -1
- package/dist/types/parser/utils/normalize.d.ts +1 -1
- package/dist/types/parser/utils/text.d.ts +1 -1
- package/dist/types/parser/utils/title.d.ts +1 -1
- package/dist/types-ts4.5/encoder/index.d.ts +1 -1
- package/dist/types-ts4.5/encoder/nodes/decisionItem.d.ts +1 -1
- package/dist/types-ts4.5/encoder/nodes/listItem.d.ts +1 -1
- package/dist/types-ts4.5/encoder/nodes/taskItem.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/interfaces.d.ts +1 -1
- package/dist/types-ts4.5/parser/abstract-tree.d.ts +1 -1
- package/dist/types-ts4.5/parser/builder/list-builder.d.ts +1 -1
- package/dist/types-ts4.5/parser/builder/table-builder.d.ts +1 -1
- package/dist/types-ts4.5/parser/nodes/mediaGroup.d.ts +1 -1
- package/dist/types-ts4.5/parser/nodes/mediaSingle.d.ts +1 -1
- package/dist/types-ts4.5/parser/nodes/paragraph.d.ts +1 -1
- package/dist/types-ts4.5/parser/nodes/rule.d.ts +1 -1
- package/dist/types-ts4.5/parser/nodes/text.d.ts +1 -1
- package/dist/types-ts4.5/parser/text.d.ts +1 -1
- package/dist/types-ts4.5/parser/tokenize/common-formatter.d.ts +1 -1
- package/dist/types-ts4.5/parser/tokenize/common-macro.d.ts +1 -1
- package/dist/types-ts4.5/parser/tokenize/file-link.d.ts +1 -1
- package/dist/types-ts4.5/parser/tokenize/index.d.ts +1 -1
- package/dist/types-ts4.5/parser/tokenize/issue-key.d.ts +1 -1
- package/dist/types-ts4.5/parser/tokenize/links/attachment-link.d.ts +1 -1
- package/dist/types-ts4.5/parser/tokenize/links/issue-link.d.ts +1 -1
- package/dist/types-ts4.5/parser/tokenize/links/link-resolver.d.ts +1 -1
- package/dist/types-ts4.5/parser/tokenize/links/mention-link.d.ts +1 -1
- package/dist/types-ts4.5/parser/tokenize/links/url-link.d.ts +1 -1
- package/dist/types-ts4.5/parser/tokenize/quote-macro.d.ts +1 -1
- package/dist/types-ts4.5/parser/utils/normalize.d.ts +1 -1
- package/dist/types-ts4.5/parser/utils/text.d.ts +1 -1
- package/dist/types-ts4.5/parser/utils/title.d.ts +1 -1
- package/package.json +5 -5
- package/report.api.md +2 -2
- package/tmp/api-report-tmp.d.ts +76 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-wikimarkup-transformer
|
|
2
2
|
|
|
3
|
+
## 11.2.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4e6f1bf8511`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4e6f1bf8511) - [ED-19233] Import prosemirror libraries from internal facade package
|
|
8
|
+
|
|
3
9
|
## 11.2.7
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.table = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
-
var
|
|
9
|
+
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
10
10
|
var _tableBuilder = require("../builder/table-builder");
|
|
11
11
|
var _text = require("../text");
|
|
12
12
|
var _normalize = require("../utils/normalize");
|
|
@@ -308,7 +308,7 @@ function createTableHeader(pmNode, schema) {
|
|
|
308
308
|
return pmNode.mark([].concat((0, _toConsumableArray2.default)(pmNode.marks), [mark]));
|
|
309
309
|
} else if (pmNode.childCount > 0 && pmNode.firstChild && pmNode.child(0) && pmNode.type.name !== 'codeBlock') {
|
|
310
310
|
var jsonNode = traverseJsonNodeAndAddMarks(pmNode.toJSON(), 'strong', schema);
|
|
311
|
-
pmNode =
|
|
311
|
+
pmNode = _model.Node.fromJSON(schema, jsonNode);
|
|
312
312
|
return pmNode;
|
|
313
313
|
}
|
|
314
314
|
return pmNode;
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as PMNode } from 'prosemirror
|
|
1
|
+
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { TableBuilder } from '../builder/table-builder';
|
|
3
3
|
import { parseString } from '../text';
|
|
4
4
|
import { normalizePMNodes } from '../utils/normalize';
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import { Node as PMNode } from 'prosemirror
|
|
2
|
+
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { TableBuilder } from '../builder/table-builder';
|
|
4
4
|
import { parseString } from '../text';
|
|
5
5
|
import { normalizePMNodes } from '../utils/normalize';
|
package/dist/esm/version.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as PMNode } from 'prosemirror
|
|
1
|
+
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { Context } from '../interfaces';
|
|
3
3
|
export type MarkEncoder = (text: string, attrs: any) => string;
|
|
4
4
|
export type NodeEncoder = (node: PMNode, opts?: NodeEncoderOpts) => string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as PMNode, Schema } from 'prosemirror
|
|
1
|
+
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { AddCellArgs, Builder } from '../../interfaces';
|
|
3
3
|
export declare class TableBuilder implements Builder {
|
|
4
4
|
private schema;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Node as PMNode, Schema } from 'prosemirror
|
|
1
|
+
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { Context } from '../../interfaces';
|
|
3
3
|
export default function getMediaGroupNodeView(schema: Schema, filename: string, context?: Context): PMNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as PMNode, Schema } from 'prosemirror
|
|
1
|
+
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { Context } from '../../interfaces';
|
|
3
3
|
export default function getMediaSingleNodeView(schema: Schema, filename: string, attrs: {
|
|
4
4
|
[key: string]: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as PMNode, Schema } from 'prosemirror
|
|
1
|
+
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare function createEmptyParagraphNode(schema: Schema): PMNode;
|
|
3
3
|
/**
|
|
4
4
|
* Create paragraphs from inline nodes. Function will return
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Node as PMNode, NodeType, Schema } from 'prosemirror
|
|
1
|
+
import { Node as PMNode, NodeType, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export default function getRuleNodeView(schema: Schema, containerNodeType: NodeType | null): PMNode;
|
|
3
3
|
export declare function createRuleNode(schema: Schema): PMNode[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Mark as PMMark, Node as PMNode, Schema } from 'prosemirror
|
|
1
|
+
import { Mark as PMMark, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare function createTextNode(input: string, schema: Schema, marks?: PMMark[]): PMNode[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as PMNode, Schema } from 'prosemirror
|
|
1
|
+
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { TokenType } from './tokenize';
|
|
3
3
|
import { Context } from '../interfaces';
|
|
4
4
|
export declare function parseString({ input, schema, ignoreTokenTypes, context, includeLeadingSpace, }: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ContentLink } from './link-parser';
|
|
2
|
-
import { Schema, Node as PMNode } from 'prosemirror
|
|
2
|
+
import { Schema, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { Context } from '../../../interfaces';
|
|
4
4
|
export declare function attachmentLinkResolver(link: ContentLink, schema: Schema, context: Context): PMNode[] | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ContentLink } from './link-parser';
|
|
2
|
-
import { Schema, Node as PMNode } from 'prosemirror
|
|
2
|
+
import { Schema, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { Context } from '../../../interfaces';
|
|
4
4
|
export declare function issueLinkResolver(link: ContentLink, schema: Schema, context: Context): PMNode[] | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ContentLink } from './link-parser';
|
|
2
2
|
import { Token } from '../index';
|
|
3
3
|
import { Context } from '../../../interfaces';
|
|
4
|
-
import { Schema } from 'prosemirror
|
|
4
|
+
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
export declare function resolveLink(link: ContentLink, schema: Schema, context: Context): Token | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ContentLink } from './link-parser';
|
|
2
|
-
import { Schema, Node as PMNode } from 'prosemirror
|
|
2
|
+
import { Schema, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { Context } from '../../../interfaces';
|
|
4
4
|
export declare function mentionLinkResolver(link: ContentLink, schema: Schema, context: Context): PMNode[] | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ContentLink } from './link-parser';
|
|
2
2
|
import { Context } from '../../../interfaces';
|
|
3
|
-
import { Node as PMNode, Schema } from 'prosemirror
|
|
3
|
+
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
export declare function urlLinkResolver(link: ContentLink, schema: Schema, context: Context): PMNode[] | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as PMNode, Schema } from 'prosemirror
|
|
1
|
+
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare function normalizePMNodes(nodes: PMNode[], schema: Schema, parentNode?: string): PMNode[];
|
|
3
3
|
export declare function normalizeInlineNodes(nodes: PMNode[], schema: Schema, parentNode?: string): PMNode[];
|
|
4
4
|
export declare function isNextLineEmpty(input: string): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as PMNode } from 'prosemirror
|
|
1
|
+
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { Context } from '../interfaces';
|
|
3
3
|
export type MarkEncoder = (text: string, attrs: any) => string;
|
|
4
4
|
export type NodeEncoder = (node: PMNode, opts?: NodeEncoderOpts) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as PMNode, Schema } from 'prosemirror
|
|
1
|
+
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { AddCellArgs, Builder } from '../../interfaces';
|
|
3
3
|
export declare class TableBuilder implements Builder {
|
|
4
4
|
private schema;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Node as PMNode, Schema } from 'prosemirror
|
|
1
|
+
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { Context } from '../../interfaces';
|
|
3
3
|
export default function getMediaGroupNodeView(schema: Schema, filename: string, context?: Context): PMNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as PMNode, Schema } from 'prosemirror
|
|
1
|
+
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { Context } from '../../interfaces';
|
|
3
3
|
export default function getMediaSingleNodeView(schema: Schema, filename: string, attrs: {
|
|
4
4
|
[key: string]: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as PMNode, Schema } from 'prosemirror
|
|
1
|
+
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare function createEmptyParagraphNode(schema: Schema): PMNode;
|
|
3
3
|
/**
|
|
4
4
|
* Create paragraphs from inline nodes. Function will return
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Node as PMNode, NodeType, Schema } from 'prosemirror
|
|
1
|
+
import { Node as PMNode, NodeType, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export default function getRuleNodeView(schema: Schema, containerNodeType: NodeType | null): PMNode;
|
|
3
3
|
export declare function createRuleNode(schema: Schema): PMNode[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Mark as PMMark, Node as PMNode, Schema } from 'prosemirror
|
|
1
|
+
import { Mark as PMMark, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare function createTextNode(input: string, schema: Schema, marks?: PMMark[]): PMNode[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as PMNode, Schema } from 'prosemirror
|
|
1
|
+
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { TokenType } from './tokenize';
|
|
3
3
|
import { Context } from '../interfaces';
|
|
4
4
|
export declare function parseString({ input, schema, ignoreTokenTypes, context, includeLeadingSpace, }: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ContentLink } from './link-parser';
|
|
2
|
-
import { Schema, Node as PMNode } from 'prosemirror
|
|
2
|
+
import { Schema, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { Context } from '../../../interfaces';
|
|
4
4
|
export declare function attachmentLinkResolver(link: ContentLink, schema: Schema, context: Context): PMNode[] | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ContentLink } from './link-parser';
|
|
2
|
-
import { Schema, Node as PMNode } from 'prosemirror
|
|
2
|
+
import { Schema, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { Context } from '../../../interfaces';
|
|
4
4
|
export declare function issueLinkResolver(link: ContentLink, schema: Schema, context: Context): PMNode[] | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ContentLink } from './link-parser';
|
|
2
2
|
import { Token } from '../index';
|
|
3
3
|
import { Context } from '../../../interfaces';
|
|
4
|
-
import { Schema } from 'prosemirror
|
|
4
|
+
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
export declare function resolveLink(link: ContentLink, schema: Schema, context: Context): Token | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ContentLink } from './link-parser';
|
|
2
|
-
import { Schema, Node as PMNode } from 'prosemirror
|
|
2
|
+
import { Schema, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { Context } from '../../../interfaces';
|
|
4
4
|
export declare function mentionLinkResolver(link: ContentLink, schema: Schema, context: Context): PMNode[] | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ContentLink } from './link-parser';
|
|
2
2
|
import { Context } from '../../../interfaces';
|
|
3
|
-
import { Node as PMNode, Schema } from 'prosemirror
|
|
3
|
+
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
export declare function urlLinkResolver(link: ContentLink, schema: Schema, context: Context): PMNode[] | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as PMNode, Schema } from 'prosemirror
|
|
1
|
+
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare function normalizePMNodes(nodes: PMNode[], schema: Schema, parentNode?: string): PMNode[];
|
|
3
3
|
export declare function normalizeInlineNodes(nodes: PMNode[], schema: Schema, parentNode?: string): PMNode[];
|
|
4
4
|
export declare function isNextLineEmpty(input: string): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-wikimarkup-transformer",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.8",
|
|
4
4
|
"description": "Wiki markup transformer for JIRA and Confluence",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atlaskit/adf-schema": "^26.
|
|
35
|
+
"@atlaskit/adf-schema": "^26.4.0",
|
|
36
36
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
37
|
+
"@atlaskit/editor-prosemirror": "1.0.2",
|
|
37
38
|
"@atlaskit/theme": "^12.5.0",
|
|
38
|
-
"@babel/runtime": "^7.0.0"
|
|
39
|
-
"prosemirror-model": "1.16.0"
|
|
39
|
+
"@babel/runtime": "^7.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@atlaskit/activity": "^1.0.1",
|
|
43
|
-
"@atlaskit/editor-core": "^
|
|
43
|
+
"@atlaskit/editor-core": "^187.8.0",
|
|
44
44
|
"@atlaskit/editor-test-helpers": "^18.10.0",
|
|
45
45
|
"@atlaskit/util-data-test": "^17.8.0",
|
|
46
46
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
package/report.api.md
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
<!--SECTION START: Main Entry Types-->
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
|
-
import { Node as Node_2 } from 'prosemirror
|
|
19
|
-
import { Schema } from 'prosemirror
|
|
18
|
+
import { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
|
|
19
|
+
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
20
20
|
|
|
21
21
|
// @public (undocumented)
|
|
22
22
|
interface Context {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/editor-wikimarkup-transformer"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
|
|
8
|
+
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
9
|
+
|
|
10
|
+
// @public (undocumented)
|
|
11
|
+
interface Context {
|
|
12
|
+
// (undocumented)
|
|
13
|
+
readonly conversion?: {
|
|
14
|
+
readonly inlineCardConversion?: ConversionMap;
|
|
15
|
+
readonly mediaConversion?: MediaConversionMap;
|
|
16
|
+
mentionConversion?: ConversionMap;
|
|
17
|
+
};
|
|
18
|
+
// (undocumented)
|
|
19
|
+
readonly defaults?: {
|
|
20
|
+
readonly media?: {
|
|
21
|
+
width: null | number;
|
|
22
|
+
height: null | number;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
// (undocumented)
|
|
26
|
+
readonly hydration?: {
|
|
27
|
+
readonly media?: {
|
|
28
|
+
targetCollectionId?: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
// (undocumented)
|
|
32
|
+
readonly issueKeyRegex?: RegExp | undefined;
|
|
33
|
+
// (undocumented)
|
|
34
|
+
readonly tokenErrCallback?: TokenErrCallback;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// @public (undocumented)
|
|
38
|
+
interface ConversionMap {
|
|
39
|
+
// (undocumented)
|
|
40
|
+
[key: string]: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// @public (undocumented)
|
|
44
|
+
interface MediaConversionMap {
|
|
45
|
+
// (undocumented)
|
|
46
|
+
[key: string]: {
|
|
47
|
+
transform?: string;
|
|
48
|
+
embed?: boolean;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// @public (undocumented)
|
|
53
|
+
type TokenErrCallback = (err: Error, tokenType: string) => void;
|
|
54
|
+
|
|
55
|
+
// @public (undocumented)
|
|
56
|
+
interface Transformer_2<T> {
|
|
57
|
+
// (undocumented)
|
|
58
|
+
encode(node: Node_2): T;
|
|
59
|
+
// (undocumented)
|
|
60
|
+
parse(content: T): Node_2;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// @public (undocumented)
|
|
64
|
+
class WikiMarkupTransformer implements Transformer_2<string> {
|
|
65
|
+
constructor(schema?: Schema);
|
|
66
|
+
// (undocumented)
|
|
67
|
+
encode(node: Node_2, context?: Context): string;
|
|
68
|
+
// (undocumented)
|
|
69
|
+
parse(wikiMarkup: string, context?: Context): Node_2;
|
|
70
|
+
}
|
|
71
|
+
export { WikiMarkupTransformer }
|
|
72
|
+
export default WikiMarkupTransformer;
|
|
73
|
+
|
|
74
|
+
// (No @packageDocumentation comment for this package)
|
|
75
|
+
|
|
76
|
+
```
|