@atlaskit/editor-common 108.6.0 → 108.6.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 (79) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/ai-messages/ai-failed-state.js +2 -2
  3. package/dist/cjs/card/LinkToolbarButtonGroup.js +4 -2
  4. package/dist/cjs/card/link-toolbar-button-group-options.js +3 -2
  5. package/dist/cjs/floating-toolbar/DropdownMenuExtensionItems.js +3 -3
  6. package/dist/cjs/hooks/useSharedPluginState.js +1 -1
  7. package/dist/cjs/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +3 -0
  8. package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +42 -2
  9. package/dist/cjs/link/LinkSearch/LinkSearchList.js +66 -2
  10. package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +87 -1
  11. package/dist/cjs/messages/block-menu.js +1 -1
  12. package/dist/cjs/monitoring/error.js +1 -1
  13. package/dist/cjs/preset/core-plugin/index.js +13 -2
  14. package/dist/cjs/safe-plugin/index.js +1 -1
  15. package/dist/cjs/toolbar-flag-check.js +2 -2
  16. package/dist/cjs/ui/DropList/index.js +1 -1
  17. package/dist/cjs/ui/FloatingToolbar/Button.js +4 -4
  18. package/dist/cjs/ui/FloatingToolbar/Separator.js +3 -3
  19. package/dist/es2019/ai-messages/ai-failed-state.js +2 -2
  20. package/dist/es2019/card/LinkToolbarButtonGroup.js +4 -2
  21. package/dist/es2019/card/link-toolbar-button-group-options.js +3 -2
  22. package/dist/es2019/floating-toolbar/DropdownMenuExtensionItems.js +3 -3
  23. package/dist/es2019/hooks/useSharedPluginState.js +1 -1
  24. package/dist/es2019/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +3 -0
  25. package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +42 -2
  26. package/dist/es2019/link/LinkSearch/LinkSearchList.js +58 -1
  27. package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +89 -1
  28. package/dist/es2019/messages/block-menu.js +1 -1
  29. package/dist/es2019/monitoring/error.js +1 -1
  30. package/dist/es2019/preset/core-plugin/index.js +13 -2
  31. package/dist/es2019/safe-plugin/index.js +1 -1
  32. package/dist/es2019/toolbar-flag-check.js +1 -1
  33. package/dist/es2019/ui/DropList/index.js +1 -1
  34. package/dist/es2019/ui/FloatingToolbar/Button.js +4 -4
  35. package/dist/es2019/ui/FloatingToolbar/Separator.js +3 -3
  36. package/dist/esm/ai-messages/ai-failed-state.js +2 -2
  37. package/dist/esm/card/LinkToolbarButtonGroup.js +4 -2
  38. package/dist/esm/card/link-toolbar-button-group-options.js +3 -2
  39. package/dist/esm/floating-toolbar/DropdownMenuExtensionItems.js +3 -3
  40. package/dist/esm/hooks/useSharedPluginState.js +1 -1
  41. package/dist/esm/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +3 -0
  42. package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +42 -2
  43. package/dist/esm/link/LinkSearch/LinkSearchList.js +63 -1
  44. package/dist/esm/link/LinkSearch/LinkSearchListItem.js +87 -1
  45. package/dist/esm/messages/block-menu.js +1 -1
  46. package/dist/esm/monitoring/error.js +1 -1
  47. package/dist/esm/preset/core-plugin/index.js +13 -2
  48. package/dist/esm/safe-plugin/index.js +1 -1
  49. package/dist/esm/toolbar-flag-check.js +2 -2
  50. package/dist/esm/ui/DropList/index.js +1 -1
  51. package/dist/esm/ui/FloatingToolbar/Button.js +4 -4
  52. package/dist/esm/ui/FloatingToolbar/Separator.js +3 -3
  53. package/dist/types/card/LinkToolbarButtonGroup.d.ts +1 -0
  54. package/dist/types/card/link-toolbar-button-group-options.d.ts +1 -1
  55. package/dist/types/floating-toolbar/DropdownMenuExtensionItems.d.ts +1 -0
  56. package/dist/types/hooks/useSharedPluginState.d.ts +1 -1
  57. package/dist/types/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.d.ts +3 -0
  58. package/dist/types/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +3 -0
  59. package/dist/types/link/LinkSearch/LinkSearchList.d.ts +22 -1
  60. package/dist/types/link/LinkSearch/LinkSearchListItem.d.ts +16 -1
  61. package/dist/types/safe-plugin/index.d.ts +1 -1
  62. package/dist/types/toolbar-flag-check.d.ts +1 -1
  63. package/dist/types/types/next-editor-plugin.d.ts +2 -1
  64. package/dist/types/ui/FloatingToolbar/Button.d.ts +2 -1
  65. package/dist/types/ui/FloatingToolbar/Separator.d.ts +2 -1
  66. package/dist/types-ts4.5/card/LinkToolbarButtonGroup.d.ts +1 -0
  67. package/dist/types-ts4.5/card/link-toolbar-button-group-options.d.ts +1 -1
  68. package/dist/types-ts4.5/floating-toolbar/DropdownMenuExtensionItems.d.ts +1 -0
  69. package/dist/types-ts4.5/hooks/useSharedPluginState.d.ts +1 -1
  70. package/dist/types-ts4.5/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.d.ts +3 -0
  71. package/dist/types-ts4.5/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +3 -0
  72. package/dist/types-ts4.5/link/LinkSearch/LinkSearchList.d.ts +22 -1
  73. package/dist/types-ts4.5/link/LinkSearch/LinkSearchListItem.d.ts +16 -1
  74. package/dist/types-ts4.5/safe-plugin/index.d.ts +1 -1
  75. package/dist/types-ts4.5/toolbar-flag-check.d.ts +1 -1
  76. package/dist/types-ts4.5/types/next-editor-plugin.d.ts +2 -1
  77. package/dist/types-ts4.5/ui/FloatingToolbar/Button.d.ts +2 -1
  78. package/dist/types-ts4.5/ui/FloatingToolbar/Separator.d.ts +2 -1
  79. package/package.json +6 -3
