@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
22 lines (21 loc) • 974 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.markGroupDeclarationsNames = exports.markGroupDeclarations = void 0;
var _groups = require("./groups");
// We use groups to allow schemas to be constructed in different shapes without changing node/mark
// specs, but this means nodes/marks are defined with groups that might never be used in the schema.
// In this scenario ProseMirror will complain and prevent the schema from being constructed.
function groupDeclaration(name) {
return {
name: "__".concat(name, "GroupDeclaration"),
spec: {
group: name
}
};
}
var markGroupDeclarations = exports.markGroupDeclarations = [groupDeclaration(_groups.COLOR), groupDeclaration(_groups.FONT_STYLE), groupDeclaration(_groups.SEARCH_QUERY), groupDeclaration(_groups.LINK)];
var markGroupDeclarationsNames = exports.markGroupDeclarationsNames = markGroupDeclarations.map(function (groupMark) {
return groupMark.name;
});