@atlaskit/adf-schema 28.1.2 → 28.1.4

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.
Files changed (125) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/babel.config.js +156 -0
  3. package/build/tsconfig.json +2 -1
  4. package/dist/json-schema/package.json +1 -8
  5. package/json-schema/package.json +1 -8
  6. package/package.json +41 -29
  7. package/report.api.md +18 -10
  8. package/schema/package.json +1 -8
  9. package/schema-bitbucket/package.json +1 -8
  10. package/schema-confluence/package.json +1 -8
  11. package/schema-default/package.json +1 -8
  12. package/schema-jira/package.json +1 -8
  13. package/steps/package.json +1 -8
  14. package/tsconfig.json +2 -5
  15. package/url/package.json +1 -8
  16. package/dist/types-ts4.5/index.d.ts +0 -6
  17. package/dist/types-ts4.5/json-schema/index.d.ts +0 -2
  18. package/dist/types-ts4.5/schema/bitbucket-schema.d.ts +0 -5
  19. package/dist/types-ts4.5/schema/confluence-schema.d.ts +0 -9
  20. package/dist/types-ts4.5/schema/create-schema.d.ts +0 -32
  21. package/dist/types-ts4.5/schema/default-schema.d.ts +0 -7
  22. package/dist/types-ts4.5/schema/groups.d.ts +0 -6
  23. package/dist/types-ts4.5/schema/index.d.ts +0 -9
  24. package/dist/types-ts4.5/schema/inline-nodes.d.ts +0 -1
  25. package/dist/types-ts4.5/schema/jira-schema.d.ts +0 -65
  26. package/dist/types-ts4.5/schema/marks/alignment.d.ts +0 -16
  27. package/dist/types-ts4.5/schema/marks/annotation.d.ts +0 -32
  28. package/dist/types-ts4.5/schema/marks/border.d.ts +0 -23
  29. package/dist/types-ts4.5/schema/marks/breakout.d.ts +0 -12
  30. package/dist/types-ts4.5/schema/marks/code.d.ts +0 -8
  31. package/dist/types-ts4.5/schema/marks/confluence-inline-comment.d.ts +0 -12
  32. package/dist/types-ts4.5/schema/marks/data-consumer.d.ts +0 -46
  33. package/dist/types-ts4.5/schema/marks/em.d.ts +0 -8
  34. package/dist/types-ts4.5/schema/marks/fragment.d.ts +0 -29
  35. package/dist/types-ts4.5/schema/marks/indentation.d.ts +0 -16
  36. package/dist/types-ts4.5/schema/marks/index.d.ts +0 -34
  37. package/dist/types-ts4.5/schema/marks/link.d.ts +0 -35
  38. package/dist/types-ts4.5/schema/marks/strike.d.ts +0 -8
  39. package/dist/types-ts4.5/schema/marks/strong.d.ts +0 -8
  40. package/dist/types-ts4.5/schema/marks/subsup.d.ts +0 -15
  41. package/dist/types-ts4.5/schema/marks/text-color.d.ts +0 -22
  42. package/dist/types-ts4.5/schema/marks/type-ahead-query.d.ts +0 -2
  43. package/dist/types-ts4.5/schema/marks/underline.d.ts +0 -8
  44. package/dist/types-ts4.5/schema/marks/unsupported-mark.d.ts +0 -2
  45. package/dist/types-ts4.5/schema/marks/unsupported-node-attributes.d.ts +0 -2
  46. package/dist/types-ts4.5/schema/nodes/block-card.d.ts +0 -44
  47. package/dist/types-ts4.5/schema/nodes/blockquote.d.ts +0 -14
  48. package/dist/types-ts4.5/schema/nodes/bodied-extension.d.ts +0 -24
  49. package/dist/types-ts4.5/schema/nodes/bullet-list.d.ts +0 -3
  50. package/dist/types-ts4.5/schema/nodes/caption.d.ts +0 -21
  51. package/dist/types-ts4.5/schema/nodes/code-block.d.ts +0 -31
  52. package/dist/types-ts4.5/schema/nodes/confluence-jira-issue.d.ts +0 -2
  53. package/dist/types-ts4.5/schema/nodes/confluence-unsupported-block.d.ts +0 -2
  54. package/dist/types-ts4.5/schema/nodes/confluence-unsupported-inline.d.ts +0 -2
  55. package/dist/types-ts4.5/schema/nodes/date.d.ts +0 -14
  56. package/dist/types-ts4.5/schema/nodes/decision-item.d.ts +0 -17
  57. package/dist/types-ts4.5/schema/nodes/decision-list.d.ts +0 -18
  58. package/dist/types-ts4.5/schema/nodes/doc.d.ts +0 -18
  59. package/dist/types-ts4.5/schema/nodes/embed-card.d.ts +0 -18
  60. package/dist/types-ts4.5/schema/nodes/emoji.d.ts +0 -14
  61. package/dist/types-ts4.5/schema/nodes/expand.d.ts +0 -31
  62. package/dist/types-ts4.5/schema/nodes/extension.d.ts +0 -18
  63. package/dist/types-ts4.5/schema/nodes/hard-break.d.ts +0 -11
  64. package/dist/types-ts4.5/schema/nodes/heading.d.ts +0 -36
  65. package/dist/types-ts4.5/schema/nodes/image.d.ts +0 -2
  66. package/dist/types-ts4.5/schema/nodes/index.d.ts +0 -93
  67. package/dist/types-ts4.5/schema/nodes/inline-card.d.ts +0 -10
  68. package/dist/types-ts4.5/schema/nodes/inline-extension.d.ts +0 -18
  69. package/dist/types-ts4.5/schema/nodes/layout-column.d.ts +0 -21
  70. package/dist/types-ts4.5/schema/nodes/layout-section.d.ts +0 -44
  71. package/dist/types-ts4.5/schema/nodes/list-item.d.ts +0 -2
  72. package/dist/types-ts4.5/schema/nodes/media-group.d.ts +0 -14
  73. package/dist/types-ts4.5/schema/nodes/media-inline.d.ts +0 -16
  74. package/dist/types-ts4.5/schema/nodes/media-single.d.ts +0 -67
  75. package/dist/types-ts4.5/schema/nodes/media.d.ts +0 -62
  76. package/dist/types-ts4.5/schema/nodes/mention.d.ts +0 -24
  77. package/dist/types-ts4.5/schema/nodes/nested-expand.d.ts +0 -27
  78. package/dist/types-ts4.5/schema/nodes/ordered-list.d.ts +0 -4
  79. package/dist/types-ts4.5/schema/nodes/panel.d.ts +0 -38
  80. package/dist/types-ts4.5/schema/nodes/paragraph.d.ts +0 -37
  81. package/dist/types-ts4.5/schema/nodes/placeholder.d.ts +0 -11
  82. package/dist/types-ts4.5/schema/nodes/rule.d.ts +0 -8
  83. package/dist/types-ts4.5/schema/nodes/status.d.ts +0 -20
  84. package/dist/types-ts4.5/schema/nodes/tableNodes.d.ts +0 -117
  85. package/dist/types-ts4.5/schema/nodes/task-item.d.ts +0 -17
  86. package/dist/types-ts4.5/schema/nodes/task-list.d.ts +0 -21
  87. package/dist/types-ts4.5/schema/nodes/text.d.ts +0 -15
  88. package/dist/types-ts4.5/schema/nodes/types/block-content.d.ts +0 -22
  89. package/dist/types-ts4.5/schema/nodes/types/extensions.d.ts +0 -34
  90. package/dist/types-ts4.5/schema/nodes/types/inline-content.d.ts +0 -32
  91. package/dist/types-ts4.5/schema/nodes/types/list.d.ts +0 -43
  92. package/dist/types-ts4.5/schema/nodes/types/mark.d.ts +0 -15
  93. package/dist/types-ts4.5/schema/nodes/types/non-nestable-block-content.d.ts +0 -20
  94. package/dist/types-ts4.5/schema/nodes/types/rich-media-common.d.ts +0 -38
  95. package/dist/types-ts4.5/schema/nodes/unknown-block.d.ts +0 -3
  96. package/dist/types-ts4.5/schema/nodes/unsupported-block.d.ts +0 -2
  97. package/dist/types-ts4.5/schema/nodes/unsupported-inline.d.ts +0 -2
  98. package/dist/types-ts4.5/schema/unsupported.d.ts +0 -1
  99. package/dist/types-ts4.5/steps/analytics.d.ts +0 -59
  100. package/dist/types-ts4.5/steps/link-meta-step.d.ts +0 -51
  101. package/dist/types-ts4.5/steps/override-document-step.d.ts +0 -27
  102. package/dist/types-ts4.5/steps/set-attrs.d.ts +0 -23
  103. package/dist/types-ts4.5/steps/table/add-column.d.ts +0 -88
  104. package/dist/types-ts4.5/steps/table/constants.d.ts +0 -4
  105. package/dist/types-ts4.5/steps/table/sort-column.d.ts +0 -18
  106. package/dist/types-ts4.5/steps/table/types.d.ts +0 -39
  107. package/dist/types-ts4.5/steps/table/utils/cell-step.d.ts +0 -51
  108. package/dist/types-ts4.5/steps/table/utils/cells-at-column.d.ts +0 -20
  109. package/dist/types-ts4.5/steps/table/utils/find-column.d.ts +0 -8
  110. package/dist/types-ts4.5/steps/table/utils/get-table-rect-from-doc.d.ts +0 -8
  111. package/dist/types-ts4.5/steps/table/utils/side-effects/rows.d.ts +0 -25
  112. package/dist/types-ts4.5/steps/table/utils/side-effects/side-effects.d.ts +0 -15
  113. package/dist/types-ts4.5/steps/table/utils/side-effects/table.d.ts +0 -16
  114. package/dist/types-ts4.5/steps/table/utils/side-effects/types.d.ts +0 -33
  115. package/dist/types-ts4.5/steps/table/utils/table-map.d.ts +0 -6
  116. package/dist/types-ts4.5/steps/type-ahead.d.ts +0 -35
  117. package/dist/types-ts4.5/steps.d.ts +0 -12
  118. package/dist/types-ts4.5/utils/colors.d.ts +0 -74
  119. package/dist/types-ts4.5/utils/confluence/emoji.d.ts +0 -50
  120. package/dist/types-ts4.5/utils/extensions.d.ts +0 -3
  121. package/dist/types-ts4.5/utils/index.d.ts +0 -6
  122. package/dist/types-ts4.5/utils/parseDOM.d.ts +0 -1
  123. package/dist/types-ts4.5/utils/url.d.ts +0 -40
  124. package/dist/types-ts4.5/utils/uuid.d.ts +0 -5
  125. package/tmp/api-report-tmp.d.ts +0 -1705
