@atlaskit/editor-common 74.1.2 → 74.2.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.
Files changed (99) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/cjs/monitoring/error.js +1 -1
  3. package/dist/cjs/styles/index.js +14 -1
  4. package/dist/cjs/styles/shared/grid.js +16 -0
  5. package/dist/cjs/styles/shared/resizer.js +14 -2
  6. package/dist/cjs/ui/ContextPanel/context.js +89 -0
  7. package/dist/cjs/ui/DropList/index.js +3 -5
  8. package/dist/cjs/ui/Resizer/index.js +8 -1
  9. package/dist/cjs/ui/index.js +25 -0
  10. package/dist/cjs/ui-menu/ToolbarButton/index.js +3 -1
  11. package/dist/cjs/ui-menu/ToolbarButton/styles.js +3 -0
  12. package/dist/cjs/utils/grid.js +10 -0
  13. package/dist/cjs/utils/index.js +7 -0
  14. package/dist/cjs/utils/validator.js +2 -1
  15. package/dist/cjs/version.json +1 -1
  16. package/dist/es2019/index.js +1 -1
  17. package/dist/es2019/monitoring/error.js +1 -1
  18. package/dist/es2019/styles/index.js +2 -1
  19. package/dist/es2019/styles/shared/grid.js +36 -0
  20. package/dist/es2019/styles/shared/resizer.js +23 -0
  21. package/dist/es2019/ui/ContextPanel/context.js +65 -0
  22. package/dist/es2019/ui/DropList/index.js +3 -6
  23. package/dist/es2019/ui/Resizer/index.js +8 -2
  24. package/dist/es2019/ui/index.js +2 -1
  25. package/dist/es2019/ui-menu/ToolbarButton/index.js +3 -0
  26. package/dist/es2019/ui-menu/ToolbarButton/styles.js +3 -0
  27. package/dist/es2019/utils/grid.js +1 -0
  28. package/dist/es2019/utils/index.js +2 -1
  29. package/dist/es2019/utils/validator.js +2 -1
  30. package/dist/es2019/version.json +1 -1
  31. package/dist/esm/index.js +1 -1
  32. package/dist/esm/monitoring/error.js +1 -1
  33. package/dist/esm/styles/index.js +2 -1
  34. package/dist/esm/styles/shared/grid.js +7 -0
  35. package/dist/esm/styles/shared/resizer.js +9 -1
  36. package/dist/esm/ui/ContextPanel/context.js +79 -0
  37. package/dist/esm/ui/DropList/index.js +3 -6
  38. package/dist/esm/ui/Resizer/index.js +9 -2
  39. package/dist/esm/ui/index.js +2 -1
  40. package/dist/esm/ui-menu/ToolbarButton/index.js +3 -0
  41. package/dist/esm/ui-menu/ToolbarButton/styles.js +3 -0
  42. package/dist/esm/utils/grid.js +3 -0
  43. package/dist/esm/utils/index.js +2 -1
  44. package/dist/esm/utils/validator.js +2 -1
  45. package/dist/esm/version.json +1 -1
  46. package/dist/types/analytics/types/events.d.ts +1 -1
  47. package/dist/types/provider-factory/types.d.ts +1 -1
  48. package/dist/types/resizer.d.ts +1 -0
  49. package/dist/types/styles/index.d.ts +1 -0
  50. package/dist/types/styles/shared/grid.d.ts +2 -0
  51. package/dist/types/styles/shared/resizer.d.ts +8 -0
  52. package/dist/types/types/editor-actions.d.ts +1 -1
  53. package/dist/types/types/grid.d.ts +1 -0
  54. package/dist/types/types/index.d.ts +2 -2
  55. package/dist/types/types/next-editor-plugin.d.ts +5 -0
  56. package/dist/types/ui/ContextPanel/context.d.ts +24 -0
  57. package/dist/types/ui/DropList/index.d.ts +1 -1
  58. package/dist/types/ui/Resizer/index.d.ts +2 -1
  59. package/dist/types/ui/Resizer/types.d.ts +1 -0
  60. package/dist/types/ui/index.d.ts +1 -0
  61. package/dist/types/ui-menu/ToolbarButton/index.d.ts +1 -1
  62. package/dist/types/utils/grid.d.ts +3 -0
  63. package/dist/types/utils/index.d.ts +1 -0
  64. package/dist/types-ts4.5/analytics/types/events.d.ts +1 -1
  65. package/dist/types-ts4.5/provider-factory/types.d.ts +1 -1
  66. package/dist/types-ts4.5/resizer.d.ts +1 -0
  67. package/dist/types-ts4.5/styles/index.d.ts +1 -0
  68. package/dist/types-ts4.5/styles/shared/grid.d.ts +2 -0
  69. package/dist/types-ts4.5/styles/shared/resizer.d.ts +8 -0
  70. package/dist/types-ts4.5/types/editor-actions.d.ts +1 -1
  71. package/dist/types-ts4.5/types/grid.d.ts +1 -0
  72. package/dist/types-ts4.5/types/index.d.ts +2 -2
  73. package/dist/types-ts4.5/types/next-editor-plugin.d.ts +5 -0
  74. package/dist/types-ts4.5/ui/ContextPanel/context.d.ts +24 -0
  75. package/dist/types-ts4.5/ui/DropList/index.d.ts +1 -1
  76. package/dist/types-ts4.5/ui/Resizer/index.d.ts +2 -1
  77. package/dist/types-ts4.5/ui/Resizer/types.d.ts +1 -0
  78. package/dist/types-ts4.5/ui/index.d.ts +1 -0
  79. package/dist/types-ts4.5/ui-menu/ToolbarButton/index.d.ts +1 -1
  80. package/dist/types-ts4.5/utils/grid.d.ts +3 -0
  81. package/dist/types-ts4.5/utils/index.d.ts +1 -0
  82. package/package.json +10 -8
  83. package/report.api.md +1 -1
  84. package/collab/package.json +0 -15
  85. package/dist/cjs/collab/types.js +0 -5
  86. package/dist/cjs/types/collab.js +0 -5
  87. package/dist/es2019/types/collab.js +0 -1
  88. package/dist/esm/collab/types.js +0 -1
  89. package/dist/esm/collab.js +0 -1
  90. package/dist/esm/types/collab.js +0 -1
  91. package/dist/types/collab/types.d.ts +0 -101
  92. package/dist/types/collab.d.ts +0 -1
  93. package/dist/types/types/collab.d.ts +0 -8
  94. package/dist/types-ts4.5/collab/types.d.ts +0 -101
  95. package/dist/types-ts4.5/collab.d.ts +0 -1
  96. package/dist/types-ts4.5/types/collab.d.ts +0 -8
  97. /package/dist/cjs/{collab.js → types/grid.js} +0 -0
  98. /package/dist/es2019/{collab.js → types/grid.js} +0 -0
  99. /package/dist/{es2019/collab/types.js → esm/types/grid.js} +0 -0
