@atlaskit/adf-schema 26.3.0 → 26.4.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 +12 -0
- package/dist/cjs/schema/create-schema.js +2 -2
- package/dist/cjs/schema/nodes/code-block.js +2 -2
- package/dist/cjs/steps/analytics.js +8 -8
- package/dist/cjs/steps/link-meta-step.js +7 -7
- package/dist/cjs/steps/override-document-step.js +94 -0
- package/dist/cjs/steps/set-attrs.js +9 -9
- package/dist/cjs/steps/table/add-column.js +10 -10
- package/dist/cjs/steps/table/sort-column.js +7 -7
- package/dist/cjs/steps/table/utils/side-effects/table.js +3 -3
- package/dist/cjs/steps/type-ahead.js +7 -7
- package/dist/cjs/steps.js +8 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/schema/create-schema.js +1 -1
- package/dist/es2019/schema/nodes/code-block.js +1 -1
- package/dist/es2019/steps/analytics.js +2 -2
- package/dist/es2019/steps/link-meta-step.js +2 -2
- package/dist/es2019/steps/override-document-step.js +60 -0
- package/dist/es2019/steps/set-attrs.js +2 -2
- package/dist/es2019/steps/table/add-column.js +1 -1
- package/dist/es2019/steps/table/sort-column.js +2 -2
- package/dist/es2019/steps/table/utils/side-effects/table.js +1 -1
- package/dist/es2019/steps/type-ahead.js +2 -2
- package/dist/es2019/steps.js +2 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/schema/create-schema.js +1 -1
- package/dist/esm/schema/nodes/code-block.js +1 -1
- package/dist/esm/steps/analytics.js +2 -2
- package/dist/esm/steps/link-meta-step.js +2 -2
- package/dist/esm/steps/override-document-step.js +85 -0
- package/dist/esm/steps/set-attrs.js +2 -2
- package/dist/esm/steps/table/add-column.js +1 -1
- package/dist/esm/steps/table/sort-column.js +2 -2
- package/dist/esm/steps/table/utils/side-effects/table.js +1 -1
- package/dist/esm/steps/type-ahead.js +2 -2
- package/dist/esm/steps.js +2 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/schema/bitbucket-schema.d.ts +1 -1
- package/dist/types/schema/confluence-schema.d.ts +1 -1
- package/dist/types/schema/create-schema.d.ts +1 -1
- package/dist/types/schema/jira-schema.d.ts +1 -1
- package/dist/types/schema/marks/alignment.d.ts +1 -1
- package/dist/types/schema/marks/annotation.d.ts +1 -1
- package/dist/types/schema/marks/border.d.ts +1 -1
- package/dist/types/schema/marks/breakout.d.ts +1 -1
- package/dist/types/schema/marks/code.d.ts +1 -1
- package/dist/types/schema/marks/confluence-inline-comment.d.ts +1 -1
- package/dist/types/schema/marks/data-consumer.d.ts +1 -1
- package/dist/types/schema/marks/em.d.ts +1 -1
- package/dist/types/schema/marks/fragment.d.ts +1 -1
- package/dist/types/schema/marks/indentation.d.ts +1 -1
- package/dist/types/schema/marks/link.d.ts +1 -1
- package/dist/types/schema/marks/strike.d.ts +1 -1
- package/dist/types/schema/marks/strong.d.ts +1 -1
- package/dist/types/schema/marks/subsup.d.ts +1 -1
- package/dist/types/schema/marks/text-color.d.ts +1 -1
- package/dist/types/schema/marks/type-ahead-query.d.ts +1 -1
- package/dist/types/schema/marks/underline.d.ts +1 -1
- package/dist/types/schema/marks/unsupported-mark.d.ts +1 -1
- package/dist/types/schema/marks/unsupported-node-attributes.d.ts +1 -1
- package/dist/types/schema/nodes/block-card.d.ts +1 -1
- package/dist/types/schema/nodes/blockquote.d.ts +1 -1
- package/dist/types/schema/nodes/bodied-extension.d.ts +1 -1
- package/dist/types/schema/nodes/bullet-list.d.ts +1 -1
- package/dist/types/schema/nodes/caption.d.ts +1 -1
- package/dist/types/schema/nodes/code-block.d.ts +1 -1
- package/dist/types/schema/nodes/confluence-jira-issue.d.ts +1 -1
- package/dist/types/schema/nodes/confluence-unsupported-block.d.ts +1 -1
- package/dist/types/schema/nodes/confluence-unsupported-inline.d.ts +1 -1
- package/dist/types/schema/nodes/date.d.ts +1 -1
- package/dist/types/schema/nodes/decision-item.d.ts +1 -1
- package/dist/types/schema/nodes/decision-list.d.ts +1 -1
- package/dist/types/schema/nodes/doc.d.ts +1 -1
- package/dist/types/schema/nodes/embed-card.d.ts +1 -1
- package/dist/types/schema/nodes/emoji.d.ts +1 -1
- package/dist/types/schema/nodes/expand.d.ts +1 -1
- package/dist/types/schema/nodes/extension.d.ts +1 -1
- package/dist/types/schema/nodes/hard-break.d.ts +1 -1
- package/dist/types/schema/nodes/heading.d.ts +1 -1
- package/dist/types/schema/nodes/image.d.ts +1 -1
- package/dist/types/schema/nodes/inline-card.d.ts +1 -1
- package/dist/types/schema/nodes/inline-extension.d.ts +1 -1
- package/dist/types/schema/nodes/layout-column.d.ts +1 -1
- package/dist/types/schema/nodes/layout-section.d.ts +1 -1
- package/dist/types/schema/nodes/list-item.d.ts +1 -1
- package/dist/types/schema/nodes/media-group.d.ts +1 -1
- package/dist/types/schema/nodes/media-inline.d.ts +1 -1
- package/dist/types/schema/nodes/media-single.d.ts +1 -1
- package/dist/types/schema/nodes/media.d.ts +1 -1
- package/dist/types/schema/nodes/mention.d.ts +1 -1
- package/dist/types/schema/nodes/nested-expand.d.ts +1 -1
- package/dist/types/schema/nodes/ordered-list.d.ts +1 -1
- package/dist/types/schema/nodes/panel.d.ts +1 -1
- package/dist/types/schema/nodes/paragraph.d.ts +1 -1
- package/dist/types/schema/nodes/placeholder.d.ts +1 -1
- package/dist/types/schema/nodes/rule.d.ts +1 -1
- package/dist/types/schema/nodes/status.d.ts +1 -1
- package/dist/types/schema/nodes/tableNodes.d.ts +1 -1
- package/dist/types/schema/nodes/task-item.d.ts +1 -1
- package/dist/types/schema/nodes/task-list.d.ts +1 -1
- package/dist/types/schema/nodes/text.d.ts +1 -1
- package/dist/types/schema/nodes/unknown-block.d.ts +1 -1
- package/dist/types/schema/nodes/unsupported-block.d.ts +1 -1
- package/dist/types/schema/nodes/unsupported-inline.d.ts +1 -1
- package/dist/types/steps/analytics.d.ts +2 -2
- package/dist/types/steps/link-meta-step.d.ts +2 -2
- package/dist/types/steps/override-document-step.d.ts +27 -0
- package/dist/types/steps/set-attrs.d.ts +2 -2
- package/dist/types/steps/table/add-column.d.ts +2 -2
- package/dist/types/steps/table/sort-column.d.ts +2 -2
- package/dist/types/steps/table/types.d.ts +1 -1
- package/dist/types/steps/table/utils/cell-step.d.ts +2 -2
- package/dist/types/steps/table/utils/cells-at-column.d.ts +1 -1
- package/dist/types/steps/table/utils/get-table-rect-from-doc.d.ts +1 -1
- package/dist/types/steps/table/utils/side-effects/rows.d.ts +2 -2
- package/dist/types/steps/table/utils/side-effects/side-effects.d.ts +2 -2
- package/dist/types/steps/table/utils/side-effects/table.d.ts +2 -2
- package/dist/types/steps/table/utils/side-effects/types.d.ts +1 -1
- package/dist/types/steps/type-ahead.d.ts +2 -2
- package/dist/types/steps.d.ts +2 -0
- package/dist/types-ts4.5/schema/bitbucket-schema.d.ts +1 -1
- package/dist/types-ts4.5/schema/confluence-schema.d.ts +1 -1
- package/dist/types-ts4.5/schema/create-schema.d.ts +1 -1
- package/dist/types-ts4.5/schema/jira-schema.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/alignment.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/annotation.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/border.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/breakout.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/code.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/confluence-inline-comment.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/data-consumer.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/em.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/fragment.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/indentation.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/link.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/strike.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/strong.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/subsup.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/text-color.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/type-ahead-query.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/underline.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/unsupported-mark.d.ts +1 -1
- package/dist/types-ts4.5/schema/marks/unsupported-node-attributes.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/block-card.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/blockquote.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/bodied-extension.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/bullet-list.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/caption.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/code-block.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/confluence-jira-issue.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/confluence-unsupported-block.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/confluence-unsupported-inline.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/date.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/decision-item.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/decision-list.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/doc.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/embed-card.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/emoji.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/expand.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/extension.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/hard-break.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/heading.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/image.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/inline-card.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/inline-extension.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/layout-column.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/layout-section.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/list-item.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/media-group.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/media-inline.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/media-single.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/media.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/mention.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/nested-expand.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/ordered-list.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/panel.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/paragraph.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/placeholder.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/rule.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/status.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/tableNodes.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/task-item.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/task-list.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/text.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/unknown-block.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/unsupported-block.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/unsupported-inline.d.ts +1 -1
- package/dist/types-ts4.5/steps/analytics.d.ts +2 -2
- package/dist/types-ts4.5/steps/link-meta-step.d.ts +2 -2
- package/dist/types-ts4.5/steps/override-document-step.d.ts +27 -0
- package/dist/types-ts4.5/steps/set-attrs.d.ts +2 -2
- package/dist/types-ts4.5/steps/table/add-column.d.ts +2 -2
- package/dist/types-ts4.5/steps/table/sort-column.d.ts +2 -2
- package/dist/types-ts4.5/steps/table/types.d.ts +1 -1
- package/dist/types-ts4.5/steps/table/utils/cell-step.d.ts +2 -2
- package/dist/types-ts4.5/steps/table/utils/cells-at-column.d.ts +1 -1
- package/dist/types-ts4.5/steps/table/utils/get-table-rect-from-doc.d.ts +1 -1
- package/dist/types-ts4.5/steps/table/utils/side-effects/rows.d.ts +2 -2
- package/dist/types-ts4.5/steps/table/utils/side-effects/side-effects.d.ts +2 -2
- package/dist/types-ts4.5/steps/table/utils/side-effects/table.d.ts +2 -2
- package/dist/types-ts4.5/steps/table/utils/side-effects/types.d.ts +1 -1
- package/dist/types-ts4.5/steps/type-ahead.d.ts +2 -2
- package/dist/types-ts4.5/steps.d.ts +2 -0
- package/package.json +3 -6
- package/report.api.md +5 -5
- package/tmp/api-report-tmp.d.ts +5 -5
package/dist/es2019/version.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
4
|
-
import { Schema } from 'prosemirror
|
4
|
+
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
5
5
|
import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups';
|
6
6
|
import { link, em, strong, textColor, strike, subsup, underline, code, typeAheadQuery, confluenceInlineComment, breakout, alignment, indentation, annotation, unsupportedMark, unsupportedNodeAttribute, dataConsumer, fragment, border } from './marks';
|
7
7
|
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, blockquote, codeBlock, panel, rule, image, mention, media, mediaInline, mediaSingleWithCaption, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expand, nestedExpand, embedCard, caption } from './nodes';
|
@@ -10,8 +10,8 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
10
10
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
11
11
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
12
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
13
|
-
import { Step, StepResult, StepMap, ReplaceStep } from 'prosemirror
|
14
|
-
import { Slice } from 'prosemirror
|
13
|
+
import { Step, StepResult, StepMap, ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
14
|
+
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
15
15
|
export var analyticsStepType = 'atlaskit-analytics';
|
16
16
|
export var analyticsInvertStepType = 'atlaskit-analytics-invert';
|
17
17
|
var HISTORY_ACTIONS = /*#__PURE__*/function (HISTORY_ACTIONS) {
|
@@ -7,8 +7,8 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
var _excluded = ["sourceEvent"];
|
8
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
9
9
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
10
|
-
import { Slice } from 'prosemirror
|
11
|
-
import { ReplaceStep, Step, StepMap, StepResult } from 'prosemirror
|
10
|
+
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
11
|
+
import { ReplaceStep, Step, StepMap, StepResult } from '@atlaskit/editor-prosemirror/transform';
|
12
12
|
export var stepType = 'editor-linking-meta';
|
13
13
|
export var invertStepType = 'editor-linking-meta-invert';
|
14
14
|
/**
|
@@ -0,0 +1,85 @@
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
4
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
8
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
9
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
10
|
+
import { Step, StepResult, StepMap } from '@atlaskit/editor-prosemirror/transform';
|
11
|
+
export var overrideDocumentStepType = 'override-document';
|
12
|
+
export var OverrideDocumentStep = /*#__PURE__*/function (_Step) {
|
13
|
+
_inherits(OverrideDocumentStep, _Step);
|
14
|
+
var _super = _createSuper(OverrideDocumentStep);
|
15
|
+
function OverrideDocumentStep(opts) {
|
16
|
+
var _this;
|
17
|
+
_classCallCheck(this, OverrideDocumentStep);
|
18
|
+
_this = _super.call(this);
|
19
|
+
_defineProperty(_assertThisInitialized(_this), "inverted", false);
|
20
|
+
_defineProperty(_assertThisInitialized(_this), "oldDocumentSize", 0);
|
21
|
+
var inverted = opts.inverted,
|
22
|
+
nextDocument = opts.nextDocument;
|
23
|
+
if (nextDocument.type.name !== 'doc') {
|
24
|
+
throw new Error('nextDocument should be the entire prosemirror doc node and not only its content.');
|
25
|
+
}
|
26
|
+
_this.nextDocument = nextDocument;
|
27
|
+
_this.inverted = Boolean(inverted);
|
28
|
+
return _this;
|
29
|
+
}
|
30
|
+
_createClass(OverrideDocumentStep, [{
|
31
|
+
key: "apply",
|
32
|
+
value: function apply(doc) {
|
33
|
+
this.oldDocumentSize = doc.content.size;
|
34
|
+
return StepResult.ok(this.nextDocument);
|
35
|
+
}
|
36
|
+
}, {
|
37
|
+
key: "map",
|
38
|
+
value: function map() {
|
39
|
+
return new OverrideDocumentStep({
|
40
|
+
nextDocument: this.nextDocument,
|
41
|
+
inverted: this.inverted
|
42
|
+
});
|
43
|
+
}
|
44
|
+
}, {
|
45
|
+
key: "getMap",
|
46
|
+
value: function getMap() {
|
47
|
+
if (!this.nextDocument || !this.oldDocumentSize) {
|
48
|
+
return new StepMap([0, 0, 0]);
|
49
|
+
}
|
50
|
+
var oldSize = this.oldDocumentSize;
|
51
|
+
var nextDocumentSize = this.nextDocument.content.size;
|
52
|
+
return new StepMap([0, oldSize, nextDocumentSize]);
|
53
|
+
}
|
54
|
+
}, {
|
55
|
+
key: "invert",
|
56
|
+
value: function invert(doc) {
|
57
|
+
return new OverrideDocumentStep({
|
58
|
+
nextDocument: doc,
|
59
|
+
inverted: true
|
60
|
+
});
|
61
|
+
}
|
62
|
+
}, {
|
63
|
+
key: "toJSON",
|
64
|
+
value: function toJSON() {
|
65
|
+
return {
|
66
|
+
stepType: overrideDocumentStepType,
|
67
|
+
inverted: this.inverted,
|
68
|
+
nextDocument: this.nextDocument.toJSON()
|
69
|
+
};
|
70
|
+
}
|
71
|
+
}], [{
|
72
|
+
key: "fromJSON",
|
73
|
+
value: function fromJSON(schema, json) {
|
74
|
+
if (!json || json.stepType !== overrideDocumentStepType) {
|
75
|
+
throw new RangeError('Invalid overrideDocument step OverrideDocumentStep.fromJSON');
|
76
|
+
}
|
77
|
+
return new OverrideDocumentStep({
|
78
|
+
inverted: json.inverted,
|
79
|
+
nextDocument: schema.nodeFromJSON(json.nextDocument)
|
80
|
+
});
|
81
|
+
}
|
82
|
+
}]);
|
83
|
+
return OverrideDocumentStep;
|
84
|
+
}(Step);
|
85
|
+
Step.jsonID(overrideDocumentStepType, OverrideDocumentStep);
|
@@ -9,8 +9,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
9
9
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
12
|
-
import { Step, StepResult } from 'prosemirror
|
13
|
-
import { Slice, Fragment } from 'prosemirror
|
12
|
+
import { Step, StepResult } from '@atlaskit/editor-prosemirror/transform';
|
13
|
+
import { Slice, Fragment } from '@atlaskit/editor-prosemirror/model';
|
14
14
|
|
15
15
|
/**
|
16
16
|
* For more context on what this is about:
|
@@ -12,7 +12,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
12
12
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
13
13
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
14
14
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
15
|
-
import { Step, StepMap, StepResult, Transform } from 'prosemirror
|
15
|
+
import { Step, StepMap, StepResult, Transform } from '@atlaskit/editor-prosemirror/transform';
|
16
16
|
import { cellsAtColumn } from './utils/cells-at-column';
|
17
17
|
import { findColumn } from './utils/find-column';
|
18
18
|
import { getTableRectFromDoc } from './utils/get-table-rect-from-doc';
|
@@ -5,8 +5,8 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
6
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
7
7
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
8
|
-
import { Slice } from 'prosemirror
|
9
|
-
import { ReplaceStep, Step, StepMap, StepResult } from 'prosemirror
|
8
|
+
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
9
|
+
import { ReplaceStep, Step, StepMap, StepResult } from '@atlaskit/editor-prosemirror/transform';
|
10
10
|
export var tableSortingStepType = 'atlaskit-table-sorting-ordering';
|
11
11
|
export var TableSortStep = /*#__PURE__*/function (_Step) {
|
12
12
|
_inherits(TableSortStep, _Step);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
3
|
-
import { StepMap } from 'prosemirror
|
3
|
+
import { StepMap } from '@atlaskit/editor-prosemirror/transform';
|
4
4
|
export var TableSideEffectHandler = /*#__PURE__*/function () {
|
5
5
|
function TableSideEffectHandler(tableSideEffect) {
|
6
6
|
_classCallCheck(this, TableSideEffectHandler);
|
@@ -5,8 +5,8 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
6
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
7
7
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
8
|
-
import { Slice } from 'prosemirror
|
9
|
-
import { ReplaceStep, Step, StepMap, StepResult } from 'prosemirror
|
8
|
+
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
9
|
+
import { ReplaceStep, Step, StepMap, StepResult } from '@atlaskit/editor-prosemirror/transform';
|
10
10
|
export var insertTypeAheadStepType = 'atlaskit-insert-type-ahead';
|
11
11
|
export var InsertTypeAheadStages = /*#__PURE__*/function (InsertTypeAheadStages) {
|
12
12
|
InsertTypeAheadStages["DELETING_RAW_QUERY"] = "DELETING_RAW_QUERY";
|
package/dist/esm/steps.js
CHANGED
@@ -4,4 +4,5 @@ export { InsertTypeAheadStages, InsertTypeAheadStep } from './steps/type-ahead';
|
|
4
4
|
export { AddColumnStep } from './steps/table/add-column';
|
5
5
|
export { SetAttrsStep } from './steps/set-attrs';
|
6
6
|
export { AnalyticsStep } from './steps/analytics';
|
7
|
-
export { LinkMetaStep } from './steps/link-meta-step';
|
7
|
+
export { LinkMetaStep } from './steps/link-meta-step';
|
8
|
+
export { OverrideDocumentStep } from './steps/override-document-step';
|
package/dist/esm/version.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { MarkSpec } from 'prosemirror
|
1
|
+
import { MarkSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
/**
|
3
3
|
* @name inline_comment_marker
|
4
4
|
* @description This temporary mark represents a Confluence-backed inline comment that wraps a piece of text. It will be replaced with a cross-product inline comment solution at later date.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Mark, MarkSpec } from 'prosemirror
|
1
|
+
import { Mark, MarkSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
/**
|
3
3
|
* This annotation is purely for reference, & does _nothing_ given annotating
|
4
4
|
* `minLength` on an array of strings is not supported with our schema+spec
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { MarkSpec } from 'prosemirror
|
1
|
+
import { MarkSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
export declare const typeAheadQuery: MarkSpec;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { MarkSpec } from 'prosemirror
|
1
|
+
import { MarkSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
export declare const unsupportedMark: MarkSpec;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { MarkSpec } from 'prosemirror
|
1
|
+
import { MarkSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
export declare const unsupportedNodeAttribute: MarkSpec;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror
|
1
|
+
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { ExtensionAttributes } from './types/extensions';
|
3
3
|
import { MarksObject } from './types/mark';
|
4
4
|
import { NonNestableBlockContent } from './types/non-nestable-block-content';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror
|
1
|
+
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { InlineFormattedText, InlineCode } from './types/inline-content';
|
3
3
|
import { HardBreakDefinition as HardBreak } from './hard-break';
|
4
4
|
import { MentionDefinition as Mention } from './mention';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec, Node as PMNode } from 'prosemirror
|
1
|
+
import { NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { TextDefinition as Text } from './text';
|
3
3
|
import { BreakoutMarkDefinition } from '../marks/breakout';
|
4
4
|
import { MarksObject, NoMark } from './types/mark';
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror
|
1
|
+
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
export declare const confluenceJiraIssue: NodeSpec;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror
|
1
|
+
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
export declare const confluenceUnsupportedBlock: NodeSpec;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror
|
1
|
+
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
export declare const confluenceUnsupportedInline: NodeSpec;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror
|
1
|
+
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { CodeBlockWithMarksDefinition as CodeBlockWithMarks } from './code-block';
|
3
3
|
import { ExpandWithBreakoutDefinition as ExpandWithBreakout } from './expand';
|
4
4
|
import { LayoutSectionDefinition as LayoutSection } from './layout-section';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror
|
1
|
+
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { RichMediaAttributes } from './types/rich-media-common';
|
3
3
|
export interface EmbedCardAttributes extends RichMediaAttributes {
|
4
4
|
originalWidth?: number;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec, Node as PMNode } from 'prosemirror
|
1
|
+
import { NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { BreakoutMarkDefinition } from '../marks';
|
3
3
|
import { MarksObject, NoMark } from './types/mark';
|
4
4
|
import { NonNestableBlockContent } from './types/non-nestable-block-content';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror
|
1
|
+
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { ExtensionAttributes } from './types/extensions';
|
3
3
|
import { MarksObject } from './types/mark';
|
4
4
|
import { DataConsumerDefinition } from '../marks/data-consumer';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror
|
1
|
+
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { AlignmentMarkDefinition, IndentationMarkDefinition } from '../marks';
|
3
3
|
import { MarksObject, NoMark } from './types/mark';
|
4
4
|
import { Inline } from './types/inline-content';
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror
|
1
|
+
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
export declare const image: NodeSpec;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror
|
1
|
+
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { InlineExtensionAttributes } from './types/extensions';
|
3
3
|
import { MarksObject } from './types/mark';
|
4
4
|
import { DataConsumerDefinition } from '../marks/data-consumer';
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror
|
1
|
+
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
export declare const listItem: NodeSpec;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror
|
1
|
+
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { LinkDefinition } from '../marks/link';
|
3
3
|
import { MediaBaseAttributes } from './media';
|
4
4
|
export interface MediaInlineAttributes extends MediaBaseAttributes {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec, Node as PMNode } from 'prosemirror
|
1
|
+
import { NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { MediaDefinition as Media } from './media';
|
3
3
|
import { LinkDefinition } from '../marks/link';
|
4
4
|
import { ExtendedMediaAttributes } from './types/rich-media-common';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec, Node as PMNode } from 'prosemirror
|
1
|
+
import { NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { BorderMarkDefinition } from '../marks/border';
|
3
3
|
import { LinkDefinition } from '../marks/link';
|
4
4
|
export type MediaType = 'file' | 'link' | 'external';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror
|
1
|
+
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { NoMark } from './types/mark';
|
3
3
|
import { ParagraphDefinition as Paragraph } from './paragraph';
|
4
4
|
import { HeadingDefinition as Heading } from './heading';
|