@atlaskit/editor-core 203.16.5 → 203.17.2

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 (70) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/afm-cc/tsconfig.json +6 -0
  3. package/afm-jira/tsconfig.json +6 -0
  4. package/afm-post-office/tsconfig.json +6 -0
  5. package/dist/cjs/composable-editor/core-editor.js +5 -2
  6. package/dist/cjs/composable-editor/core-performance-metrics.js +109 -0
  7. package/dist/cjs/index.js +13 -0
  8. package/dist/cjs/ui/Addon/ClickAreaBlock/contentComponentWrapper.js +22 -0
  9. package/dist/cjs/ui/Addon/click-area-helper.js +5 -3
  10. package/dist/cjs/ui/Appearance/Comment/Comment.js +3 -2
  11. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +3 -2
  12. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +28 -4
  13. package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +11 -1
  14. package/dist/cjs/ui/ContentStyles/extension.js +1 -1
  15. package/dist/cjs/ui/Toolbar/ToolbarPortal.compiled.css +3 -0
  16. package/dist/cjs/ui/Toolbar/ToolbarPortal.js +48 -0
  17. package/dist/cjs/version-wrapper.js +1 -1
  18. package/dist/es2019/composable-editor/core-editor.js +6 -3
  19. package/dist/es2019/composable-editor/core-performance-metrics.js +92 -0
  20. package/dist/es2019/index.js +1 -0
  21. package/dist/es2019/ui/Addon/ClickAreaBlock/contentComponentWrapper.js +15 -0
  22. package/dist/es2019/ui/Addon/click-area-helper.js +5 -2
  23. package/dist/es2019/ui/Appearance/Comment/Comment.js +3 -2
  24. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +3 -2
  25. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +27 -2
  26. package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +11 -1
  27. package/dist/es2019/ui/ContentStyles/extension.js +5 -0
  28. package/dist/es2019/ui/Toolbar/ToolbarPortal.compiled.css +3 -0
  29. package/dist/es2019/ui/Toolbar/ToolbarPortal.js +40 -0
  30. package/dist/es2019/version-wrapper.js +1 -1
  31. package/dist/esm/composable-editor/core-editor.js +6 -3
  32. package/dist/esm/composable-editor/core-performance-metrics.js +101 -0
  33. package/dist/esm/index.js +1 -0
  34. package/dist/esm/ui/Addon/ClickAreaBlock/contentComponentWrapper.js +15 -0
  35. package/dist/esm/ui/Addon/click-area-helper.js +5 -2
  36. package/dist/esm/ui/Appearance/Comment/Comment.js +3 -2
  37. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +3 -2
  38. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +28 -4
  39. package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +11 -1
  40. package/dist/esm/ui/ContentStyles/extension.js +1 -1
  41. package/dist/esm/ui/Toolbar/ToolbarPortal.compiled.css +3 -0
  42. package/dist/esm/ui/Toolbar/ToolbarPortal.js +41 -0
  43. package/dist/esm/version-wrapper.js +1 -1
  44. package/dist/types/composable-editor/core-performance-metrics.d.ts +4 -0
  45. package/dist/types/create-editor/create-universal-preset.d.ts +52 -6
  46. package/dist/types/index.d.ts +1 -0
  47. package/dist/types/presets/universal.d.ts +52 -6
  48. package/dist/types/presets/useUniversalPreset.d.ts +52 -6
  49. package/dist/types/ui/Addon/ClickAreaBlock/contentComponentWrapper.d.ts +6 -0
  50. package/dist/types/ui/Addon/click-area-helper.d.ts +1 -0
  51. package/dist/types/ui/Toolbar/ToolbarPortal.d.ts +21 -0
  52. package/dist/types-ts4.5/composable-editor/core-performance-metrics.d.ts +4 -0
  53. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +56 -6
  54. package/dist/types-ts4.5/index.d.ts +1 -0
  55. package/dist/types-ts4.5/presets/universal.d.ts +56 -6
  56. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +56 -6
  57. package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/contentComponentWrapper.d.ts +6 -0
  58. package/dist/types-ts4.5/ui/Addon/click-area-helper.d.ts +1 -0
  59. package/dist/types-ts4.5/ui/Toolbar/ToolbarPortal.d.ts +21 -0
  60. package/package.json +33 -11
  61. package/dist/cjs/ui/Addon/ClickAreaInline/index.js +0 -41
  62. package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +0 -105
  63. package/dist/es2019/ui/Addon/ClickAreaInline/index.js +0 -34
  64. package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +0 -85
  65. package/dist/esm/ui/Addon/ClickAreaInline/index.js +0 -33
  66. package/dist/esm/ui/Addon/ClickAreaMobile/index.js +0 -103
  67. package/dist/types/ui/Addon/ClickAreaInline/index.d.ts +0 -13
  68. package/dist/types/ui/Addon/ClickAreaMobile/index.d.ts +0 -34
  69. package/dist/types-ts4.5/ui/Addon/ClickAreaInline/index.d.ts +0 -13
  70. package/dist/types-ts4.5/ui/Addon/ClickAreaMobile/index.d.ts +0 -34
