UNPKG

@atlaskit/adf-schema

Version:

Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs

192 lines (178 loc) 7.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = makeSchema; Object.defineProperty(exports, "isSchemaWithAdvancedTextFormattingMarks", { enumerable: true, get: function get() { return _isSchemaWithAdvancedTextFormattingMarks.isSchemaWithAdvancedTextFormattingMarks; } }); Object.defineProperty(exports, "isSchemaWithBlockQuotes", { enumerable: true, get: function get() { return _isSchemaWithBlockQuotes.isSchemaWithBlockQuotes; } }); Object.defineProperty(exports, "isSchemaWithCodeBlock", { enumerable: true, get: function get() { return _isSchemaWithCodeBlock.isSchemaWithCodeBlock; } }); Object.defineProperty(exports, "isSchemaWithEmojis", { enumerable: true, get: function get() { return _isSchemaWithEmojis.isSchemaWithEmojis; } }); Object.defineProperty(exports, "isSchemaWithLinks", { enumerable: true, get: function get() { return _isSchemaWithLinks.isSchemaWithLinks; } }); Object.defineProperty(exports, "isSchemaWithLists", { enumerable: true, get: function get() { return _isSchemaWithLists.isSchemaWithLists; } }); Object.defineProperty(exports, "isSchemaWithMedia", { enumerable: true, get: function get() { return _isSchemaWithMedia.isSchemaWithMedia; } }); Object.defineProperty(exports, "isSchemaWithMentions", { enumerable: true, get: function get() { return _isSchemaWithMentions.isSchemaWithMentions; } }); Object.defineProperty(exports, "isSchemaWithSubSupMark", { enumerable: true, get: function get() { return _isSchemaWithSubSupMark.isSchemaWithSubSupMark; } }); Object.defineProperty(exports, "isSchemaWithTables", { enumerable: true, get: function get() { return _isSchemaWithTables.isSchemaWithTables; } }); Object.defineProperty(exports, "isSchemaWithTextColor", { enumerable: true, get: function get() { return _isSchemaWithTextColor.isSchemaWithTextColor; } }); var _createSchema = require("./create-schema"); var _isSchemaWithLists = require("./is-schema-with-lists"); var _isSchemaWithMentions = require("./is-schema-with-mentions"); var _isSchemaWithEmojis = require("./is-schema-with-emojis"); var _isSchemaWithLinks = require("./is-schema-with-links"); var _isSchemaWithAdvancedTextFormattingMarks = require("./is-schema-with-advanced-text-formatting-marks"); var _isSchemaWithSubSupMark = require("./is-schema-with-sub-sup-mark"); var _isSchemaWithCodeBlock = require("./is-schema-with-code-block"); var _isSchemaWithBlockQuotes = require("./is-schema-with-block-quotes"); var _isSchemaWithMedia = require("./is-schema-with-media"); var _isSchemaWithTextColor = require("./is-schema-with-text-color"); var _isSchemaWithTables = require("./is-schema-with-tables"); /* eslint-disable @repo/internal/deprecations/deprecation-ticket-required */ /** * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead. **/ /** * Creates a Jira-specific ADF schema. * * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead. **/ function makeSchema(config) { var nodes = ['doc', 'paragraph', 'text', 'hardBreak', 'heading', 'rule']; var marks = ['strong', 'em', 'underline', 'typeAheadQuery', 'unsupportedMark', 'unsupportedNodeAttribute']; if (config.allowLinks) { marks.push('link'); } if (config.allowLists) { nodes.push('orderedList', 'bulletList', 'listItem'); } if (config.allowMentions) { nodes.push('mention'); marks.push('mentionQuery'); } if (config.allowEmojis) { nodes.push('emoji'); } if (config.allowAdvancedTextFormatting) { marks.push('strike', 'code'); } if (config.allowSubSup) { marks.push('subsup'); } if (config.allowCodeBlock) { nodes.push('codeBlock'); } if (config.allowBlockQuote) { nodes.push('blockquote'); } if (config.allowMedia) { nodes.push('mediaGroup', 'mediaSingle', 'media', 'caption', 'mediaInline'); } if (config.allowTextColor) { marks.push('textColor'); } if (config.allowTables) { nodes.push('table', 'tableCell', 'tableHeader', 'tableRow'); } return (0, _createSchema.createSchema)({ nodes: nodes, marks: marks }); } /** * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead. **/ // eslint-disable-next-line @atlaskit/editor/no-re-export, @atlaskit/volt-strict-mode/no-re-exports -- Public compatibility re-export. /** * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead. **/ // eslint-disable-next-line @atlaskit/editor/no-re-export, @atlaskit/volt-strict-mode/no-re-exports -- Public compatibility re-export. /** * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead. **/ // eslint-disable-next-line @atlaskit/editor/no-re-export, @atlaskit/volt-strict-mode/no-re-exports -- Public compatibility re-export. /** * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead. **/ // eslint-disable-next-line @atlaskit/editor/no-re-export, @atlaskit/volt-strict-mode/no-re-exports -- Public compatibility re-export. /** * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead. **/ // eslint-disable-next-line @atlaskit/editor/no-re-export, @atlaskit/volt-strict-mode/no-re-exports -- Public compatibility re-export. /** * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead. **/ // eslint-disable-next-line @atlaskit/editor/no-re-export, @atlaskit/volt-strict-mode/no-re-exports -- Public compatibility re-export. /** * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead. **/ // eslint-disable-next-line @atlaskit/editor/no-re-export, @atlaskit/volt-strict-mode/no-re-exports -- Public compatibility re-export. /** * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead. **/ // eslint-disable-next-line @atlaskit/editor/no-re-export, @atlaskit/volt-strict-mode/no-re-exports -- Public compatibility re-export. /** * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead. **/ // eslint-disable-next-line @atlaskit/editor/no-re-export, @atlaskit/volt-strict-mode/no-re-exports -- Public compatibility re-export. /** * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead. **/ // eslint-disable-next-line @atlaskit/editor/no-re-export, @atlaskit/volt-strict-mode/no-re-exports -- Public compatibility re-export. /** * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead. **/ // eslint-disable-next-line @atlaskit/editor/no-re-export, @atlaskit/volt-strict-mode/no-re-exports -- Public compatibility re-export.