@atlaskit/adf-schema 26.0.0 → 26.0.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 26.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5f5ba16de66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f5ba16de66) - [ED-13910] Fix prosemirror types
8
+
3
9
  ## 26.0.0
4
10
 
5
11
  ### Major Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "26.0.0",
3
+ "version": "26.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "26.0.0",
3
+ "version": "26.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "26.0.0",
3
+ "version": "26.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,3 +1,4 @@
1
+ /// <reference path="../../../../../../typings/prosemirror.d.ts" />
1
2
  import { SchemaConfig } from './create-schema';
2
3
  type DefaultSchemaNodes = 'doc' | 'paragraph' | 'text' | 'bulletList' | 'orderedList' | 'listItem' | 'heading' | 'blockquote' | 'codeBlock' | 'panel' | 'rule' | 'image' | 'mention' | 'media' | 'caption' | 'mediaGroup' | 'mediaSingle' | 'mediaInline' | 'confluenceUnsupportedBlock' | 'confluenceUnsupportedInline' | 'confluenceJiraIssue' | 'expand' | 'nestedExpand' | 'extension' | 'inlineExtension' | 'bodiedExtension' | 'hardBreak' | 'emoji' | 'table' | 'tableCell' | 'tableHeader' | 'tableRow' | 'decisionList' | 'decisionItem' | 'taskList' | 'taskItem' | 'unknownBlock' | 'date' | 'status' | 'placeholder' | 'layoutSection' | 'layoutColumn' | 'inlineCard' | 'blockCard' | 'embedCard' | 'unsupportedBlock' | 'unsupportedInline';
3
4
  type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer' | 'fragment';
@@ -47,13 +47,13 @@ export declare class AnalyticsStep<P extends AnalyticsPayload> extends Step {
47
47
  * Generate new undo/redo analytics event when step is inverted
48
48
  */
49
49
  invert(): AnalyticsStep<AnalyticsInvertPayload>;
50
- apply(doc: PMNode): StepResult<any>;
50
+ apply(doc: PMNode): StepResult;
51
51
  map(mapping: Mappable): AnalyticsStep<P>;
52
52
  getMap(): StepMap;
53
53
  merge(other: Step): AnalyticsStep<P> | null;
54
54
  toJSON(): {
55
55
  stepType: string;
56
56
  };
57
- static fromJSON(): ReplaceStep<any>;
57
+ static fromJSON(): ReplaceStep;
58
58
  }
59
59
  export {};
@@ -36,7 +36,7 @@ export declare class LinkMetaStep extends Step {
36
36
  * Generate new undo/redo analytics event when step is inverted
37
37
  */
38
38
  invert(): LinkMetaStep;
39
- apply(doc: PMNode): StepResult<any>;
39
+ apply(doc: PMNode): StepResult;
40
40
  map(mapping: Mappable): LinkMetaStep;
41
41
  getMap(): StepMap;
42
42
  merge(): null;
@@ -47,5 +47,5 @@ export declare class LinkMetaStep extends Step {
47
47
  };
48
48
  static fromJSON<S extends Schema = any>(_: S, __: {
49
49
  [key: string]: any;
50
- }): ReplaceStep<any>;
50
+ }): ReplaceStep;
51
51
  }