@@ -605,7 +605,18 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
605
605
  commands: {
606
606
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
607
607
  };
608
- }, undefined>>
608
+ }, undefined>>,
609
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
610
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
611
+ actions: {
612
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
613
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
614
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
615
+ };
616
+ sharedState: {
617
+ contents: import("react").ReactNode[] | undefined;
618
+ } | undefined;
619
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>
609
620
  ];
610
621
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
611
622
  actions: {
@@ -667,7 +678,18 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
667
678
  commands: {
668
679
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
669
680
  };
670
- }, undefined>>
681
+ }, undefined>>,
682
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
683
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
684
+ actions: {
685
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
686
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
687
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
688
+ };
689
+ sharedState: {
690
+ contents: import("react").ReactNode[] | undefined;
691
+ } | undefined;
692
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>
671
693
  ];
672
694
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
673
695
  actions: {
@@ -881,7 +903,18 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
881
903
  commands: {
882
904
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
883
905
  };
884
- }, undefined>>
906
+ }, undefined>>,
907
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
908
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
909
+ actions: {
910
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
911
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
912
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
913
+ };
914
+ sharedState: {
915
+ contents: import("react").ReactNode[] | undefined;
916
+ } | undefined;
917
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>
885
918
  ];
886
919
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
887
920
  actions: {
@@ -912,7 +945,10 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
912
945
  };
913
946
  }, import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined>,
914
947
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
915
- sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginState | undefined;
948
+ sharedState: import("packages/editor/editor-plugin-history/dist/types/historyPluginType").HistoryPluginSharedState | undefined;
949
+ commands: {
950
+ updatePluginState: import("@atlaskit/editor-common/types").EditorCommand;
951
+ };
916
952
  }, undefined>,
917
953
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"primaryToolbar", {
918
954
  sharedState: import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginState | undefined;
@@ -935,7 +971,10 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
935
971
  };
936
972
  }, undefined>,
937
973
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
938
- sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginState | undefined;
974
+ sharedState: import("packages/editor/editor-plugin-history/dist/types/historyPluginType").HistoryPluginSharedState | undefined;
975
+ commands: {
976
+ updatePluginState: import("@atlaskit/editor-common/types").EditorCommand;
977
+ };
939
978
  }, undefined> | undefined,
940
979
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
941
980
  pluginConfiguration: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined;
@@ -964,7 +1003,18 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
964
1003
  commands: {
965
1004
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
966
1005
  };
967
- }, undefined>>
1006
+ }, undefined>>,
1007
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
1008
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
1009
+ actions: {
1010
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
1011
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
1012
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
1013
+ };
1014
+ sharedState: {
1015
+ contents: import("react").ReactNode[] | undefined;
1016
+ } | undefined;
1017
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>
968
1018
  ];
