@atlaskit/editor-common 112.4.3 → 112.5.0

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 (47) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/cjs/ai-messages/ai.js +1 -1
  3. package/dist/cjs/analytics/types/enums.js +1 -0
  4. package/dist/cjs/messages/index.js +7 -0
  5. package/dist/cjs/messages/smart-link-changeboard.js +29 -0
  6. package/dist/cjs/monitoring/error.js +1 -1
  7. package/dist/cjs/react-node-view/index.js +6 -2
  8. package/dist/cjs/ugc-tokens/editor-ugc-token-names.js +1 -0
  9. package/dist/cjs/ui/DropList/index.js +1 -1
  10. package/dist/cjs/ui/OverflowShadow/index.js +8 -6
  11. package/dist/cjs/ui/Popup/utils.js +11 -4
  12. package/dist/cjs/utils/calculate-toolbar-position.js +2 -194
  13. package/dist/es2019/ai-messages/ai.js +1 -1
  14. package/dist/es2019/analytics/types/enums.js +1 -0
  15. package/dist/es2019/messages/index.js +1 -0
  16. package/dist/es2019/messages/smart-link-changeboard.js +23 -0
  17. package/dist/es2019/monitoring/error.js +1 -1
  18. package/dist/es2019/react-node-view/index.js +6 -2
  19. package/dist/es2019/ugc-tokens/editor-ugc-token-names.js +1 -0
  20. package/dist/es2019/ui/DropList/index.js +1 -1
  21. package/dist/es2019/ui/OverflowShadow/index.js +8 -6
  22. package/dist/es2019/ui/Popup/utils.js +11 -4
  23. package/dist/es2019/utils/calculate-toolbar-position.js +1 -196
  24. package/dist/esm/ai-messages/ai.js +1 -1
  25. package/dist/esm/analytics/types/enums.js +1 -0
  26. package/dist/esm/messages/index.js +1 -0
  27. package/dist/esm/messages/smart-link-changeboard.js +23 -0
  28. package/dist/esm/monitoring/error.js +1 -1
  29. package/dist/esm/react-node-view/index.js +6 -2
  30. package/dist/esm/ugc-tokens/editor-ugc-token-names.js +1 -0
  31. package/dist/esm/ui/DropList/index.js +1 -1
  32. package/dist/esm/ui/OverflowShadow/index.js +8 -6
  33. package/dist/esm/ui/Popup/utils.js +11 -4
  34. package/dist/esm/utils/calculate-toolbar-position.js +1 -193
  35. package/dist/types/analytics/types/enums.d.ts +1 -0
  36. package/dist/types/analytics/types/format-events.d.ts +5 -1
  37. package/dist/types/messages/index.d.ts +1 -0
  38. package/dist/types/messages/smart-link-changeboard.d.ts +22 -0
  39. package/dist/types/ugc-tokens/editor-ugc-token-names.d.ts +1 -0
  40. package/dist/types/utils/calculate-toolbar-position.d.ts +0 -7
  41. package/dist/types-ts4.5/analytics/types/enums.d.ts +1 -0
  42. package/dist/types-ts4.5/analytics/types/format-events.d.ts +5 -1
  43. package/dist/types-ts4.5/messages/index.d.ts +1 -0
  44. package/dist/types-ts4.5/messages/smart-link-changeboard.d.ts +22 -0
  45. package/dist/types-ts4.5/ugc-tokens/editor-ugc-token-names.d.ts +1 -0
  46. package/dist/types-ts4.5/utils/calculate-toolbar-position.d.ts +0 -7
  47. package/package.json +3 -3
@@ -1,13 +1,6 @@
1
1
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
2
  import type { PopupPosition as Position } from '../ui';
3
3
  export declare const calculateToolbarPositionAboveSelection: (toolbarTitle: string) => (editorView: EditorView, nextPos: Position) => Position;
4
- export declare const calculateToolbarPositionTrackHeadOld: (toolbarTitle: string) => (editorView: EditorView, nextPos: Position) => Position;
5
- /**
6
- * Same logic as calculateToolbarPositionTrackHeadOld, but with the following changes:
7
- * - Uses a cached container to avoid repeated DOM traversal and getComputedStyle calls
8
- * - Works when editor is nested within a fixed positioned parent, such as within a modal or sidebar
9
- */
10
- export declare const calculateToolbarPositionTrackHeadNew: (toolbarTitle: string) => (editorView: EditorView, nextPos: Position) => Position;
11
4
  export declare const calculateToolbarPositionTrackHead: (toolbarTitle: string) => (editorView: EditorView, nextPos: Position) => Position;