@@ -8,7 +8,7 @@ export declare class SetAttrsStep extends Step {
8
8
  pos: number;
9
9
  attrs: object;
10
10
  constructor(pos: number, attrs: object);
11
- apply(doc: ProseMirrorNode): StepResult<any>;
11
+ apply(doc: ProseMirrorNode): StepResult;
12
12
  invert(doc: ProseMirrorNode): SetAttrsStep;
13
13
  map(mapping: Mappable): SetAttrsStep | null;
14
14
  toJSON(): {
@@ -29,7 +29,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
29
29
  *
30
30
  * @param doc Current document
31
31
  */
32
- apply(doc: ProseMirrorNode<S>): StepResult<S>;
32
+ apply(doc: ProseMirrorNode): StepResult;
33
33
  /**
34
34
  * Update tablePos with the new position. If tablePos doesnt exist any more remove the step
35
35
  * Update all the cellStep inside columnInfo. If cellStep.from position gets deleted removed it from column info
@@ -37,7 +37,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
37
37
  * Create a new step with all the position updated
38
38
  * @param mapping
39
39
  */
40
- map(mapping: Mappable): Step<S> | null | undefined;
40
+ map(mapping: Mappable): Step | null;
41
41
  /**
42
42
  * if isDelete
43
43
  * Get the original cell node at columnInfo.cellStep[].from to columnInfo.cellStep[].to
@@ -49,7 +49,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
49
49
  * return new step inverted
50
50
  * @param originalDoc
51
51
  */
52
- invert(originalDoc: ProseMirrorNode<S>): Step<S>;
52
+ invert(originalDoc: ProseMirrorNode): Step;
53
53
  /**
54
54
  * StepMap is created based on columnInfo.
55
55
  * ColumnInfo is created on constructor and once is applied (the document could have new cells that weren't part of the original set)
@@ -70,7 +70,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
70
70
  * after it. Returns the merged step when possible, null if the
71
71
  * steps can't be merged.
72
72
  */
73
- merge(other: Step<S>): Step<S> | null | undefined;
73
+ merge(other: Step): Step | null;
74
74
  /**
75
75
  * Create a JSON-serializeable representation of this step. When
76
76
  * defining this for a custom subclass, make sure the result object
@@ -82,7 +82,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
82
82
  * Deserialize a step from its JSON representation. Will call
83
83
  * through to the step class' own implementation of this method.
84
84
  */
85
- static fromJSON<S extends Schema = any>(schema: S, json: AddColumnStepJson): Step<S>;
85
+ static fromJSON<S extends Schema = any>(schema: S, json: AddColumnStepJson): Step;
86
86
  static create(doc: ProseMirrorNode, tablePos: number, column: number, isDelete?: boolean): AddColumnStep<any>;
87
87
  private applyCellSteps;
88
88
  }
@@ -8,11 +8,11 @@ export declare class TableSortStep extends Step {
8
8
  pos: number;
9
9
  constructor(pos: number, prev?: TableColumnOrdering, next?: TableColumnOrdering);
10
10
  invert(): TableSortStep;
11
- apply(doc: PMNode): StepResult<any>;
11
+ apply(doc: PMNode): StepResult;
12
12
  map(): null;
13
13
  getMap(): StepMap;
14
14
  toJSON(): {
15
15
  stepType: string;
16
16
  };
17
- static fromJSON(): ReplaceStep<any>;
17
+ static fromJSON(): ReplaceStep;
18
18
  }
@@ -19,7 +19,7 @@ export declare class InsertTypeAheadStep extends Step {
19
19
  trigger: string;
20
20
  constructor({ stage, query, trigger, selectedIndex }: Config, isInvertStep?: boolean);
21
21
  invert(): InsertTypeAheadStep;
22
- apply(doc: PMNode): StepResult<any>;
22
+ apply(doc: PMNode): StepResult;
23
23
  merge(): null;
24
24
  isInsertionStep(): boolean;
25
25
  isUndoingStep(): boolean;
@@ -30,6 +30,6 @@ export declare class InsertTypeAheadStep extends Step {
30
30
  from: number;
31
31
  to: number;
32
32
  };
33
- static fromJSON(): ReplaceStep<any>;
33
+ static fromJSON(): ReplaceStep;
34
34
  }
35
35
  export {};
@@ -1,3 +1,4 @@
1
+ /// <reference path="../../../../../../typings/prosemirror.d.ts" />
1
2
  import { SchemaConfig } from './create-schema';
2
3
  type DefaultSchemaNodes = 'doc' | 'paragraph' | 'text' | 'bulletList' | 'orderedList' | 'listItem' | 'heading' | 'blockquote' | 'codeBlock' | 'panel' | 'rule' | 'image' | 'mention' | 'media' | 'caption' | 'mediaGroup' | 'mediaSingle' | 'mediaInline' | 'confluenceUnsupportedBlock' | 'confluenceUnsupportedInline' | 'confluenceJiraIssue' | 'expand' | 'nestedExpand' | 'extension' | 'inlineExtension' | 'bodiedExtension' | 'hardBreak' | 'emoji' | 'table' | 'tableCell' | 'tableHeader' | 'tableRow' | 'decisionList' | 'decisionItem' | 'taskList' | 'taskItem' | 'unknownBlock' | 'date' | 'status' | 'placeholder' | 'layoutSection' | 'layoutColumn' | 'inlineCard' | 'blockCard' | 'embedCard' | 'unsupportedBlock' | 'unsupportedInline';
3
4
  type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer' | 'fragment';
@@ -47,13 +47,13 @@ export declare class AnalyticsStep<P extends AnalyticsPayload> extends Step {
47
47
  * Generate new undo/redo analytics event when step is inverted
48
48
  */
49
49
  invert(): AnalyticsStep<AnalyticsInvertPayload>;
50
- apply(doc: PMNode): StepResult<any>;
50
+ apply(doc: PMNode): StepResult;
51
51
  map(mapping: Mappable): AnalyticsStep<P>;
52
52
  getMap(): StepMap;
53
53
  merge(other: Step): AnalyticsStep<P> | null;
54
54
  toJSON(): {
55
55
  stepType: string;
56
56
  };
57
- static fromJSON(): ReplaceStep<any>;
57
+ static fromJSON(): ReplaceStep;
58
58
  }
59
59
  export {};
@@ -36,7 +36,7 @@ export declare class LinkMetaStep extends Step {
36
36
  * Generate new undo/redo analytics event when step is inverted
37
37
  */
38
38
  invert(): LinkMetaStep;
39
- apply(doc: PMNode): StepResult<any>;
39
+ apply(doc: PMNode): StepResult;
40
40
  map(mapping: Mappable): LinkMetaStep;
41
41
  getMap(): StepMap;
42
42
  merge(): null;
@@ -47,5 +47,5 @@ export declare class LinkMetaStep extends Step {
47
47
  };
48
48
  static fromJSON<S extends Schema = any>(_: S, __: {
49
49
  [key: string]: any;
50
- }): ReplaceStep<any>;
50
+ }): ReplaceStep;
51
51
  }
