@manuscripts/track-changes-plugin 0.4.6 → 1.0.1-LEAN-1697

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/dist/actions.d.ts CHANGED
@@ -24,7 +24,7 @@ export declare enum TrackChangesAction {
24
24
  refreshChanges = "track-changes-refresh-changes",
25
25
  applyAndRemoveChanges = "track-changes-apply-remove-changes"
26
26
  }
27
- export declare type TrackChangesActionParams = {
27
+ export type TrackChangesActionParams = {
28
28
  [TrackChangesAction.skipTrack]: boolean;
29
29
  [TrackChangesAction.setUserID]: string;
30
30
  [TrackChangesAction.setPluginStatus]: TrackChangesStatus;
package/dist/index.cjs CHANGED
@@ -1195,23 +1195,21 @@ function trackReplaceAroundStep(step, oldState, newTr, attrs) {
1195
1195
  * See the License for the specific language governing permissions and
1196
1196
  * limitations under the License.
1197
1197
  */
1198
- function trackReplaceStep(step, oldState, newTr, attrs) {
1198
+ function trackReplaceStep(step, oldState, newTr, attrs, stepResult, currentStepDoc) {
1199
1199
  log.info('###### ReplaceStep ######');
1200
1200
  let selectionPos = 0, changeSteps = [];
1201
+ // Invert the transaction step to prevent it from actually deleting or inserting anything
1201
1202
  step.getMap().forEach((fromA, toA, fromB, toB) => {
1202
1203
  log.info(`changed ranges: ${fromA} ${toA} ${fromB} ${toB}`);
1203
1204
  const { slice } = step;
1204
- // Invert the transaction step to prevent it from actually deleting or inserting anything
1205
- const newStep = step.invert(oldState.doc);
1206
- const stepResult = newTr.maybeStep(newStep);
1207
- if (stepResult.failed) {
1208
- log.error(`invert ReplaceStep failed: "${stepResult.failed}"`, newStep);
1209
- return;
1210
- }
1211
1205
  log.info('TR: steps before applying delete', [...newTr.steps]);
1212
1206
  // First apply the deleted range and update the insert slice to not include content that was deleted,
1213
1207
  // eg partial nodes in an open-ended slice
1214
- const { sliceWasSplit, newSliceContent, steps: deleteSteps, } = deleteAndMergeSplitNodes(fromA, toA, undefined, oldState.doc, newTr, oldState.schema, attrs, slice);
1208
+ if (stepResult.failed) {
1209
+ log.error(`invert ReplaceStep failed: "${stepResult.failed}"`);
1210
+ return;
1211
+ }
1212
+ const { sliceWasSplit, newSliceContent, steps: deleteSteps, } = deleteAndMergeSplitNodes(fromA, toA, undefined, currentStepDoc, newTr, oldState.schema, attrs, slice);
1215
1213
  changeSteps.push(...deleteSteps);
1216
1214
  log.info('TR: steps after applying delete', [...newTr.steps]);
1217
1215
  log.info('DELETE STEPS: ', changeSteps);
@@ -1395,7 +1393,7 @@ function processChangeSteps(changes, startPos, newTr, emptyAttrs, schema) {
1395
1393
  }
1396
1394
  else if (c.type === 'update-node-attrs') {
1397
1395
  const oldDataTracked = getBlockInlineTrackedData(c.node) || [];
1398
- const oldUpdate = oldDataTracked.find((d) => d.operation === exports.CHANGE_OPERATION.set_node_attributes);
1396
+ const oldUpdate = oldDataTracked.find((d) => d.operation === exports.CHANGE_OPERATION.set_node_attributes && d.status === exports.CHANGE_STATUS.pending);
1399
1397
  const { dataTracked, ...oldAttrs } = (oldUpdate === null || oldUpdate === void 0 ? void 0 : oldUpdate.oldAttrs) || c.node.attrs;
1400
1398
  const newDataTracked = [...oldDataTracked.filter((d) => !oldUpdate || d.id !== oldUpdate.id)];
1401
1399
  const newUpdate = oldUpdate
@@ -1635,6 +1633,7 @@ const isHighlightMarkerNode = (node) => node && node.type === node.type.schema.n
1635
1633
  * @returns newTr that inverts the initial tr and applies track attributes/marks
1636
1634
  */
1637
1635
  function trackTransaction(tr, oldState, newTr, authorID) {
1636
+ var _a, _b, _c, _d;
1638
1637
  const emptyAttrs = {
1639
1638
  authorID,
1640
1639
  reviewedByID: null,
@@ -1647,33 +1646,35 @@ function trackTransaction(tr, oldState, newTr, authorID) {
1647
1646
  const wasNodeSelection = tr.selection instanceof prosemirrorState.NodeSelection;
1648
1647
  let iters = 0;
1649
1648
  log.info('ORIGINAL transaction', tr);
1650
- tr.steps.forEach((step) => {
1651
- var _a, _b, _c, _d;
1649
+ for (let i = tr.steps.length - 1; i >= 0; i--) {
1650
+ const step = tr.steps[i];
1652
1651
  log.info('transaction step', step);
1653
1652
  iters += 1;
1654
1653
  if (iters > 20) {
1655
1654
  console.error('@manuscripts/track-changes-plugin: Possible infinite loop in iterating tr.steps, tracking skipped!\n' +
1656
1655
  'This is probably an error with the library, please report back to maintainers with a reproduction if possible', newTr);
1657
- return;
1656
+ continue;
1658
1657
  }
1659
1658
  else if (!(step instanceof prosemirrorTransform.ReplaceStep) && step.constructor.name === 'ReplaceStep') {
1660
1659
  console.error('@manuscripts/track-changes-plugin: Multiple prosemirror-transform packages imported, alias/dedupe them ' +
1661
1660
  'or instanceof checks fail as well as creating new steps');
1662
- return;
1661
+ continue;
1663
1662
  }
1664
1663
  else if (step instanceof prosemirrorTransform.ReplaceStep) {
1665
1664
  const { slice } = step;
1666
1665
  if (((_b = (_a = slice === null || slice === void 0 ? void 0 : slice.content) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.length) === 1 &&
1667
1666
  isHighlightMarkerNode(slice.content.content[0])) {
1668
1667
  // don't track highlight marker nodes
1669
- return;
1668
+ continue;
1670
1669
  }
1671
- let [steps, startPos] = trackReplaceStep(step, oldState, newTr, emptyAttrs);
1670
+ const newStep = step.invert(tr.docs[i]);
1671
+ const stepResult = newTr.maybeStep(newStep);
1672
+ let [steps, startPos] = trackReplaceStep(step, oldState, newTr, emptyAttrs, stepResult, tr.docs[i]);
1672
1673
  if (steps.length === 1) {
1673
1674
  const step = steps[0]; // eslint-disable-line @typescript-eslint/no-explicit-any
1674
1675
  if (isHighlightMarkerNode((step === null || step === void 0 ? void 0 : step.node) || ((_d = (_c = step === null || step === void 0 ? void 0 : step.slice) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.content[0]))) {
1675
1676
  // don't track deleted highlight marker nodes
1676
- return;
1677
+ continue;
1677
1678
  }
1678
1679
  }
1679
1680
  log.info('CHANGES: ', steps);
@@ -1713,7 +1714,7 @@ function trackTransaction(tr, oldState, newTr, authorID) {
1713
1714
  // after track-changes plugin.
1714
1715
  tr.getMeta('inputType') && newTr.setMeta('inputType', tr.getMeta('inputType'));
1715
1716
  tr.getMeta('uiEvent') && newTr.setMeta('uiEvent', tr.getMeta('uiEvent'));
1716
- });
1717
+ }
1717
1718
  // This is kinda hacky solution at the moment to maintain NodeSelections over transactions
1718
1719
  // These are required by at least cross-references and links to activate their selector pop-ups
1719
1720
  if (wasNodeSelection) {
package/dist/index.js CHANGED
@@ -1187,23 +1187,21 @@ function trackReplaceAroundStep(step, oldState, newTr, attrs) {
1187
1187
  * See the License for the specific language governing permissions and
1188
1188
  * limitations under the License.
1189
1189
  */
1190
- function trackReplaceStep(step, oldState, newTr, attrs) {
1190
+ function trackReplaceStep(step, oldState, newTr, attrs, stepResult, currentStepDoc) {
1191
1191
  log.info('###### ReplaceStep ######');
1192
1192
  let selectionPos = 0, changeSteps = [];
1193
+ // Invert the transaction step to prevent it from actually deleting or inserting anything
1193
1194
  step.getMap().forEach((fromA, toA, fromB, toB) => {
1194
1195
  log.info(`changed ranges: ${fromA} ${toA} ${fromB} ${toB}`);
1195
1196
  const { slice } = step;
1196
- // Invert the transaction step to prevent it from actually deleting or inserting anything
1197
- const newStep = step.invert(oldState.doc);
1198
- const stepResult = newTr.maybeStep(newStep);
1199
- if (stepResult.failed) {
1200
- log.error(`invert ReplaceStep failed: "${stepResult.failed}"`, newStep);
1201
- return;
1202
- }
1203
1197
  log.info('TR: steps before applying delete', [...newTr.steps]);
1204
1198
  // First apply the deleted range and update the insert slice to not include content that was deleted,
1205
1199
  // eg partial nodes in an open-ended slice
1206
- const { sliceWasSplit, newSliceContent, steps: deleteSteps, } = deleteAndMergeSplitNodes(fromA, toA, undefined, oldState.doc, newTr, oldState.schema, attrs, slice);
1200
+ if (stepResult.failed) {
1201
+ log.error(`invert ReplaceStep failed: "${stepResult.failed}"`);
1202
+ return;
1203
+ }
1204
+ const { sliceWasSplit, newSliceContent, steps: deleteSteps, } = deleteAndMergeSplitNodes(fromA, toA, undefined, currentStepDoc, newTr, oldState.schema, attrs, slice);
1207
1205
  changeSteps.push(...deleteSteps);
1208
1206
  log.info('TR: steps after applying delete', [...newTr.steps]);
1209
1207
  log.info('DELETE STEPS: ', changeSteps);
@@ -1387,7 +1385,7 @@ function processChangeSteps(changes, startPos, newTr, emptyAttrs, schema) {
1387
1385
  }
1388
1386
  else if (c.type === 'update-node-attrs') {
1389
1387
  const oldDataTracked = getBlockInlineTrackedData(c.node) || [];
1390
- const oldUpdate = oldDataTracked.find((d) => d.operation === CHANGE_OPERATION.set_node_attributes);
1388
+ const oldUpdate = oldDataTracked.find((d) => d.operation === CHANGE_OPERATION.set_node_attributes && d.status === CHANGE_STATUS.pending);
1391
1389
  const { dataTracked, ...oldAttrs } = (oldUpdate === null || oldUpdate === void 0 ? void 0 : oldUpdate.oldAttrs) || c.node.attrs;
1392
1390
  const newDataTracked = [...oldDataTracked.filter((d) => !oldUpdate || d.id !== oldUpdate.id)];
1393
1391
  const newUpdate = oldUpdate
@@ -1627,6 +1625,7 @@ const isHighlightMarkerNode = (node) => node && node.type === node.type.schema.n
1627
1625
  * @returns newTr that inverts the initial tr and applies track attributes/marks
1628
1626
  */
1629
1627
  function trackTransaction(tr, oldState, newTr, authorID) {
1628
+ var _a, _b, _c, _d;
1630
1629
  const emptyAttrs = {
1631
1630
  authorID,
1632
1631
  reviewedByID: null,
@@ -1639,33 +1638,35 @@ function trackTransaction(tr, oldState, newTr, authorID) {
1639
1638
  const wasNodeSelection = tr.selection instanceof NodeSelection;
1640
1639
  let iters = 0;
1641
1640
  log.info('ORIGINAL transaction', tr);
1642
- tr.steps.forEach((step) => {
1643
- var _a, _b, _c, _d;
1641
+ for (let i = tr.steps.length - 1; i >= 0; i--) {
1642
+ const step = tr.steps[i];
1644
1643
  log.info('transaction step', step);
1645
1644
  iters += 1;
1646
1645
  if (iters > 20) {
1647
1646
  console.error('@manuscripts/track-changes-plugin: Possible infinite loop in iterating tr.steps, tracking skipped!\n' +
1648
1647
  'This is probably an error with the library, please report back to maintainers with a reproduction if possible', newTr);
1649
- return;
1648
+ continue;
1650
1649
  }
1651
1650
  else if (!(step instanceof ReplaceStep) && step.constructor.name === 'ReplaceStep') {
1652
1651
  console.error('@manuscripts/track-changes-plugin: Multiple prosemirror-transform packages imported, alias/dedupe them ' +
1653
1652
  'or instanceof checks fail as well as creating new steps');
1654
- return;
1653
+ continue;
1655
1654
  }
1656
1655
  else if (step instanceof ReplaceStep) {
1657
1656
  const { slice } = step;
1658
1657
  if (((_b = (_a = slice === null || slice === void 0 ? void 0 : slice.content) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.length) === 1 &&
1659
1658
  isHighlightMarkerNode(slice.content.content[0])) {
1660
1659
  // don't track highlight marker nodes
1661
- return;
1660
+ continue;
1662
1661
  }
1663
- let [steps, startPos] = trackReplaceStep(step, oldState, newTr, emptyAttrs);
1662
+ const newStep = step.invert(tr.docs[i]);
1663
+ const stepResult = newTr.maybeStep(newStep);
1664
+ let [steps, startPos] = trackReplaceStep(step, oldState, newTr, emptyAttrs, stepResult, tr.docs[i]);
1664
1665
  if (steps.length === 1) {
1665
1666
  const step = steps[0]; // eslint-disable-line @typescript-eslint/no-explicit-any
1666
1667
  if (isHighlightMarkerNode((step === null || step === void 0 ? void 0 : step.node) || ((_d = (_c = step === null || step === void 0 ? void 0 : step.slice) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.content[0]))) {
1667
1668
  // don't track deleted highlight marker nodes
1668
- return;
1669
+ continue;
1669
1670
  }
1670
1671
  }
1671
1672
  log.info('CHANGES: ', steps);
@@ -1705,7 +1706,7 @@ function trackTransaction(tr, oldState, newTr, authorID) {
1705
1706
  // after track-changes plugin.
1706
1707
  tr.getMeta('inputType') && newTr.setMeta('inputType', tr.getMeta('inputType'));
1707
1708
  tr.getMeta('uiEvent') && newTr.setMeta('uiEvent', tr.getMeta('uiEvent'));
1708
- });
1709
+ }
1709
1710
  // This is kinda hacky solution at the moment to maintain NodeSelections over transactions
1710
1711
  // These are required by at least cross-references and links to activate their selector pop-ups
1711
1712
  if (wasNodeSelection) {
@@ -1,5 +1,21 @@
1
+ /*!
2
+ * © 2021 Atypon Systems LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Node as PMNode } from 'prosemirror-model';
1
17
  import type { EditorState, Transaction } from 'prosemirror-state';
2
- import { ReplaceStep } from 'prosemirror-transform';
18
+ import { ReplaceStep, StepResult } from 'prosemirror-transform';
3
19
  import { NewEmptyAttrs } from '../types/track';
4
20
  import { ChangeStep } from '../types/step';
5
- export declare function trackReplaceStep(step: ReplaceStep, oldState: EditorState, newTr: Transaction, attrs: NewEmptyAttrs): [ChangeStep[], number];
21
+ export declare function trackReplaceStep(step: ReplaceStep, oldState: EditorState, newTr: Transaction, attrs: NewEmptyAttrs, stepResult: StepResult, currentStepDoc: PMNode): [ChangeStep[], number];
@@ -23,7 +23,7 @@ export declare enum CHANGE_STATUS {
23
23
  rejected = "rejected",
24
24
  pending = "pending"
25
25
  }
26
- declare type InsertDeleteAttrs = {
26
+ type InsertDeleteAttrs = {
27
27
  id: string;
28
28
  authorID: string;
29
29
  reviewedByID: string | null;
@@ -32,45 +32,45 @@ declare type InsertDeleteAttrs = {
32
32
  createdAt: number;
33
33
  updatedAt: number;
34
34
  };
35
- export declare type UpdateAttrs = Omit<InsertDeleteAttrs, 'operation'> & {
35
+ export type UpdateAttrs = Omit<InsertDeleteAttrs, 'operation'> & {
36
36
  operation: CHANGE_OPERATION.set_node_attributes;
37
37
  oldAttrs: Record<string, any>;
38
38
  };
39
- export declare type TrackedAttrs = InsertDeleteAttrs | UpdateAttrs;
40
- declare type Change = {
39
+ export type TrackedAttrs = InsertDeleteAttrs | UpdateAttrs;
40
+ type Change = {
41
41
  id: string;
42
42
  from: number;
43
43
  to: number;
44
44
  dataTracked: TrackedAttrs;
45
45
  };
46
- export declare type TextChange = Change & {
46
+ export type TextChange = Change & {
47
47
  type: 'text-change';
48
48
  text: string;
49
49
  };
50
- export declare type NodeChange = Change & {
50
+ export type NodeChange = Change & {
51
51
  type: 'node-change';
52
52
  nodeType: string;
53
53
  children: TrackedChange[];
54
54
  };
55
- export declare type NodeAttrChange = Change & {
55
+ export type NodeAttrChange = Change & {
56
56
  type: 'node-attr-change';
57
57
  nodeType: string;
58
58
  oldAttrs: Record<string, any>;
59
59
  newAttrs: Record<string, any>;
60
60
  };
61
- export declare type WrapChange = Change & {
61
+ export type WrapChange = Change & {
62
62
  type: 'wrap-change';
63
63
  wrapperNode: string;
64
64
  };
65
- export declare type MarkChange = Change & {
65
+ export type MarkChange = Change & {
66
66
  type: 'mark-change';
67
67
  };
68
- export declare type TrackedChange = TextChange | NodeChange | NodeAttrChange | WrapChange | MarkChange;
69
- export declare type PartialChange<T extends TrackedChange> = Omit<T, 'dataTracked'> & {
68
+ export type TrackedChange = TextChange | NodeChange | NodeAttrChange | WrapChange | MarkChange;
69
+ export type PartialChange<T extends TrackedChange> = Omit<T, 'dataTracked'> & {
70
70
  dataTracked: Partial<TrackedAttrs>;
71
71
  };
72
- export declare type IncompleteChange = Omit<TrackedChange, 'dataTracked'> & {
72
+ export type IncompleteChange = Omit<TrackedChange, 'dataTracked'> & {
73
73
  dataTracked: Partial<TrackedAttrs>;
74
74
  };
75
- export declare type ChangeType = TrackedChange['type'];
75
+ export type ChangeType = TrackedChange['type'];
76
76
  export {};
@@ -15,13 +15,13 @@
15
15
  */
16
16
  import { Fragment, Node as PMNode, Slice } from 'prosemirror-model';
17
17
  import { ReplaceStep } from 'prosemirror-transform';
18
- export declare type ExposedReplaceStep = ReplaceStep & {
18
+ export type ExposedReplaceStep = ReplaceStep & {
19
19
  slice: ExposedSlice;
20
20
  };
21
- export declare type ExposedSlice = Slice & {
21
+ export type ExposedSlice = Slice & {
22
22
  content: ExposedFragment;
23
23
  insertAt(pos: number, fragment: Fragment | ExposedFragment): ExposedSlice;
24
24
  };
25
- export declare type ExposedFragment = Fragment & {
25
+ export type ExposedFragment = Fragment & {
26
26
  content: PMNode[];
27
27
  };
@@ -50,4 +50,4 @@ export interface UpdateNodeAttrsStep {
50
50
  node: PMNode;
51
51
  newAttrs: Record<string, any>;
52
52
  }
53
- export declare type ChangeStep = DeleteNodeStep | DeleteTextStep | MergeFragmentStep | InsertSliceStep | UpdateNodeAttrsStep;
53
+ export type ChangeStep = DeleteNodeStep | DeleteTextStep | MergeFragmentStep | InsertSliceStep | UpdateNodeAttrsStep;
@@ -26,18 +26,18 @@ export interface TrackChangesState {
26
26
  userID: string;
27
27
  changeSet: ChangeSet;
28
28
  }
29
- export declare type NewEmptyAttrs = Omit<TrackedAttrs, 'id' | 'operation'>;
30
- export declare type NewInsertAttrs = Omit<TrackedAttrs, 'id' | 'operation'> & {
29
+ export type NewEmptyAttrs = Omit<TrackedAttrs, 'id' | 'operation'>;
30
+ export type NewInsertAttrs = Omit<TrackedAttrs, 'id' | 'operation'> & {
31
31
  operation: CHANGE_OPERATION.insert;
32
32
  };
33
- export declare type NewDeleteAttrs = Omit<TrackedAttrs, 'id' | 'operation'> & {
33
+ export type NewDeleteAttrs = Omit<TrackedAttrs, 'id' | 'operation'> & {
34
34
  operation: CHANGE_OPERATION.delete;
35
35
  };
36
- export declare type NewUpdateAttrs = Omit<TrackedAttrs, 'id' | 'operation'> & {
36
+ export type NewUpdateAttrs = Omit<TrackedAttrs, 'id' | 'operation'> & {
37
37
  operation: CHANGE_OPERATION.set_node_attributes;
38
38
  oldAttrs: Record<string, any>;
39
39
  };
40
- export declare type NewTrackedAttrs = NewInsertAttrs | NewDeleteAttrs | NewUpdateAttrs;
40
+ export type NewTrackedAttrs = NewInsertAttrs | NewDeleteAttrs | NewUpdateAttrs;
41
41
  export declare enum TrackChangesStatus {
42
42
  enabled = "enabled",
43
43
  viewSnapshots = "view-snapshots",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manuscripts/track-changes-plugin",
3
- "version": "0.4.6",
3
+ "version": "1.0.1-LEAN-1697",
4
4
  "author": "Atypon Systems LLC",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/Atypon-OpenSource/manuscripts-quarterback/tree/main/quarterback-packages/track-changes-plugin",
@@ -23,8 +23,19 @@
23
23
  "publishConfig": {
24
24
  "access": "public"
25
25
  },
26
+ "scripts": {
27
+ "build": "rollup -c",
28
+ "watch": "rollup -cw",
29
+ "test": "jest --runInBand",
30
+ "format": "prettier --write \"*.+(js|json|yml|yaml|ts|md|graphql|mdx)\" src/ test/",
31
+ "typecheck": "tsc --project tsconfig.test.json --noEmit",
32
+ "lint": "eslint --cache --ext .js,.ts, ./src ./test",
33
+ "lint:fix": "eslint --fix --ext .js,.ts, ./src ./test"
34
+ },
26
35
  "devDependencies": {
27
- "@manuscripts/manuscript-transform": "^0.54.0",
36
+ "@manuscripts/data": "^0.1.12",
37
+ "@manuscripts/json-schema": "^1.1.0",
38
+ "@manuscripts/transform": "^1.0.1",
28
39
  "@rollup/plugin-commonjs": "^22.0.2",
29
40
  "@types/debug": "^4.1.7",
30
41
  "@types/jest": "27.5.1",
@@ -32,15 +43,15 @@
32
43
  "jest": "27.5.1",
33
44
  "jest-environment-jsdom": "27.5.1",
34
45
  "jsdom": "^20.0.0",
35
- "prosemirror-commands": "^1.3.1",
46
+ "prosemirror-commands": "^1.5.0",
36
47
  "prosemirror-example-setup": "^1.2.1",
37
48
  "prosemirror-history": "^1.3.0",
38
49
  "prosemirror-keymap": "^1.2.0",
39
- "prosemirror-model": "^1.18.1",
50
+ "prosemirror-model": "^1.18.3",
40
51
  "prosemirror-schema-list": "^1.2.2",
41
- "prosemirror-state": "^1.4.1",
52
+ "prosemirror-state": "^1.4.2",
42
53
  "prosemirror-transform": "^1.7.0",
43
- "prosemirror-view": "^1.28.1",
54
+ "prosemirror-view": "^1.29.1",
44
55
  "rollup": "^2.79.0",
45
56
  "rollup-plugin-typescript2": "^0.34.0",
46
57
  "ts-jest": "27.1.4",
@@ -55,14 +66,5 @@
55
66
  },
56
67
  "dependencies": {
57
68
  "debug": "^4.3.4"
58
- },
59
- "scripts": {
60
- "build": "rollup -c",
61
- "watch": "rollup -cw",
62
- "test": "jest --runInBand",
63
- "format": "prettier --write \"*.+(js|json|yml|yaml|ts|md|graphql|mdx)\" src/ test/",
64
- "typecheck": "tsc --project tsconfig.test.json --noEmit",
65
- "lint": "eslint --cache --ext .js,.ts, ./src ./test",
66
- "lint:fix": "eslint --fix --ext .js,.ts, ./src ./test"
67
69
  }
68
- }
70
+ }
package/LICENSE DELETED
@@ -1,201 +0,0 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "{}"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright [2021] [Atypon Systems LLC]
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.