12
5
  export type CoordsAtPos = {
13
6
  bottom: number;
@@ -433,6 +433,7 @@ export declare enum ACTION_SUBJECT_ID {
433
433
  FORMAT_CODE = "code",
434
434
  FORMAT_COLOR = "color",
435
435
  FORMAT_HEADING = "heading",
436
+ FORMAT_SMALL_TEXT = "smallText",
436
437
  FORMAT_INDENT = "indentation",
437
438
  FORMAT_ITALIC = "italic",
438
439
  FORMAT_LIST_BULLET = "bulletedList",
@@ -31,6 +31,10 @@ type FormatHeadingAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_HEADING, {
31
31
  newHeadingLevel: HeadingLevelsAndNormalText;
32
32
  previousHeadingLevel?: HeadingLevelsAndNormalText;
33
33
  }>;
34
+ type FormatSmallTextAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_SMALL_TEXT, {
35
+ inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FLOATING_TB;
36
+ previousBlockType?: string;
37
+ }>;
34
38
  type FormatBlockQuoteAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_BLOCK_QUOTE, {
35
39
  inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.FLOATING_TB;
36
40
  }>;
@@ -47,5 +51,5 @@ type FormatColorAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_COLOR, {
47
51
  type FormatListAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_LIST_NUMBER | ACTION_SUBJECT_ID.FORMAT_LIST_BULLET, {
48
52
  inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FORMATTING | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.FLOATING_TB;
49
53
  }>;
50
- export type FormatEventPayload = FormatBasicAEP | FormatSuperSubAEP | FormatIndentationAEP | FormatHeadingAEP | FormatBlockQuoteAEP | FormatClearAEP | FormatColorAEP | FormatListAEP;
54
+ export type FormatEventPayload = FormatBasicAEP | FormatSuperSubAEP | FormatIndentationAEP | FormatHeadingAEP | FormatSmallTextAEP | FormatBlockQuoteAEP | FormatClearAEP | FormatColorAEP | FormatListAEP;
51
55
  export {};
@@ -23,6 +23,7 @@ export { messages as dateMessages } from './date';
23
23
  export { toolbarMessages as layoutMessages } from './layout';
24
24
  export { messages as indentationMessages } from './indentation';
25
25
  export { avatarGroupMessages } from './avatar-group';
26
+ export { smartLinkChangeboardMessages } from './smart-link-changeboard';
26
27
  export { findReplaceMessages } from './find-replace';
27
28
  export { elementInsertSidePanel } from './element-insert-side-panel';
28
29
  export { textColorMessages } from './text-color';
@@ -0,0 +1,22 @@
1
+ export declare const smartLinkChangeboardMessages: {
2
+ headline: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ gifAlt: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ description: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
17
+ dismiss: {
18
+ id: string;
19
+ defaultMessage: string;
20
+ description: string;
21
+ };
22
+ };
@@ -1,5 +1,6 @@
1
1
  export type EditorUGCTokens = {
2
2
  'editor.font.body': string;
3
+ 'editor.font.body.small'?: string;
3
4
  'editor.font.heading.h1': string;
4
5
  'editor.font.heading.h2': string;
5
6
  'editor.font.heading.h3': string;
@@ -1,13 +1,6 @@
1
1
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
2
  import type { PopupPosition as Position } from '../ui';
3
3
  export declare const calculateToolbarPositionAboveSelection: (toolbarTitle: string) => (editorView: EditorView, nextPos: Position) => Position;
4
- export declare const calculateToolbarPositionTrackHeadOld: (toolbarTitle: string) => (editorView: EditorView, nextPos: Position) => Position;
5
- /**
6
- * Same logic as calculateToolbarPositionTrackHeadOld, but with the following changes:
7
- * - Uses a cached container to avoid repeated DOM traversal and getComputedStyle calls
8
- * - Works when editor is nested within a fixed positioned parent, such as within a modal or sidebar
9
- */
10
- export declare const calculateToolbarPositionTrackHeadNew: (toolbarTitle: string) => (editorView: EditorView, nextPos: Position) => Position;
11
4
  export declare const calculateToolbarPositionTrackHead: (toolbarTitle: string) => (editorView: EditorView, nextPos: Position) => Position;
12
5
  export type CoordsAtPos = {
13
6
  bottom: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "112.4.3",
3
+ "version": "112.5.0",
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/"
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@atlaskit/activity-provider": "^2.5.0",
33
- "@atlaskit/adf-schema": "^52.3.0",
33
+ "@atlaskit/adf-schema": "^52.4.0",
34
34
  "@atlaskit/adf-utils": "^19.27.0",
35
35
  "@atlaskit/afm-i18n-platform-editor-editor-common": "2.18.0",
36
36
  "@atlaskit/analytics-listeners": "^10.0.0",
@@ -82,7 +82,7 @@
82
82
  "@atlaskit/task-decision": "^19.3.0",
83
83
  "@atlaskit/textfield": "^8.2.0",
84
84
  "@atlaskit/theme": "^22.0.0",
85
- "@atlaskit/tmp-editor-statsig": "^40.2.0",
85
+ "@atlaskit/tmp-editor-statsig": "^40.3.0",
86
86
  "@atlaskit/tokens": "^11.1.0",
87
87
  "@atlaskit/tooltip": "^20.14.0",
88
88
  "@atlaskit/width-detector": "^5.0.0",