@@ -8,7 +8,7 @@ export declare class SetAttrsStep extends Step {
8
8
  pos: number;
9
9
  attrs: object;
10
10
  constructor(pos: number, attrs: object);
11
- apply(doc: ProseMirrorNode): StepResult<any>;
11
+ apply(doc: ProseMirrorNode): StepResult;
12
12
  invert(doc: ProseMirrorNode): SetAttrsStep;
13
13
  map(mapping: Mappable): SetAttrsStep | null;
14
14
  toJSON(): {
@@ -29,7 +29,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
29
29
  *
30
30
  * @param doc Current document
31
31
  */
32
- apply(doc: ProseMirrorNode<S>): StepResult<S>;
32
+ apply(doc: ProseMirrorNode): StepResult;
33
33
  /**
34
34
  * Update tablePos with the new position. If tablePos doesnt exist any more remove the step
35
35
  * Update all the cellStep inside columnInfo. If cellStep.from position gets deleted removed it from column info
@@ -37,7 +37,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
37
37
  * Create a new step with all the position updated
38
38
  * @param mapping
39
39
  */
40
- map(mapping: Mappable): Step<S> | null | undefined;
40
+ map(mapping: Mappable): Step | null;
41
41
  /**
42
42
  * if isDelete
43
43
  * Get the original cell node at columnInfo.cellStep[].from to columnInfo.cellStep[].to
@@ -49,7 +49,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
49
49
  * return new step inverted
50
50
  * @param originalDoc
51
51
  */
52
- invert(originalDoc: ProseMirrorNode<S>): Step<S>;
52
+ invert(originalDoc: ProseMirrorNode): Step;
53
53
  /**
54
54
  * StepMap is created based on columnInfo.
55
55
  * ColumnInfo is created on constructor and once is applied (the document could have new cells that weren't part of the original set)
@@ -70,7 +70,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
70
70
  * after it. Returns the merged step when possible, null if the
71
71
  * steps can't be merged.
72
72
  */
73
- merge(other: Step<S>): Step<S> | null | undefined;
73
+ merge(other: Step): Step | null;
74
74
  /**
75
75
  * Create a JSON-serializeable representation of this step. When
76
76
  * defining this for a custom subclass, make sure the result object
@@ -82,7 +82,7 @@ export declare class AddColumnStep<S extends Schema = any> extends Step {
82
82
  * Deserialize a step from its JSON representation. Will call
83
83
  * through to the step class' own implementation of this method.
84
84
  */
85
- static fromJSON<S extends Schema = any>(schema: S, json: AddColumnStepJson): Step<S>;
85
+ static fromJSON<S extends Schema = any>(schema: S, json: AddColumnStepJson): Step;
86
86
  static create(doc: ProseMirrorNode, tablePos: number, column: number, isDelete?: boolean): AddColumnStep<any>;
87
87
  private applyCellSteps;
88
88
  }
@@ -8,11 +8,11 @@ export declare class TableSortStep extends Step {
8
8
  pos: number;
9
9
  constructor(pos: number, prev?: TableColumnOrdering, next?: TableColumnOrdering);
10
10
  invert(): TableSortStep;
11
- apply(doc: PMNode): StepResult<any>;
11
+ apply(doc: PMNode): StepResult;
12
12
  map(): null;
13
13
  getMap(): StepMap;
14
14
  toJSON(): {
15
15
  stepType: string;
16
16
  };
17
- static fromJSON(): ReplaceStep<any>;
17
+ static fromJSON(): ReplaceStep;
18
18
  }
@@ -19,7 +19,7 @@ export declare class InsertTypeAheadStep extends Step {
19
19
  trigger: string;
20
20
  constructor({ stage, query, trigger, selectedIndex }: Config, isInvertStep?: boolean);
21
21
  invert(): InsertTypeAheadStep;
22
- apply(doc: PMNode): StepResult<any>;
22
+ apply(doc: PMNode): StepResult;
23
23
  merge(): null;
24
24
  isInsertionStep(): boolean;
25
25
  isUndoingStep(): boolean;
@@ -30,6 +30,6 @@ export declare class InsertTypeAheadStep extends Step {
30
30
  from: number;
31
31
  to: number;
32
32
  };
33
- static fromJSON(): ReplaceStep<any>;
33
+ static fromJSON(): ReplaceStep;
34
34
  }
35
35
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "26.0.0",
3
+ "version": "26.0.1",
4
4
  "description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -61,9 +61,6 @@
61
61
  "@atlaskit/editor-test-helpers": "^18.8.0",
62
62
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
63
63
  "@types/linkify-it": "^2.0.4",
64
- "@types/prosemirror-history": "^1.0.1",
65
- "@types/prosemirror-model": "^1.11.0",
66
- "@types/prosemirror-state": "^1.2.0",
67
64
  "prosemirror-history": "^1.1.3",
68
65
  "prosemirror-state": "1.3.4",
69
66
  "typescript": "~4.9.5"