@@ -1,88 +0,0 @@
1
- import { Node as ProseMirrorNode, Schema } from '@atlaskit/editor-prosemirror/model';
2
- import { Mappable, Step, StepMap, StepResult } from '@atlaskit/editor-prosemirror/transform';
3
- import { AddColumnStepInfo, AddColumnStepJson } from './types';
4
- /**
5
- * Index and positions looks like
6
- * 0 1 2 3 -> Add Column Index
7
- * | 5 | 10 | 15 | -> Table with Positions
8
- * | 20 | 25 | 30 |
9
- * 0 1 2 x -> Remove Column Index
10
- *
11
- */
12
- export declare class AddColumnStep<S extends Schema = any> extends Step {
13
- private readonly tablePos;
14
- private readonly isDelete;
15
- private columnInfo;
16
- private sideEffectsHandler;
17
- constructor(tablePos: number, addColumnStepInfo: AddColumnStepInfo, isDelete?: boolean);
18
- /**
19
- * Detect the column based on all the cells step in column info.
20
- * Recreate columnInfo based on the current document. We might need to add new cells added by insert row or unmerge cells.
21
- * If isDelete
22
- * Decrease colspan if one row has merged cell
23
- * Remove all the cells using columnInfo.cellStep[].from
24
- * else
25
- * Increase colspan if one row had merged cell
26
- * Add all new cells at columnInfo.cellStep[].from,
27
- * if there is columnInfo.cellStep[].newCell use it
28
- * else create an empty cell
29
- *
30
- * @param doc Current document
31
- */
32
- apply(doc: ProseMirrorNode): StepResult;
33
- /**
34
- * Update tablePos with the new position. If tablePos doesnt exist any more remove the step
35
- * Update all the cellStep inside columnInfo. If cellStep.from position gets deleted removed it from column info
36
- * if cellStep.length === 0 remove the step
37
- * Create a new step with all the position updated
38
- * @param mapping
39
- */
40
- map(mapping: Mappable): Step | null;
41
- /**
42
- * if isDelete
43
- * Get the original cell node at columnInfo.cellStep[].from to columnInfo.cellStep[].to
44
- * Create a copy of the node
45
- * Create a new cellStep with the same positions but with the clone node as a content
46
- * return new step inverted
47
- * else
48
- * Remove the content from each columnInfo.cellStep[].content
49
- * return new step inverted
50
- * @param originalDoc
51
- */
52
- invert(originalDoc: ProseMirrorNode): Step;
53
- /**
54
- * StepMap is created based on columnInfo.
55
- * ColumnInfo is created on constructor and once is applied (the document could have new cells that weren't part of the original set)
56
- * if isDelete
57
- * Create range array based on cell info where each range is [cellStep.from, cellStep.from - cellStep.to, 0]
58
- * else
59
- * Create range array base on cell info where each range is [cellStep.from, 0, cellStep.content ? cellStep.content.nodeSize : defaultEmptyCellNodeSize]
60
- *
61
- * Ranges in ProseMirror are represented by each 3 elements in an array.
62
- * As [pos, currentSize, newSize, pos2, currentSize2, newSize2] where:
63
- * pos: Position in the document
64
- * currentSize: Represent the affected range, this will be pos + currentSize
65
- * newSize: Represent the new values, pos + newSize
66
- */
67
- getMap(): StepMap;
68
- /**
69
- * Try to merge this step with another one, to be applied directly
70
- * after it. Returns the merged step when possible, null if the
71
- * steps can't be merged.
72
- */
73
- merge(other: Step): Step | null;
74
- /**
75
- * Create a JSON-serializeable representation of this step. When
76
- * defining this for a custom subclass, make sure the result object
77
- * includes the step type's [JSON id](#transform.Step^jsonID) under
78
- * the `stepType` property.
79
- */
80
- toJSON(): AddColumnStepJson;
81
- /**
82
- * Deserialize a step from its JSON representation. Will call
83
- * through to the step class' own implementation of this method.
84
- */
85
- static fromJSON<S extends Schema = any>(schema: S, json: AddColumnStepJson): Step;
86
- static create(doc: ProseMirrorNode, tablePos: number, column: number, isDelete?: boolean): AddColumnStep<any>;
87
- private applyCellSteps;
88
- }
@@ -1,4 +0,0 @@
1
- export declare enum SortOrder {
2
- ASC = "asc",
3
- DESC = "desc"
4
- }
@@ -1,18 +0,0 @@
1
- import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
- import { ReplaceStep, Step, StepMap, StepResult } from '@atlaskit/editor-prosemirror/transform';
3
- import { TableColumnOrdering } from './types';
4
- export declare const tableSortingStepType = "atlaskit-table-sorting-ordering";
5
- export declare class TableSortStep extends Step {
6
- prev: TableColumnOrdering | undefined;
7
- next: TableColumnOrdering | undefined;
8
- pos: number;
9
- constructor(pos: number, prev?: TableColumnOrdering, next?: TableColumnOrdering);
10
- invert(): TableSortStep;
11
- apply(doc: PMNode): StepResult;
12
- map(): null;
13
- getMap(): StepMap;
14
- toJSON(): {
15
- stepType: string;
16
- };
17
- static fromJSON(): ReplaceStep;
18
- }
@@ -1,39 +0,0 @@
1
- import { Node as ProseMirrorNode } from '@atlaskit/editor-prosemirror/model';
2
- import { SideEffects, SideEffectsJSON } from './utils/side-effects/types';
3
- import { SortOrder } from './constants';
4
- export type ColumnInfo = Map<number, CellStep>;
5
- export interface AddColumnStepInfo {
6
- cells: CellStep[];
7
- sideEffects?: SideEffects;
8
- }
9
- /**
10
- * Information about the cell
11
- * from: where the cell will be added removed
12
- * to: where the original cell ends
13
- * newCell?: the content of the new cells if it's added
14
- */
15
- export interface CellStep {
16
- from: number;
17
- to: number;
18
- newCell?: ProseMirrorNode;
19
- mergeWith?: number;
20
- }
21
- export interface CellStepJson {
22
- from: number;
23
- to: number;
24
- newCell?: {
25
- [key: string]: any;
26
- };
27
- mergeWith?: number;
28
- }
29
- export interface AddColumnStepJson {
30
- stepType: 'ak-add-column';
31
- tablePos: number;
32
- cells: CellStepJson[];
33
- sideEffects?: SideEffectsJSON;
34
- isDelete: boolean;
35
- }
36
- export interface TableColumnOrdering {
37
- columnIndex: number;
38
- order: SortOrder;
39
- }
@@ -1,51 +0,0 @@
1
- import { Node as ProseMirrorNode } from '@atlaskit/editor-prosemirror/model';
2
- import { Cell } from './cells-at-column';
3
- import { CellStep } from '../types';
4
- import { Transform, StepMap } from '@atlaskit/editor-prosemirror/transform';
5
- import { TableRect } from '@atlaskit/editor-tables/table-map';
6
- /**
7
- * Given a cell step, this function has to do the specific transformation to executed that step.
8
- * It returns the applied cellStep and rows that needs to skip (because it was already handled).
9
- * @param tr
10
- * @param tableRect
11
- * @param cell
12
- * @param cellStep
13
- * @param isDelete
14
- * @param column
15
- */
16
- export declare function applyCellStep(tr: Transform, tableRect: TableRect, cell: Cell, cellStep: CellStep, isDelete: boolean, column: number): {
17
- tr: Transform;
18
- skipRows: number;
19
- cellStep: CellStep;
20
- };
21
- /**
22
- * Given a cell step, this functions return un StepMap representing this action.
23
- * [position, oldSize, newSize]
24
- * @param cellStep
25
- * @param isDelete
26
- */
27
- export declare function getMapFromCellStep(cellStep: CellStep, isDelete: boolean): [
28
- number,
29
- number,
30
- number
31
- ];
32
- /**
33
- * Given a cell step, this function invert that step.
34
- * @param doc
35
- * @param getTableRectAndColumn
36
- * @param cellStep
37
- * @param isDelete
38
- * @param stepMap
39
- */
40
- export declare function invertCellStep(doc: ProseMirrorNode, getTableRectAndColumn: () => {
41
- rect: TableRect;
42
- column: number;
43
- }, cellStep: CellStep, isDelete: boolean, stepMap: StepMap): CellStep;
44
- /**
45
- * Create a cell step based on the current cell and operation (add/delete)
46
- * @param cell
47
- * @param column
48
- * @param isDelete
49
- * @param previousCellStep
50
- */
51
- export declare function createCellStep(cell: Cell, column: number, isDelete: boolean, previousCellStep?: CellStep): CellStep;
@@ -1,20 +0,0 @@
1
- import { TableRect } from '@atlaskit/editor-tables/table-map';
2
- import { NodeType } from '@atlaskit/editor-prosemirror/model';
3
- import { CellAttributes } from '../../../schema/nodes/tableNodes';
4
- export interface Cell {
5
- from: number;
6
- to: number;
7
- row: number;
8
- col: number;
9
- attrs?: CellAttributes;
10
- hasMergedCells: boolean;
11
- type: NodeType;
12
- }
13
- /**
14
- * Helper to have a consistent way to iterate for all the cells in a column.
15
- * You can skip rows by passing the rows to skipped in the next arguments.
16
- * For example: `iter.next(1)` to skip the next row
17
- * @param rect
18
- * @param col
19
- */
20
- export declare function cellsAtColumn(rect: TableRect, col: number): Generator<Cell, void, number | undefined>;
@@ -1,8 +0,0 @@
1
- import { TableRect } from '@atlaskit/editor-tables/table-map';
2
- import { ColumnInfo } from '../types';
3
- /**
4
- * Try to find the right column based on the cell steps in column info..
5
- * @param columnInfo - Map of cell positions sorted from lower to greather
6
- * @param rect - map rect
7
- */
8
- export declare function findColumn(columnInfo: ColumnInfo, rect: TableRect): number | null;
@@ -1,8 +0,0 @@
1
- import { Node as ProseMirrorNode } from '@atlaskit/editor-prosemirror/model';
2
- import { TableRect } from '@atlaskit/editor-tables/table-map';
3
- /**
4
- * Util to get the table rect from the docs
5
- * @param doc
6
- * @param tablePos
7
- */
8
- export declare function getTableRectFromDoc(doc: ProseMirrorNode, tablePos: number): TableRect;
@@ -1,25 +0,0 @@
1
- import { Node as ProseMirrorNode, Schema } from '@atlaskit/editor-prosemirror/model';
2
- import { Mappable, StepMap, Transform } from '@atlaskit/editor-prosemirror/transform';
3
- import { TableRect } from '@atlaskit/editor-tables/table-map';
4
- import { RowSideEffect, RowSideEffectJSON } from './types';
5
- import { Cell } from '../cells-at-column';
6
- interface RowsHandler {
7
- handle: (tr: Transform, rect: TableRect, row: number, col: number, cell: Cell) => {
8
- handled: boolean;
9
- skipRows?: number;
10
- };
11
- end: (tr: Transform, rect: TableRect, col: number) => void;
12
- }
13
- export declare class RowsSideEffectHandler {
14
- rows?: RowSideEffect[];
15
- constructor(rowsSideEffect?: RowSideEffect[]);
16
- private deleteHandler;
17
- private addHandler;
18
- start(isDelete: boolean): RowsHandler;
19
- addRowRanges(ranges: number[], isDelete: boolean): number[];
20
- map(mapping: Mappable): RowSideEffect[];
21
- invert(originalDoc: ProseMirrorNode, isDelete: boolean, map: StepMap): RowSideEffect[] | undefined;
22
- toJSON(): RowSideEffectJSON[] | undefined;
23
- static fromJSON(schema: Schema, json: RowSideEffectJSON[]): RowSideEffect[];
24
- }
25
- export {};
@@ -1,15 +0,0 @@
1
- import { Node as ProseMirrorNode, Schema } from '@atlaskit/editor-prosemirror/model';
2
- import { Mappable, StepMap } from '@atlaskit/editor-prosemirror/transform';
3
- import { SideEffects, SideEffectsJSON } from './types';
4
- import { TableSideEffectHandler } from './table';
5
- import { RowsSideEffectHandler } from './rows';
6
- export declare class SideEffectsHandler {
7
- table: TableSideEffectHandler;
8
- rows: RowsSideEffectHandler;
9
- constructor(sideEffects?: SideEffects);
10
- getTableMap(isDelete: boolean): StepMap | undefined;
11
- map(mapping: Mappable): SideEffects;
12
- invert(originalDoc: ProseMirrorNode, isDelete: boolean, map: StepMap): SideEffects;
13
- toJSON(): SideEffectsJSON | undefined;
14
- static fromJSON(schema: Schema, json: SideEffectsJSON): SideEffects;
15
- }
@@ -1,16 +0,0 @@
1
- import { Node as ProseMirrorNode, Schema } from '@atlaskit/editor-prosemirror/model';
2
- import { Mappable, StepMap, Transform } from '@atlaskit/editor-prosemirror/transform';
3
- import { TableRect } from '@atlaskit/editor-tables/table-map';
4
- import { TableSideEffect, TableSideEffectJSON } from './types';
5
- export declare class TableSideEffectHandler {
6
- table?: TableSideEffect;
7
- constructor(tableSideEffect?: TableSideEffect);
8
- private addTableSideEffect;
9
- handleAddTable(tr: Transform, isDelete: boolean): boolean;
10
- handleRemoveTable(tr: Transform, tablePos: number, tableRect: TableRect, column: number | null, isDelete: boolean): boolean;
11
- getTableMap(isDelete: boolean): StepMap | undefined;
12
- map(mapping: Mappable): TableSideEffect | undefined;
13
- invert(doc: ProseMirrorNode): TableSideEffect | undefined;
14
- toJSON(): TableSideEffectJSON | undefined;
15
- static fromJSON(schema: Schema, json: TableSideEffectJSON): TableSideEffect;
16
- }
@@ -1,33 +0,0 @@
1
- import { Node as ProseMirrorNode } from '@atlaskit/editor-prosemirror/model';
2
- export interface TableSideEffect {
3
- from: number;
4
- to: number;
5
- node: ProseMirrorNode;
6
- }
7
- export interface RowSideEffect {
8
- from: number;
9
- to: number;
10
- rowNode: ProseMirrorNode;
11
- }
12
- export interface TableSideEffectJSON {
13
- from: number;
14
- to: number;
15
- node: {
16
- [key: string]: any;
17
- };
18
- }
19
- export interface RowSideEffectJSON {
20
- from: number;
21
- to: number;
22
- rowNode: {
23
- [key: string]: any;
24
- };
25
- }
26
- export type SideEffects = {
27
- table?: TableSideEffect;
28
- rows?: RowSideEffect[];
29
- };
30
- export type SideEffectsJSON = {
31
- table?: TableSideEffectJSON;
32
- rows?: RowSideEffectJSON[];
33
- };
@@ -1,6 +0,0 @@
1
- import { TableMap } from '@atlaskit/editor-tables/table-map';
2
- export declare const getCellIndex: (map: TableMap, row: number, col: number) => number;
3
- export declare function hasMergedColumns(map: TableMap, row: number, col: number): boolean;
4
- export declare function hasMergedRows(map: TableMap, row: number, col: number): boolean;
5
- export declare function isRootRow(map: TableMap, row: number, col: number): boolean;
6
- export declare function isRootCol(map: TableMap, row: number, col: number): boolean;
@@ -1,35 +0,0 @@
1
- import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
- import { Mappable, ReplaceStep, Step, StepMap, StepResult } from '@atlaskit/editor-prosemirror/transform';
3
- export declare const insertTypeAheadStepType = "atlaskit-insert-type-ahead";
4
- export declare enum InsertTypeAheadStages {
5
- DELETING_RAW_QUERY = "DELETING_RAW_QUERY",
6
- INSERTING_ITEM = "INSERTING_ITEM"
7
- }
8
- type Config = {
9
- selectedIndex: number;
10
- stage: InsertTypeAheadStages;
11
- query: string;
12
- trigger: string;
13
- };
14
- export declare class InsertTypeAheadStep extends Step {
15
- private isInvertStep;
16
- selectedIndex: number;
17
- stage: InsertTypeAheadStages;
18
- query: string;
19
- trigger: string;
20
- constructor({ stage, query, trigger, selectedIndex }: Config, isInvertStep?: boolean);
21
- invert(): InsertTypeAheadStep;
22
- apply(doc: PMNode): StepResult;
23
- merge(): null;
24
- isInsertionStep(): boolean;
25
- isUndoingStep(): boolean;
26
- map(mapping: Mappable): InsertTypeAheadStep;
27
- getMap(): StepMap;
28
- toJSON(): {
29
- stepType: string;
30
- from: number;
31
- to: number;
32
- };
33
- static fromJSON(): ReplaceStep;
34
- }
35
- export {};
@@ -1,12 +0,0 @@
1
- export { SortOrder as TableSortOrder } from './steps/table/constants';
2
- export { TableSortStep } from './steps/table/sort-column';
3
- export { InsertTypeAheadStages, InsertTypeAheadStep } from './steps/type-ahead';
4
- export { AddColumnStep } from './steps/table/add-column';
5
- export { SetAttrsStep } from './steps/set-attrs';
6
- export { AnalyticsStep } from './steps/analytics';
7
- export type { TableColumnOrdering } from './steps/table/types';
8
- export type { AnalyticsInvertStep, AnalyticsWithChannel, AnalyticsPayload, } from './steps/analytics';
9
- export { LinkMetaStep } from './steps/link-meta-step';
10
- export type { LinkStepMetadata } from './steps/link-meta-step';
11
- export { OverrideDocumentStep } from './steps/override-document-step';
12
- export type { OverrideDocumentStepJSON } from './steps/override-document-step';
@@ -1,74 +0,0 @@
1
- /**
2
- * We're avoding importing these colors from @atlaskit/theme since we
3
- * do not want to have react as a dependency of this package.
4
- * TODO: Refactor this once tokenization by Core team is ready
5
- * https://product-fabric.atlassian.net/browse/CS-908
6
- */
7
- export declare const R50 = "#FFEBE6";
8
- export declare const R75 = "#FFBDAD";
9
- export declare const R100 = "#FF8F73";
10
- export declare const R300 = "#FF5630";
11
- export declare const R400 = "#DE350B";
12
- export declare const R500 = "#BF2600";
13
- export declare const Y50 = "#FFFAE6";
14
- export declare const Y75 = "#FFF0B3";
15
- export declare const Y200 = "#FFC400";
16
- export declare const Y400 = "#FF991F";
17
- export declare const Y500 = "#FF8B00";
18
- export declare const G50 = "#E3FCEF";
19
- export declare const G75 = "#ABF5D1";
20
- export declare const G200 = "#57D9A3";
21
- export declare const G300 = "#36B37E";
22
- export declare const G400 = "#00875A";
23
- export declare const G500 = "#006644";
24
- export declare const B50 = "#DEEBFF";
25
- export declare const B75 = "#B3D4FF";
26
- export declare const B100 = "#4C9AFF";
27
- export declare const B400 = "#0052CC";
28
- export declare const B500 = "#0747A6";
29
- export declare const N0 = "#FFFFFF";
30
- export declare const N20 = "#F4F5F7";
31
- export declare const N30 = "#EBECF0";
32
- export declare const N40 = "#DFE1E6";
33
- export declare const N50 = "#C1C7D0";
34
- export declare const N60 = "#B3BAC5";
35
- export declare const N80 = "#97A0AF";
36
- export declare const N90 = "#8993A4";
37
- export declare const N200 = "#6B778C";
38
- export declare const N300 = "#5E6C84";
39
- export declare const N300A = "#091E4224";
40
- export declare const N500 = "#42526E";
41
- export declare const N600 = "#758195";
42
- export declare const N800 = "#172B4D";
43
- export declare const N1000 = "#172B4D";
44
- export declare const P50 = "#EAE6FF";
45
- export declare const P75 = "#C0B6F2";
46
- export declare const P100 = "#998DD9";
47
- export declare const P300 = "#6554C0";
48
- export declare const P400 = "#5243AA";
49
- export declare const P500 = "#403294";
50
- export declare const T50 = "#E6FCFF";
51
- export declare const T75 = "#B3F5FF";
52
- export declare const T100 = "#79E2F2";
53
- export declare const T300 = "#00B8D9";
54
- export declare const T500 = "#008DA6";
55
- /**
56
- * @return String with HEX-coded color.
57
- */
58
- export declare function normalizeHexColor(color: string | null, defaultColor?: string): string | null;
59
- /**
60
- * Converts hex color format to rgb.
61
- * Works well with full hex color format and shortcut as well.
62
- *
63
- * @param hex - hex color string (#xxx, or #xxxxxx)
64
- */
65
- export declare function hexToRgb(color: string): string | null;
66
- /**
67
- * Converts hex color format to rgba.
68
- *
69
- * @param hex - hex color string (#xxx, or #xxxxxx)
70
- */
71
- export declare function hexToRgba(rawColor: string, alpha: number): string | null;
72
- export declare function rgbToHex(value: string): string | null;
73
- export declare function isRgb(color: string): boolean;
74
- export declare function isHex(color: string): boolean;
@@ -1,50 +0,0 @@
1
- /**
2
- * Confluence glyphs ac:name of <ac:emoticon /> map to new emojis
3
- * {
4
- * [ac:name] : ['emoji-id', 'emoji-shortName', 'emoji-fallback']
5
- * ...
6
- * }
7
- * Glyphs that do not map to Fabric Emoji
8
- * will be mapped to Emoji Id '2b50' (:star:) with preserving ac:name as shortName attribute;
9
- */
10
- declare const acNameToEmojiMap: {
11
- smile: string[];
12
- sad: string[];
13
- cheeky: string[];
14
- laugh: string[];
15
- wink: string[];
16
- information: string[];
17
- tick: string[];
18
- cross: string[];
19
- warning: string[];
20
- plus: string[];
21
- minus: string[];
22
- question: string[];
23
- 'thumbs-up': string[];
24
- 'thumbs-down': string[];
25
- 'light-on': string[];
26
- 'yellow-star': string[];
27
- 'light-off': string[];
28
- 'red-star': string[];
29
- 'green-star': string[];
30
- 'blue-star': string[];
31
- heart: string[];
32
- 'broken-heart': string[];
33
- };
34
- export type NameToEmoji = keyof typeof acNameToEmojiMap;
35
- export declare function acNameToEmoji(acName: NameToEmoji): {
36
- id: string;
37
- shortName: string;
38
- text: string;
39
- };
40
- export declare function emojiIdToAcName(emojiId: string): never;
41
- export declare function acShortcutToEmoji(hipchatEmoticonShortName: string): {
42
- id: string;
43
- shortName: string;
44
- text: string;
45
- };
46
- export declare function getEmojiAcName({ id, shortName, }: {
47
- id: string;
48
- shortName: string;
49
- }): string;
50
- export {};
@@ -1,3 +0,0 @@
1
- import { ExtensionAttributes, Layout } from '../schema/nodes/types/extensions';
2
- export declare const isValidLayout: (name: string | null) => name is Layout;
3
- export declare const getExtensionAttrs: (dom: HTMLElement, isInline?: boolean) => ExtensionAttributes | false;
@@ -1,6 +0,0 @@
1
- export { acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, getEmojiAcName, } from './confluence/emoji';
2
- export type { NameToEmoji } from './confluence/emoji';
3
- export { generateUuid, uuid } from './uuid';
4
- export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, hexToRgb, hexToRgba, isHex, isRgb, normalizeHexColor, rgbToHex, } from './colors';
5
- export { getLinkMatch, isSafeUrl, normalizeUrl, linkify, linkifyMatch, } from './url';
6
- export type { Match } from './url';
@@ -1 +0,0 @@
1
- export declare const isDOMElement: (maybeNode: unknown) => maybeNode is Element;
@@ -1,40 +0,0 @@
1
- /**
2
- * This file has been partially duplicated in packages/linking-platform/linking-common/src/url.ts
3
- * Any changes made here should be mirrored there.
4
- * Ticket for dedeplication: https://product-fabric.atlassian.net/browse/EDM-7138
5
- * Ticket for fixing linkification of filename-like urls: https://product-fabric.atlassian.net/browse/EDM-7190
6
- */
7
- import LinkifyIt from 'linkify-it';
8
- /**
9
- * Please notify the Editor Mobile team (Slack: #help-mobilekit) if the logic for this changes.
10
- */
11
- export declare const isSafeUrl: (url: string) => boolean;
12
- export interface Match {
13
- schema: any;
14
- index: number;
15
- lastIndex: number;
16
- raw: string;
17
- text: string;
18
- url: string;
19
- length?: number;
20
- input?: string;
21
- }
22
- export declare const linkify: LinkifyIt.LinkifyIt;
23
- export declare const LINK_REGEXP: RegExp;
24
- /** Attempt to find a link match using a regex string defining a URL */
25
- export declare const linkifyMatch: (text: string) => Match[];
26
- /**
27
- * Attempt to find a link match. Tries to use our regex search first.
28
- * If this doesn't match (e.g. no protocol), try using linkify-it library.
29
- * Returns null if url string empty or no string given, or if no match found.
30
- */
31
- export declare function getLinkMatch(str?: string): Match | null;
32
- /**
33
- * Adds protocol to url if needed.
34
- * Returns empty string if no url given or if no link match found.
35
- */
36
- export declare function normalizeUrl(url?: string): string;
37
- /**
38
- * checks if root relative link
39
- */
40
- export declare function isRootRelative(url: string): boolean;
@@ -1,5 +0,0 @@
1
- export declare const generateUuid: () => string;
2
- export declare const uuid: {
3
- setStatic(value: string | false): void;
4
- generate(): string;
5
- };