@@ -2,7 +2,7 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import React from 'react';
5
+ import React, { type KeyboardEvent } from 'react';
6
6
  import { type SerializedStyles } from '@emotion/react';
7
7
  import type { WrappedComponentProps } from 'react-intl-next';
8
8
  import type { LinkSearchListItemData } from './types';
@@ -10,6 +10,21 @@ export declare const container: SerializedStyles;
10
10
  export declare const containerSelected: SerializedStyles;
11
11
  export declare const nameStyle: SerializedStyles;
12
12
  export declare const containerName: SerializedStyles;
13
+ export interface PropsNext {
14
+ id?: string;
15
+ item: LinkSearchListItemData;
16
+ onFocus?: () => void;
17
+ onKeyDown?: (e: KeyboardEvent<HTMLDivElement>) => void;
18
+ onMouseEnter?: (objectId: string) => void;
19
+ onMouseLeave?: (objectId: string) => void;
20
+ onMouseMove?: (objectId: string) => void;
21
+ onSelect: (href: string, text: string) => void;
22
+ role?: string;
23
+ selected: boolean;
24
+ }
25
+ export declare const ForwardedLinkSearchListItemNextWithIntl: React.ForwardRefExoticComponent<Omit<import("react-intl-next").WithIntlProps<React.PropsWithChildren<PropsNext & WrappedComponentProps & React.RefAttributes<HTMLDivElement>>>, "ref"> & React.RefAttributes<any>> & {
26
+ WrappedComponent: React.ComponentType<PropsNext & WrappedComponentProps & React.RefAttributes<HTMLDivElement>>;
27
+ };
13
28
  export interface Props {
14
29
  id?: string;
15
30
  item: LinkSearchListItemData;
@@ -9,7 +9,7 @@ import type { SafePluginSpec } from '@atlaskit/editor-prosemirror/state';
9
9
  * This function is useful for annotating DOM elements with metadata that describes the type and characteristics of the ProseMirror node.
10
10
  *
11
11
  *
12
- * @param {Object} params - The parameters for the function.
12
+ * @param {object} params - The parameters for the function.
13
13
  * @param {PMNode} params.node - The ProseMirror node from which to derive metadata.
14
14
  * @param {HTMLElement} params.dom - The DOM element to which the metadata attributes will be attached.
15
15
  */
@@ -1 +1 @@
1
- export declare const areToolbarFlagsEnabled: () => boolean;
1
+ export declare const areToolbarFlagsEnabled: (isNewToolbarEnabled?: boolean) => boolean;
@@ -57,9 +57,10 @@ export type CorePlugin = NextEditorPlugin<'core', {
57
57
  * Get the anchor ID for a ProseMirror node.
58
58
  *
59
59
  * @param node - The ProseMirror node to get the anchor ID for.
60
+ * @param pos - The position of the node in the document.
60
61
  * @returns The anchor ID if found, otherwise undefined.
61
62
  */
62
- getAnchorIdForNode: (node: PMNode) => string | undefined;
63
+ getAnchorIdForNode: (node: PMNode, pos: number) => string | undefined;
63
64
  /**
64
65
  * Replaces the current content of the editor with the provided raw value.
65
66
  *
@@ -5,6 +5,7 @@ import type { FloatingToolbarButtonSpotlightConfig } from '../../types/floating-
5
5
  export interface Props {
6
6
  appearance?: ButtonAppearance;
7
7
  areaControls?: string;
8
+ areAnyNewToolbarFlagsEnabled: boolean;
8
9
  ariaHasPopup?: boolean | 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid' | undefined;
9
10
  ariaLabel?: string;
10
11
  children?: React.ReactNode;
@@ -35,5 +36,5 @@ export interface Props {
35
36
  tooltipContent?: TooltipProps['content'];
36
37
  tooltipStyle?: React.ForwardRefExoticComponent<any> | React.ComponentType<any>;
37
38
  }
38
- declare const _default: ({ title, icon, iconAfter, onClick, onKeyDown, onMouseEnter, onMouseLeave, onFocus, onBlur, onMount, onUnmount, selected, disabled, href, target, appearance, children, className, tooltipContent, tooltipStyle, testId, interactionName, hideTooltipOnClick, ariaHasPopup, tabIndex, areaControls, ariaLabel, isRadioButton, pulse, spotlightConfig, }: Props) => React.JSX.Element;
39
+ declare const _default: ({ title, icon, iconAfter, onClick, onKeyDown, onMouseEnter, onMouseLeave, onFocus, onBlur, onMount, onUnmount, selected, disabled, href, target, appearance, children, className, tooltipContent, tooltipStyle, testId, interactionName, hideTooltipOnClick, ariaHasPopup, tabIndex, areaControls, ariaLabel, isRadioButton, pulse, spotlightConfig, areAnyNewToolbarFlagsEnabled, }: Props) => React.JSX.Element;
39
40
  export default _default;
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import { jsx } from '@emotion/react';
6
6
  type SeparatorProps = {
7
+ areAnyNewToolbarFlagsEnabled: boolean;
7
8
  /**
8
9
  * @private
9
10
  * @deprecated
@@ -12,5 +13,5 @@ type SeparatorProps = {
12
13
  */
13
14
  fullHeight?: boolean;
14
15
  };
15
- declare const _default: ({ fullHeight }: SeparatorProps) => jsx.JSX.Element;
16
+ declare const _default: ({ fullHeight, areAnyNewToolbarFlagsEnabled }: SeparatorProps) => jsx.JSX.Element;
16
17
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "108.6.0",
3
+ "version": "108.6.2",
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/"
@@ -170,14 +170,14 @@
170
170
  "@atlaskit/profilecard": "^24.11.0",
171
171
  "@atlaskit/react-ufo": "^4.5.0",
172
172
  "@atlaskit/section-message": "^8.7.0",
173
- "@atlaskit/smart-card": "^40.20.0",
173
+ "@atlaskit/smart-card": "^40.21.0",
174
174
  "@atlaskit/smart-user-picker": "^8.2.0",
175
175
  "@atlaskit/spinner": "^19.0.0",
176
176
  "@atlaskit/status": "^3.0.0",
177
177
  "@atlaskit/task-decision": "^19.2.0",
178
178
  "@atlaskit/textfield": "^8.0.0",
179
179
  "@atlaskit/theme": "^20.0.0",
180
- "@atlaskit/tmp-editor-statsig": "^12.6.0",
180
+ "@atlaskit/tmp-editor-statsig": "^12.8.0",
181
181
  "@atlaskit/tokens": "^6.3.0",
182
182
  "@atlaskit/tooltip": "^20.4.0",
183
183
  "@atlaskit/width-detector": "^5.0.0",
@@ -369,6 +369,9 @@
369
369
  },
370
370
  "platform_editor_resolve_hyperlinks_killswitch": {
371
371
  "type": "boolean"
372
+ },
373
+ "platform_editor_a11y_insert_link_item_focus": {
374
+ "type": "boolean"
372
375
  }
373
376
  }
374
377
  }