@atlaskit/editor-plugin-block-menu 10.1.15 → 11.0.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 (74) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/blockMenuPlugin/package.json +1 -8
  3. package/blockMenuPluginType/package.json +1 -8
  4. package/package.json +20 -28
  5. package/types/package.json +1 -8
  6. package/dist/types-ts4.5/blockMenuPlugin.d.ts +0 -2
  7. package/dist/types-ts4.5/blockMenuPluginType.d.ts +0 -125
  8. package/dist/types-ts4.5/editor-actions/index.d.ts +0 -52
  9. package/dist/types-ts4.5/editor-actions/isTransformToTargetDisabled.d.ts +0 -11
  10. package/dist/types-ts4.5/editor-commands/selection.d.ts +0 -10
  11. package/dist/types-ts4.5/editor-commands/transform-node-utils/TRANSFORMATION_MATRIX.d.ts +0 -5
  12. package/dist/types-ts4.5/editor-commands/transform-node-utils/marks.d.ts +0 -9
  13. package/dist/types-ts4.5/editor-commands/transform-node-utils/nodeChecks.d.ts +0 -17
  14. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/applyTargetTextTypeStep.d.ts +0 -23
  15. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/convertEachNodeStep.d.ts +0 -2
  16. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/decisionListToListStep.d.ts +0 -30
  17. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/flattenListStep.d.ts +0 -29
  18. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/flattenStep.d.ts +0 -2
  19. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/listToDecisionListStep.d.ts +0 -25
  20. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/listToListStep.d.ts +0 -65
  21. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/mergeNeighbourListsStep.d.ts +0 -32
  22. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/unwrapExpandStep.d.ts +0 -13
  23. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/unwrapLayoutStep.d.ts +0 -14
  24. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/unwrapListStep.d.ts +0 -25
  25. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/unwrapStep.d.ts +0 -2
  26. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/wrapBlockquoteToDecisionListStep.d.ts +0 -15
  27. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/wrapIntoListStep.d.ts +0 -9
  28. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/wrapMixedContentStep.d.ts +0 -39
  29. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/wrapStep.d.ts +0 -10
  30. package/dist/types-ts4.5/editor-commands/transform-node-utils/transform.d.ts +0 -29
  31. package/dist/types-ts4.5/editor-commands/transform-node-utils/types.d.ts +0 -14
  32. package/dist/types-ts4.5/editor-commands/transform-node-utils/utils.d.ts +0 -39
  33. package/dist/types-ts4.5/editor-commands/transformNode.d.ts +0 -5
  34. package/dist/types-ts4.5/editor-commands/types.d.ts +0 -8
  35. package/dist/types-ts4.5/entry-points/blockMenuPlugin.d.ts +0 -1
  36. package/dist/types-ts4.5/entry-points/blockMenuPluginType.d.ts +0 -1
  37. package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
  38. package/dist/types-ts4.5/index.d.ts +0 -3
  39. package/dist/types-ts4.5/pm-plugins/experiences/block-menu-experiences.d.ts +0 -10
  40. package/dist/types-ts4.5/pm-plugins/experiences/experience-check-utils.d.ts +0 -65
  41. package/dist/types-ts4.5/pm-plugins/keymap.d.ts +0 -4
  42. package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -10
  43. package/dist/types-ts4.5/pm-plugins/utils/shouldSuppressKeyboardEvent.d.ts +0 -14
  44. package/dist/types-ts4.5/ui/MenuSection.d.ts +0 -9
  45. package/dist/types-ts4.5/ui/block-menu-components.d.ts +0 -6
  46. package/dist/types-ts4.5/ui/block-menu-provider.d.ts +0 -24
  47. package/dist/types-ts4.5/ui/block-menu-renderer/BlockMenuComponent.d.ts +0 -11
  48. package/dist/types-ts4.5/ui/block-menu-renderer/BlockMenuComponents.d.ts +0 -12
  49. package/dist/types-ts4.5/ui/block-menu-renderer/BlockMenuRenderer.d.ts +0 -12
  50. package/dist/types-ts4.5/ui/block-menu-renderer/fallbacks.d.ts +0 -2
  51. package/dist/types-ts4.5/ui/block-menu-renderer/types.d.ts +0 -27
  52. package/dist/types-ts4.5/ui/block-menu-renderer/utils.d.ts +0 -36
  53. package/dist/types-ts4.5/ui/block-menu.d.ts +0 -16
  54. package/dist/types-ts4.5/ui/consts.d.ts +0 -11
  55. package/dist/types-ts4.5/ui/copy-link.d.ts +0 -12
  56. package/dist/types-ts4.5/ui/copy-section.d.ts +0 -4
  57. package/dist/types-ts4.5/ui/delete-button.d.ts +0 -11
  58. package/dist/types-ts4.5/ui/delete-section.d.ts +0 -4
  59. package/dist/types-ts4.5/ui/flag.d.ts +0 -8
  60. package/dist/types-ts4.5/ui/format-menu-nested.d.ts +0 -7
  61. package/dist/types-ts4.5/ui/format-menu-section.d.ts +0 -7
  62. package/dist/types-ts4.5/ui/hooks/useSuggestedItems.d.ts +0 -3
  63. package/dist/types-ts4.5/ui/move-down.d.ts +0 -11
  64. package/dist/types-ts4.5/ui/move-up.d.ts +0 -11
  65. package/dist/types-ts4.5/ui/suggested-items-menu-section.d.ts +0 -9
  66. package/dist/types-ts4.5/ui/suggested-menu-items.d.ts +0 -8
  67. package/dist/types-ts4.5/ui/utils/checkHasPreviousSectionContent.d.ts +0 -26
  68. package/dist/types-ts4.5/ui/utils/checkIsFormatMenuHidden.d.ts +0 -3
  69. package/dist/types-ts4.5/ui/utils/copyLink.d.ts +0 -8
  70. package/dist/types-ts4.5/ui/utils/createMenuItemsMap.d.ts +0 -6
  71. package/dist/types-ts4.5/ui/utils/fixBlockMenuPositionAndScroll.d.ts +0 -1
  72. package/dist/types-ts4.5/ui/utils/getSuggestedItemsFromSelection.d.ts +0 -6
  73. package/dist/types-ts4.5/ui/utils/isNestedNode.d.ts +0 -14
  74. package/dist/types-ts4.5/ui/utils/suggested-items-rank.d.ts +0 -46
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { BlockMenuPlugin } from '../blockMenuPluginType';
4
- type SuggestedItemsMenuSectionProps = {
5
- api: ExtractInjectionAPI<BlockMenuPlugin> | undefined;
6
- children?: React.ReactNode;
7
- };
8
- export declare const SuggestedItemsMenuSection: React.NamedExoticComponent<SuggestedItemsMenuSectionProps>;
9
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { BlockMenuPlugin } from '../blockMenuPluginType';
4
- type SuggestedMenuItemsProps = {
5
- api: ExtractInjectionAPI<BlockMenuPlugin> | undefined;
6
- };
7
- export declare const SuggestedMenuItems: React.NamedExoticComponent<SuggestedMenuItemsProps>;
8
- export {};
@@ -1,26 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { BlockMenuPlugin } from '../../blockMenuPluginType';
3
- /**
4
- * Checks if the Suggested section has any visible content
5
- */
6
- export declare const hasSuggestedSectionContent: (api: ExtractInjectionAPI<BlockMenuPlugin> | undefined) => boolean;
7
- /**
8
- * Checks if the Create section has any visible content
9
- */
10
- export declare const hasCreateSectionContent: (api: ExtractInjectionAPI<BlockMenuPlugin> | undefined) => boolean;
11
- /**
12
- * Checks if the Structure section has any visible content
13
- */
14
- export declare const hasStructureSectionContent: (api: ExtractInjectionAPI<BlockMenuPlugin> | undefined) => boolean;
15
- /**
16
- * Checks if there's any content before the Create section (i.e., Suggested section has content)
17
- */
18
- export declare const hasContentBeforeCreate: (api: ExtractInjectionAPI<BlockMenuPlugin> | undefined) => boolean;
19
- /**
20
- * Checks if there's any content before the Structure section (i.e., Create or Suggested sections have content)
21
- */
22
- export declare const hasContentBeforeStructure: (api: ExtractInjectionAPI<BlockMenuPlugin> | undefined) => boolean;
23
- /**
24
- * Checks if there's any content before the Headings section (i.e., Structure, Create, or Suggested sections have content)
25
- */
26
- export declare const hasContentBeforeHeadings: (api: ExtractInjectionAPI<BlockMenuPlugin> | undefined) => boolean;
@@ -1,3 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { BlockMenuPlugin } from '../../blockMenuPluginType';
3
- export declare const checkIsFormatMenuHidden: (api: ExtractInjectionAPI<BlockMenuPlugin> | undefined) => boolean;
@@ -1,8 +0,0 @@
1
- import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
- type CopyLinkOptions = {
3
- blockLinkHashPrefix?: string;
4
- getLinkPath?: () => string | null;
5
- selection: Selection;
6
- };
7
- export declare const copyLink: ({ getLinkPath, blockLinkHashPrefix, selection, }: CopyLinkOptions) => Promise<boolean>;
8
- export {};
@@ -1,6 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { BlockMenuPlugin, RegisterBlockMenuItem } from '../../blockMenuPluginType';
3
- /**
4
- * Helper function to create menu items map from block menu components.
5
- */
6
- export declare const createMenuItemsMap: (blockMenuComponents: ReturnType<ExtractInjectionAPI<BlockMenuPlugin>["blockMenu"]["actions"]["getBlockMenuComponents"]> | undefined) => Map<string, RegisterBlockMenuItem>;
@@ -1 +0,0 @@
1
- export declare const fixBlockMenuPositionAndScroll: (firstSelectedNode: Element | undefined) => void;
@@ -1,6 +0,0 @@
1
- import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
- import type { RegisterBlockMenuItem } from '../../blockMenuPluginType';
3
- /**
4
- * Pure function to calculate suggested items based on selection and menu components.
5
- */
6
- export declare const getSuggestedItemsFromSelection: (menuItemsMap: Map<string, RegisterBlockMenuItem>, currentSelection: Selection | null | undefined) => RegisterBlockMenuItem[];
@@ -1,14 +0,0 @@
1
- import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
- /**
3
- * Determines if a node is nested (not at top-level) based on its depth and context.
4
- *
5
- * Simple rules:
6
- * - Depth 0-1: Always top-level (not nested)
7
- * - Depth 2: Top-level for blockquotes and task lists
8
- * - Depth 3: Top-level for list items only
9
- * - Depth 4+: Always nested
10
- *
11
- * @param selection - The current ProseMirror selection
12
- * @returns true if nested, false if top-level
13
- */
14
- export declare const isNestedNode: (selection: Selection | undefined, menuTriggerBy: string) => boolean;
@@ -1,46 +0,0 @@
1
- /**
2
- * Suggested transformations mapping for each block type.
3
- * Based on the Block Menu Compatibility Matrix:
4
- * https://hello.atlassian.net/wiki/spaces/egcuc/pages/5868774224/Block+Menu+Compatibility+Matrix#Suggested-for-each-block-type
5
- *
6
- * This mapping defines which transform items should appear in the TRANSFORM_SUGGESTED_MENU_SECTION
7
- * for each block type, ranked by priority (lower rank = higher priority).
8
- *
9
- * Structure:
10
- * {
11
- * [sourceNodeType]: {
12
- * [targetMenuItemKey]: rank
13
- * }
14
- * }
15
- */
16
- import type { NodeTypeName } from '../../editor-commands/transform-node-utils/types';
17
- export declare const BLOCK_MENU_NODE_TYPES: {
18
- readonly PARAGRAPH: NodeTypeName;
19
- readonly EXPAND: NodeTypeName;
20
- readonly BLOCKQUOTE: NodeTypeName;
21
- readonly LAYOUT_SECTION: NodeTypeName;
22
- readonly PANEL: NodeTypeName;
23
- readonly CODE_BLOCK: NodeTypeName;
24
- readonly DECISION: NodeTypeName;
25
- readonly BULLET_LIST: NodeTypeName;
26
- readonly ORDERED_LIST: NodeTypeName;
27
- readonly HEADING: NodeTypeName;
28
- readonly TASK_LIST: NodeTypeName;
29
- readonly MEDIA_SINGLE: NodeTypeName;
30
- readonly EXTENSION: NodeTypeName;
31
- readonly BODIED_EXTENSION: NodeTypeName;
32
- readonly BLOCK_CARD: NodeTypeName;
33
- readonly EMBED_CARD: NodeTypeName;
34
- readonly TABLE: NodeTypeName;
35
- };
36
- export type BlockMenuNodeType = (typeof BLOCK_MENU_NODE_TYPES)[keyof typeof BLOCK_MENU_NODE_TYPES];
37
- export type SuggestedItemsRankMap = {
38
- [nodeType: string]: {
39
- [menuItemKey: string]: number;
40
- };
41
- };
42
- export declare const TRANSFORM_SUGGESTED_ITEMS_RANK: SuggestedItemsRankMap;
43
- export declare const getSuggestedItemsForNodeType: (nodeType: string) => {
44
- [menuItemKey: string]: number;
45
- } | undefined;
46
- export declare const getSortedSuggestedItems: (nodeType: string) => string[];