969
1019
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
970
1020
  actions: {
@@ -15,6 +15,7 @@ export { default as WithEditorActions } from './ui/WithEditorActions';
15
15
  */
16
16
  export { default as WithHelpTrigger } from './ui/WithHelpTrigger';
17
17
  export { default as CollapsedEditor } from './ui/CollapsedEditor';
18
+ export { ToolbarPortalContextProvider, useToolbarPortal } from './ui/Toolbar/ToolbarPortal';
18
19
  export { default as ToolbarHelp } from './ui/ToolbarHelp';
19
20
  export {
20
21
  /**
@@ -657,7 +657,18 @@ export default function createUniversalPresetInternal({ appearance, props, featu
657
657
  commands: {
658
658
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
659
659
  };
660
- }, undefined>>
660
+ }, undefined>>,
661
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
662
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
663
+ actions: {
664
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
665
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
666
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
667
+ };
668
+ sharedState: {
669
+ contents: import("react").ReactNode[] | undefined;
670
+ } | undefined;
671
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>
661
672
  ];
662
673
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
663
674
  actions: {
@@ -719,7 +730,18 @@ export default function createUniversalPresetInternal({ appearance, props, featu
719
730
  commands: {
720
731
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
721
732
  };
722
- }, undefined>>
733
+ }, undefined>>,
734
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
735
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
736
+ actions: {
737
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
738
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
739
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
740
+ };
741
+ sharedState: {
742
+ contents: import("react").ReactNode[] | undefined;
743
+ } | undefined;
744
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>
723
745
  ];
724
746
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
725
747
  actions: {
@@ -933,7 +955,18 @@ export default function createUniversalPresetInternal({ appearance, props, featu
933
955
  commands: {
934
956
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
935
957
  };
936
- }, undefined>>
958
+ }, undefined>>,
959
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
960
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
961
+ actions: {
962
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
963
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
964
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
965
+ };
966
+ sharedState: {
967
+ contents: import("react").ReactNode[] | undefined;
968
+ } | undefined;
969
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>
937
970
  ];
938
971
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
939
972
  actions: {
@@ -964,7 +997,10 @@ export default function createUniversalPresetInternal({ appearance, props, featu
964
997
  };
965
998
  }, import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined>,
966
999
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
967
- sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginState | undefined;
1000
+ sharedState: import("packages/editor/editor-plugin-history/dist/types/historyPluginType").HistoryPluginSharedState | undefined;
1001
+ commands: {
1002
+ updatePluginState: import("@atlaskit/editor-common/types").EditorCommand;
1003
+ };
968
1004
  }, undefined>,
969
1005
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"primaryToolbar", {
970
1006
  sharedState: import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginState | undefined;
@@ -987,7 +1023,10 @@ export default function createUniversalPresetInternal({ appearance, props, featu
987
1023
  };
988
1024
  }, undefined>,
989
1025
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
990
- sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginState | undefined;
1026
+ sharedState: import("packages/editor/editor-plugin-history/dist/types/historyPluginType").HistoryPluginSharedState | undefined;
1027
+ commands: {
1028
+ updatePluginState: import("@atlaskit/editor-common/types").EditorCommand;
1029
+ };
991
1030
  }, undefined> | undefined,
992
1031
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
993
1032
  pluginConfiguration: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined;
@@ -1016,7 +1055,18 @@ export default function createUniversalPresetInternal({ appearance, props, featu
1016
1055
  commands: {
1017
1056
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
1018
1057
  };
1019
- }, undefined>>
1058
+ }, undefined>>,
1059
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
1060
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
1061
+ actions: {
1062
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
1063
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
1064
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
1065
+ };
1066
+ sharedState: {
1067
+ contents: import("react").ReactNode[] | undefined;
1068
+ } | undefined;
1069
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>
1020
1070
  ];
1021
1071
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
1022
1072
  actions: {
@@ -605,7 +605,18 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
605
605
  commands: {
606
606
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
607
607
  };
608
- }, undefined>>
608
+ }, undefined>>,
609
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
610
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
611
+ actions: {
612
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
613
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
614
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
615
+ };
616
+ sharedState: {
617
+ contents: import("react").ReactNode[] | undefined;
618
+ } | undefined;
619
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>
609
620
  ];
610
621
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
611
622
  actions: {
@@ -667,7 +678,18 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
667
678
  commands: {
668
679
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
669
680
  };
670
- }, undefined>>
681
+ }, undefined>>,
682
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
683
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
684
+ actions: {
685
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
686
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
687
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
688
+ };
689
+ sharedState: {
690
+ contents: import("react").ReactNode[] | undefined;
691
+ } | undefined;
692
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>
671
693
  ];
672
694
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
673
695
  actions: {
@@ -881,7 +903,18 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
881
903
  commands: {
882
904
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
883
905
  };
884
- }, undefined>>
906
+ }, undefined>>,
907
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
908
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
909
+ actions: {
910
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
911
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
912
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
913
+ };
914
+ sharedState: {
915
+ contents: import("react").ReactNode[] | undefined;
916
+ } | undefined;
917
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>
885
918
  ];
886
919
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
887
920
  actions: {
@@ -912,7 +945,10 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
912
945
  };
913
946
  }, import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined>,
914
947
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
915
- sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginState | undefined;
948
+ sharedState: import("packages/editor/editor-plugin-history/dist/types/historyPluginType").HistoryPluginSharedState | undefined;
949
+ commands: {
950
+ updatePluginState: import("@atlaskit/editor-common/types").EditorCommand;
951
+ };
916
952
  }, undefined>,
917
953
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"primaryToolbar", {
918
954
  sharedState: import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginState | undefined;
@@ -935,7 +971,10 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
935
971
  };
936
972
  }, undefined>,
937
973
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
938
- sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginState | undefined;
974
+ sharedState: import("packages/editor/editor-plugin-history/dist/types/historyPluginType").HistoryPluginSharedState | undefined;
975
+ commands: {
976
+ updatePluginState: import("@atlaskit/editor-common/types").EditorCommand;
977
+ };
939
978
  }, undefined> | undefined,
940
979
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
941
980
  pluginConfiguration: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined;
@@ -964,7 +1003,18 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
964
1003
  commands: {
965
1004
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
966
1005
  };
967
- }, undefined>>
1006
+ }, undefined>>,
1007
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
1008
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
1009
+ actions: {
1010
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
1011
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
1012
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
1013
+ };
1014
+ sharedState: {
1015
+ contents: import("react").ReactNode[] | undefined;
1016
+ } | undefined;
1017
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>
968
1018
  ];
969
1019
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
970
1020
  actions: {
@@ -0,0 +1,6 @@
1
+ import type { ReactComponents } from '../../../types';
2
+ export declare const ignoreAttribute = "data-editor-content-component";
3
+ /**
4
+ * Wraps content components in a data attribute to ignore
5
+ */
6
+ export declare const contentComponentClickWrapper: (reactComponents: ReactComponents | undefined) => ReactComponents | undefined;
@@ -10,4 +10,5 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
10
10
  */
11
11
  export declare const checkForModal: (target: HTMLElement | null) => boolean;
12
12
  declare const clickAreaClickHandler: (view: EditorView, event: React.MouseEvent<HTMLElement>) => false | undefined;
13
+ export declare const outsideProsemirrorEditorClickHandler: (view: EditorView, event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
13
14
  export { clickAreaClickHandler };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ type ToolbarPortalContextValue = {
7
+ Portal: React.ComponentType<{
8
+ children: React.ReactNode;
9
+ }>;
10
+ isActive: boolean;
11
+ };
12
+ export declare const ToolbarPortalContextProvider: ({ children, portal, isActive, }: {
13
+ children: React.ReactNode;
14
+ portal: React.ComponentType<{
15
+ children: React.ReactNode;
16
+ }>;
17
+ isActive: boolean;
18
+ }) => JSX.Element;
19
+ export declare const useToolbarPortal: () => ToolbarPortalContextValue | undefined;
20
+ export declare const ToolbarPortalMountPoint: () => JSX.Element | null;
21
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "203.16.5",
3
+ "version": "203.17.2",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,21 +39,23 @@
39
39
  "dependencies": {
40
40
  "@atlaskit/activity-provider": "^2.5.0",
41
41
  "@atlaskit/adf-schema": "^47.2.1",
42
- "@atlaskit/analytics-namespaced-context": "^6.13.0",
42
+ "@atlaskit/analytics-namespaced-context": "^6.14.0",
43
43
  "@atlaskit/analytics-next": "^10.3.0",
44
44
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
45
45
  "@atlaskit/button": "^20.5.0",
46
- "@atlaskit/editor-common": "^99.14.0",
46
+ "@atlaskit/editor-common": "^99.17.0",
47
47
  "@atlaskit/editor-json-transformer": "^8.23.0",
48
- "@atlaskit/editor-plugin-quick-insert": "1.10.1",
48
+ "@atlaskit/editor-performance-metrics": "1.4.0",
49
+ "@atlaskit/editor-plugin-quick-insert": "1.10.2",
49
50
  "@atlaskit/editor-plugins": "^7.2.0",
50
51
  "@atlaskit/editor-prosemirror": "7.0.0",
51
- "@atlaskit/editor-shared-styles": "^3.2.0",
52
+ "@atlaskit/editor-shared-styles": "^3.3.0",
52
53
  "@atlaskit/emoji": "^67.14.0",
53
54
  "@atlaskit/icon": "^23.9.0",
54
55
  "@atlaskit/media-card": "^78.19.0",
55
56
  "@atlaskit/mention": "^23.11.0",
56
- "@atlaskit/platform-feature-flags": "^1.0.0",
57
+ "@atlaskit/platform-feature-flags": "^1.1.0",
58
+ "@atlaskit/react-ufo": "^2.15.0",
57
59
  "@atlaskit/task-decision": "^17.12.0",
58
60
  "@atlaskit/tmp-editor-statsig": "^2.46.0",
59
61
  "@atlaskit/tokens": "^3.3.0",
@@ -82,14 +84,14 @@
82
84
  "@af/editor-libra": "*",
83
85
  "@af/visual-regression": "*",
84
86
  "@atlaskit/adf-utils": "^19.18.0",
85
- "@atlaskit/analytics-listeners": "^8.14.0",
86
- "@atlaskit/collab-provider": "10.6.1",
87
+ "@atlaskit/analytics-listeners": "^8.15.0",
88
+ "@atlaskit/collab-provider": "10.6.2",
87
89
  "@atlaskit/editor-plugin-annotation": "1.28.1",
88
90
  "@atlaskit/editor-plugin-card": "^4.6.0",
89
91
  "@atlaskit/editor-plugin-list": "^3.10.0",
90
- "@atlaskit/editor-plugin-paste": "^2.2.0",
92
+ "@atlaskit/editor-plugin-paste": "^2.3.0",
91
93
  "@atlaskit/link-provider": "^1.19.0",
92
- "@atlaskit/logo": "^15.2.0",
94
+ "@atlaskit/logo": "^15.3.0",
93
95
  "@atlaskit/media-core": "^34.5.0",
94
96
  "@atlaskit/media-integration-test-helpers": "^3.1.0",
95
97
  "@atlaskit/media-test-helpers": "^34.8.0",
@@ -103,7 +105,7 @@
103
105
  "@atlaskit/visual-regression": "*",
104
106
  "@atlassian/adf-schema-json": "^1.27.0",
105
107
  "@atlassian/feature-flags-test-utils": "*",
106
- "@atlassian/search-provider": "3.0.34",
108
+ "@atlassian/search-provider": "3.0.35",
107
109
  "@emotion/jest": "^11.8.0",
108
110
  "@storybook/addon-knobs": "^6.4.0",
109
111
  "@testing-library/react": "^13.4.0",
@@ -140,6 +142,12 @@
140
142
  }
141
143
  },
142
144
  "platform-feature-flags": {
145
+ "platform_editor_fe--performance_metrics": {
146
+ "type": "boolean"
147
+ },
148
+ "platform_editor_fe--ufo-bridge": {
149
+ "type": "boolean"
150
+ },
143
151
  "annotations_defensive_node_name_calculations": {
144
152
  "type": "boolean",
145
153
  "referenceOnly": "true"
@@ -286,6 +294,9 @@
286
294
  "type": "boolean",
287
295
  "referenceOnly": true
288
296
  },
297
+ "platform_editor_content_component_ignore_click": {
298
+ "type": "boolean"
299
+ },
289
300
  "platform_inline_node_as_valid_annotation_selection": {
290
301
  "type": "boolean",
291
302
  "referenceOnly": true
@@ -435,9 +446,20 @@
435
446
  "type": "boolean",
436
447
  "referenceOnly": true
437
448
  },
449
+ "platform_editor_lcm_toolbar_portals": {
450
+ "type": "boolean"
451
+ },
452
+ "platform_editor_macroid_reset_for_ext_on_paste": {
453
+ "type": "boolean",
454
+ "referenceOnly": true
455
+ },
438
456
  "platform_editor_track_node_types": {
439
457
  "type": "boolean",
440
458
  "referenceOnly": true
459
+ },
460
+ "platform_editor_nested_tables_view_mode_sort": {
461
+ "type": "boolean",
462
+ "referenceOnly": true
441
463
  }
442
464
  },
443
465
  "stricter": {
@@ -1,41 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = exports.ClickAreaInline = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _react2 = require("@emotion/react");
10
- var _commands = require("@atlaskit/editor-common/commands");
11
- /**
12
- * @jsxRuntime classic
13
- * @jsx jsx
14
- */
15
-
16
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
17
-
18
- var clickArea = (0, _react2.css)({
19
- flexGrow: 1
20
- });
21
- var ClickAreaInline = exports.ClickAreaInline = function ClickAreaInline(_ref) {
22
- var editorView = _ref.editorView,
23
- children = _ref.children;
24
- var handleMouseDown = _react.default.useCallback(function (event) {
25
- if (!editorView) {
26
- return;
27
- }
28
- if ((0, _commands.createParagraphAtEnd)()(editorView.state, editorView.dispatch)) {
29
- editorView.focus();
30
- event.stopPropagation();
31
- }
32
- }, [editorView]);
33
-
34
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
35
- return (0, _react2.jsx)("div", {
36
- "data-testid": "click-wrapper",
37
- css: clickArea,
38
- onMouseDown: handleMouseDown
39
- });
40
- };
41
- var _default = exports.default = ClickAreaInline;
@@ -1,105 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
11
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
12
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
- var _react = _interopRequireDefault(require("react"));
15
- var _react2 = require("@emotion/react");
16
- var _clickAreaHelper = require("../click-area-helper");
17
- function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
18
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
19
- * @jsxRuntime classic
20
- * @jsx jsx
21
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
- /**
23
- * Fills the visible viewport height so that it can filter
24
- * clicks/taps within or below the content (e.g. if the content
25
- * doesn't exceed the viewport, or whether it overflows it).
26
- */
27
- var clickWrapper = function clickWrapper(_ref) {
28
- var isExpanded = _ref.isExpanded,
29
- minHeight = _ref.minHeight;
30
- return (0, _react2.css)({
31
- height: '100%'
32
- },
33
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
34
- isExpanded && minHeight ? "min-height: ".concat(minHeight, "px") : '');
35
- };
36
- /**
37
- * Click Area is responsible for improving UX by ensuring the user
38
- * can always tap beneath the content area, to insert more content.
39
- *
40
- * This is achieved by inserting a new empty paragraph at the end of
41
- * the document (if one doesn't already exist).
42
- *
43
- * This is particularly important when the content exceeds the visible
44
- * viewport height, and if the last content node captures text selection
45
- * e.g. table, layouts, codeblock, etc.
46
- *
47
- * This relies on the Scroll Gutter plugin which inserts additional
48
- * whitespace at the end of the document when it overflows the viewport.
49
- */
50
- // Ignored via go/ees005
51
- // eslint-disable-next-line @repo/internal/react/no-class-components
52
- var ClickAreaMobile = exports.default = /*#__PURE__*/function (_React$Component) {
53
- function ClickAreaMobile() {
54
- var _this;
55
- (0, _classCallCheck2.default)(this, ClickAreaMobile);
56
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
57
- args[_key] = arguments[_key];
58
- }
59
- _this = _callSuper(this, ClickAreaMobile, [].concat(args));
60
- (0, _defineProperty2.default)(_this, "clickElementRef", /*#__PURE__*/_react.default.createRef());
61
- (0, _defineProperty2.default)(_this, "handleClick", function (event) {
62
- var _this$props = _this.props,
63
- view = _this$props.editorView,
64
- editorDisabled = _this$props.editorDisabled;
65
- if (!view) {
66
- return;
67
- }
68
- if (!editorDisabled) {
69
- // if the editor is disabled -- we don't want to intercept any click events
70
- (0, _clickAreaHelper.clickAreaClickHandler)(view, event);
71
- }
72
- var scrollGutterClicked = event.clientY > view.dom.getBoundingClientRect().bottom;
73
- // Reset the default prosemirror scrollIntoView logic by
74
- // clamping the scroll position to the bottom of the viewport.
75
- if (scrollGutterClicked) {
76
- event.preventDefault();
77
- if (_this.clickElementRef.current) {
78
- _this.clickElementRef.current.scrollIntoView(false);
79
- }
80
- }
81
- });
82
- return _this;
83
- }
84
- (0, _inherits2.default)(ClickAreaMobile, _React$Component);
85
- return (0, _createClass2.default)(ClickAreaMobile, [{
86
- key: "render",
87
- value: function render() {
88
- return (
89
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
90
- (0, _react2.jsx)("div", {
91
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
92
- css: clickWrapper({
93
- isExpanded: this.props.isExpanded,
94
- minHeight: this.props.minHeight
95
- })
96
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
97
- ,
98
- className: "editor-click-wrapper",
99
- onClick: this.handleClick,
100
- ref: this.clickElementRef
101
- }, this.props.children)
102
- );
103
- }
104
- }]);
105
- }(_react.default.Component);