@@ -42,7 +42,7 @@ declare const ToolbarButton: React.ForwardRefExoticComponent<{
42
42
  onItemClick?: ((item: MenuItem) => void) | undefined;
43
43
  onKeyDown?: ((event: React.KeyboardEvent<HTMLElement>) => void) | undefined;
44
44
  selected?: boolean | undefined;
45
- spacing?: "none" | "default" | "compact" | undefined;
45
+ spacing?: "default" | "none" | "compact" | undefined;
46
46
  target?: string | undefined;
47
47
  title?: React.ReactNode;
48
48
  titlePosition?: PositionType | undefined;
@@ -0,0 +1,3 @@
1
+ import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
2
+ import type { GridType } from '../types';
3
+ export declare const gridTypeForLayout: (layout: MediaSingleLayout) => GridType;
@@ -49,3 +49,4 @@ export { isReferencedSource, removeConnectedNodes, getChildrenInfo, getNodeName,
49
49
  export { getItemCounterDigitsSize, getOrderFromOrderedListNode, resolveOrder, isListNode, isParagraphNode, isListItemNode, isBulletList, } from './list';
50
50
  export { isFromCurrentDomain, LinkMatcher, normalizeUrl, linkifyContent, getLinkDomain, findFilepaths, isLinkInMatches, FILEPATH_REGEXP, DONTLINKIFY_REGEXP, getLinkCreationAnalyticsEvent, } from './hyperlink';
51
51
  export declare const pmHistoryPluginKey = "history$";
52
+ export { gridTypeForLayout } from './grid';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.1.2",
3
+ "version": "74.2.1",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,7 +28,6 @@
28
28
  "releaseModel": "scheduled"
29
29
  },
30
30
  "af:exports": {
31
- "./collab": "./src/collab.ts",
32
31
  "./event-dispatcher": "./src/event-dispatcher/index.ts",
33
32
  "./extensions": "./src/extensions.ts",
34
33
  "./normalize-feature-flags": "./src/normalize-feature-flags.ts",
@@ -71,7 +70,7 @@
71
70
  },
72
71
  "dependencies": {
73
72
  "@atlaskit/activity-provider": "^2.4.0",
74
- "@atlaskit/adf-schema": "^25.6.0",
73
+ "@atlaskit/adf-schema": "^25.7.0",
75
74
  "@atlaskit/adf-utils": "^18.2.0",
76
75
  "@atlaskit/analytics-listeners": "^8.7.0",
77
76
  "@atlaskit/analytics-namespaced-context": "^6.7.0",
@@ -80,19 +79,20 @@
80
79
  "@atlaskit/button": "^16.7.0",
81
80
  "@atlaskit/code": "^14.6.0",
82
81
  "@atlaskit/codemod-utils": "^4.2.0",
82
+ "@atlaskit/collab-provider": "^9.0.0",
83
83
  "@atlaskit/editor-json-transformer": "^8.9.0",
84
84
  "@atlaskit/editor-palette": "1.4.2",
85
85
  "@atlaskit/editor-shared-styles": "^2.4.0",
86
86
  "@atlaskit/emoji": "^67.4.0",
87
87
  "@atlaskit/icon": "^21.12.0",
88
88
  "@atlaskit/in-product-testing": "^0.2.0",
89
- "@atlaskit/media-card": "^75.0.0",
89
+ "@atlaskit/media-card": "^76.0.0",
90
90
  "@atlaskit/media-client": "^22.0.0",
91
91
  "@atlaskit/media-picker": "^65.1.0",
92
92
  "@atlaskit/mention": "^22.1.0",
93
93
  "@atlaskit/menu": "^1.7.0",
94
94
  "@atlaskit/platform-feature-flags": "^0.2.0",
95
- "@atlaskit/profilecard": "^19.3.0",
95
+ "@atlaskit/profilecard": "^19.4.0",
96
96
  "@atlaskit/smart-card": "^26.3.0",
97
97
  "@atlaskit/smart-user-picker": "^6.1.0",
98
98
  "@atlaskit/task-decision": "^17.6.0",
@@ -135,13 +135,15 @@
135
135
  "react-intl-next": "npm:react-intl@^5.18.1"
136
136
  },
137
137
  "devDependencies": {
138
- "@atlaskit/editor-core": "^183.1.0",
138
+ "@atlaskit/editor-core": "^184.0.0",
139
139
  "@atlaskit/editor-json-transformer": "^8.9.0",
140
140
  "@atlaskit/editor-plugin-analytics": "^0.0.1",
141
141
  "@atlaskit/editor-plugin-content-insertion": "^0.0.1",
142
142
  "@atlaskit/editor-plugin-feature-flags": "^0.1.0",
143
- "@atlaskit/editor-plugin-table": "^1.4.0",
144
- "@atlaskit/editor-test-helpers": "^18.4.0",
143
+ "@atlaskit/editor-plugin-grid": "^0.1.0",
144
+ "@atlaskit/editor-plugin-table": "^1.5.0",
145
+ "@atlaskit/editor-plugin-width": "^0.0.1",
146
+ "@atlaskit/editor-test-helpers": "^18.5.0",
145
147
  "@atlaskit/media-core": "^34.1.0",
146
148
  "@atlaskit/util-data-test": "^17.8.0",
147
149
  "@atlaskit/visual-regression": "*",
package/report.api.md CHANGED
@@ -26,7 +26,7 @@
26
26
 
27
27
  ```json
28
28
  {
29
- "@atlaskit/media-core": "^34.1.1",
29
+ "@atlaskit/media-core": "^34.1.2",
30
30
  "react": "^16.8.0",
31
31
  "react-dom": "^16.8.0",
32
32
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -1,15 +0,0 @@
1
- {
2
- "name": "@atlaskit/editor-common/collab",
3
- "main": "../dist/cjs/collab.js",
4
- "module": "../dist/esm/collab.js",
5
- "module:es2019": "../dist/es2019/collab.js",
6
- "sideEffects": false,
7
- "types": "../dist/types/collab.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <4.9": {
10
- "*": [
11
- "../dist/types-ts4.5/collab.d.ts"
12
- ]
13
- }
14
- }
15
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,101 +0,0 @@
1
- import { EditorState, Transaction } from 'prosemirror-state';
2
- import { Step } from 'prosemirror-transform';
3
- import { JSONDocNode } from '@atlaskit/editor-json-transformer';
4
- import { SyncUpErrorFunction } from '../types';
5
- export interface CollabParticipant {
6
- lastActive: number;
7
- sessionId: string;
8
- avatar: string;
9
- name: string;
10
- cursorPos?: number;
11
- }
12
- export interface CollabEventInitData {
13
- doc?: any;
14
- json?: any;
15
- version?: number;
16
- sid?: string;
17
- reserveCursor?: boolean;
18
- }
19
- export interface CollabEventRemoteData {
20
- json?: any;
21
- newState?: EditorState;
22
- userIds?: (number | string)[];
23
- }
24
- export interface CollabEventConnectionData {
25
- sid: string;
26
- initial: boolean;
27
- }
28
- export interface CollabEventConnectingData {
29
- initial: boolean;
30
- }
31
- export interface CollabEventDisconnectedData {
32
- sid: string;
33
- reason: 'CLIENT_DISCONNECT' | 'SERVER_DISCONNECT' | 'SOCKET_CLOSED' | 'SOCKET_ERROR' | 'SOCKET_TIMEOUT' | 'UNKNOWN_DISCONNECT';
34
- }
35
- export interface CollabEventPresenceData {
36
- joined?: CollabParticipant[];
37
- left?: {
38
- sessionId: string;
39
- }[];
40
- }
41
- /**
42
- * @deprecated use CollabTelepointerPayload from "@atlaskit/collab-provider"
43
- */
44
- export interface CollabEventTelepointerData {
45
- type: 'telepointer';
46
- selection: CollabSendableSelection;
47
- sessionId: string;
48
- }
49
- export interface CollabEventLocalStepData {
50
- steps: Array<Step>;
51
- }
52
- /**
53
- * @deprecated use CollabSendableSelection from "@atlaskit/collab-provider"
54
- */
55
- export interface CollabSendableSelection {
56
- type: 'textSelection' | 'nodeSelection';
57
- anchor: number;
58
- head: number;
59
- }
60
- /**
61
- * @deprecated use keyof CollabEvents from "@atlaskit/collab-provider"
62
- */
63
- export type CollabEvent = keyof CollabEventData;
64
- /**
65
- * @deprecated use CollabEvents from "@atlaskit/collab-provider"
66
- */
67
- export interface CollabEventData {
68
- init: CollabEventInitData;
69
- connected: CollabEventConnectionData;
70
- disconnected: CollabEventDisconnectedData;
71
- data: CollabEventRemoteData;
72
- telepointer: CollabEventTelepointerData;
73
- presence: CollabEventPresenceData;
74
- error: any;
75
- 'local-steps': any;
76
- entity: any;
77
- connecting: CollabEventConnectingData;
78
- }
79
- export type ResolvedEditorState<T = any> = {
80
- content: JSONDocNode | T;
81
- title: string | null;
82
- stepVersion: number;
83
- };
84
- /**
85
- * @deprecated use CollabEditProvider from "@atlaskit/collab-provider"
86
- */
87
- export interface CollabEditProvider<Events extends CollabEventData = CollabEventData> {
88
- initialize(getState: () => any, createStep: (json: object) => Step): this;
89
- setup(props: {
90
- getState: () => EditorState;
91
- onSyncUpError?: SyncUpErrorFunction;
92
- }): this;
93
- send(tr: Transaction, oldState: EditorState, newState: EditorState): void;
94
- on(evt: keyof Events, handler: (...args: any) => void): this;
95
- off(evt: keyof Events, handler: (...args: any) => void): this;
96
- unsubscribeAll(evt: keyof Events): this;
97
- sendMessage<K extends keyof Events>(data: {
98
- type: K;
99
- } & Events[K]): void;
100
- getFinalAcknowledgedState(): Promise<ResolvedEditorState>;
101
- }
@@ -1 +0,0 @@
1
- export type { CollabEditProvider, CollabEventPresenceData, CollabEvent, CollabEventConnectionData, CollabEventDisconnectedData, CollabEventData, CollabEventInitData, CollabEventRemoteData, CollabEventTelepointerData, CollabParticipant, CollabSendableSelection, CollabEventLocalStepData, ResolvedEditorState, CollabEventConnectingData, } from './collab/types';
@@ -1,8 +0,0 @@
1
- export type NewCollabSyncUpErrorAttributes = {
2
- lengthOfUnconfirmedSteps?: number;
3
- tries: number;
4
- maxRetries: number;
5
- clientId?: number | string;
6
- version: number;
7
- };
8
- export type SyncUpErrorFunction = (attributes: NewCollabSyncUpErrorAttributes) => void;
@@ -1,101 +0,0 @@
1
- import { EditorState, Transaction } from 'prosemirror-state';
2
- import { Step } from 'prosemirror-transform';
3
- import { JSONDocNode } from '@atlaskit/editor-json-transformer';
4
- import { SyncUpErrorFunction } from '../types';
5
- export interface CollabParticipant {
6
- lastActive: number;
7
- sessionId: string;
8
- avatar: string;
9
- name: string;
10
- cursorPos?: number;
11
- }
12
- export interface CollabEventInitData {
13
- doc?: any;
14
- json?: any;
15
- version?: number;
16
- sid?: string;
17
- reserveCursor?: boolean;
18
- }
19
- export interface CollabEventRemoteData {
20
- json?: any;
21
- newState?: EditorState;
22
- userIds?: (number | string)[];
23
- }
24
- export interface CollabEventConnectionData {
25
- sid: string;
26
- initial: boolean;
27
- }
28
- export interface CollabEventConnectingData {
29
- initial: boolean;
30
- }
31
- export interface CollabEventDisconnectedData {
32
- sid: string;
33
- reason: 'CLIENT_DISCONNECT' | 'SERVER_DISCONNECT' | 'SOCKET_CLOSED' | 'SOCKET_ERROR' | 'SOCKET_TIMEOUT' | 'UNKNOWN_DISCONNECT';
34
- }
35
- export interface CollabEventPresenceData {
36
- joined?: CollabParticipant[];
37
- left?: {
38
- sessionId: string;
39
- }[];
40
- }
41
- /**
42
- * @deprecated use CollabTelepointerPayload from "@atlaskit/collab-provider"
43
- */
44
- export interface CollabEventTelepointerData {
45
- type: 'telepointer';
46
- selection: CollabSendableSelection;
47
- sessionId: string;
48
- }
49
- export interface CollabEventLocalStepData {
50
- steps: Array<Step>;
51
- }
52
- /**
53
- * @deprecated use CollabSendableSelection from "@atlaskit/collab-provider"
54
- */
55
- export interface CollabSendableSelection {
56
- type: 'textSelection' | 'nodeSelection';
57
- anchor: number;
58
- head: number;
59
- }
60
- /**
61
- * @deprecated use keyof CollabEvents from "@atlaskit/collab-provider"
62
- */
63
- export type CollabEvent = keyof CollabEventData;
64
- /**
65
- * @deprecated use CollabEvents from "@atlaskit/collab-provider"
66
- */
67
- export interface CollabEventData {
68
- init: CollabEventInitData;
69
- connected: CollabEventConnectionData;
70
- disconnected: CollabEventDisconnectedData;
71
- data: CollabEventRemoteData;
72
- telepointer: CollabEventTelepointerData;
73
- presence: CollabEventPresenceData;
74
- error: any;
75
- 'local-steps': any;
76
- entity: any;
77
- connecting: CollabEventConnectingData;
78
- }
79
- export type ResolvedEditorState<T = any> = {
80
- content: JSONDocNode | T;
81
- title: string | null;
82
- stepVersion: number;
83
- };
84
- /**
85
- * @deprecated use CollabEditProvider from "@atlaskit/collab-provider"
86
- */
87
- export interface CollabEditProvider<Events extends CollabEventData = CollabEventData> {
88
- initialize(getState: () => any, createStep: (json: object) => Step): this;
89
- setup(props: {
90
- getState: () => EditorState;
91
- onSyncUpError?: SyncUpErrorFunction;
92
- }): this;
93
- send(tr: Transaction, oldState: EditorState, newState: EditorState): void;
94
- on(evt: keyof Events, handler: (...args: any) => void): this;
95
- off(evt: keyof Events, handler: (...args: any) => void): this;
96
- unsubscribeAll(evt: keyof Events): this;
97
- sendMessage<K extends keyof Events>(data: {
98
- type: K;
99
- } & Events[K]): void;
100
- getFinalAcknowledgedState(): Promise<ResolvedEditorState>;
101
- }
@@ -1 +0,0 @@
1
- export type { CollabEditProvider, CollabEventPresenceData, CollabEvent, CollabEventConnectionData, CollabEventDisconnectedData, CollabEventData, CollabEventInitData, CollabEventRemoteData, CollabEventTelepointerData, CollabParticipant, CollabSendableSelection, CollabEventLocalStepData, ResolvedEditorState, CollabEventConnectingData, } from './collab/types';
@@ -1,8 +0,0 @@
1
- export type NewCollabSyncUpErrorAttributes = {
2
- lengthOfUnconfirmedSteps?: number;
3
- tries: number;
4
- maxRetries: number;
5
- clientId?: number | string;
6
- version: number;
7
- };
8
- export type SyncUpErrorFunction = (attributes: NewCollabSyncUpErrorAttributes) => void;
File without changes
File without changes