@atlaskit/editor-plugin-block-controls 8.6.3 → 8.7.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 (35) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/block-decoration-utils/package.json +17 -0
  3. package/dist/cjs/blockControlsPlugin.js +15 -1
  4. package/dist/cjs/pm-plugins/main.js +56 -29
  5. package/dist/cjs/ui/block-decoration-utils.js +53 -0
  6. package/dist/cjs/ui/consts.js +1 -9
  7. package/dist/es2019/blockControlsPlugin.js +273 -259
  8. package/dist/es2019/pm-plugins/main.js +25 -29
  9. package/dist/es2019/ui/block-decoration-utils.js +9 -0
  10. package/dist/es2019/ui/consts.js +0 -8
  11. package/dist/esm/blockControlsPlugin.js +15 -1
  12. package/dist/esm/pm-plugins/main.js +56 -29
  13. package/dist/esm/ui/block-decoration-utils.js +9 -0
  14. package/dist/esm/ui/consts.js +0 -8
  15. package/dist/types/blockControlsPluginType.d.ts +20 -2
  16. package/dist/types/index.d.ts +1 -1
  17. package/dist/types/pm-plugins/main.d.ts +3 -3
  18. package/dist/types/ui/block-decoration-utils.d.ts +6 -0
  19. package/dist/types/ui/consts.d.ts +0 -8
  20. package/dist/types-ts4.5/blockControlsPluginType.d.ts +20 -2
  21. package/dist/types-ts4.5/index.d.ts +1 -1
  22. package/dist/types-ts4.5/pm-plugins/main.d.ts +3 -3
  23. package/dist/types-ts4.5/ui/block-decoration-utils.d.ts +6 -0
  24. package/dist/types-ts4.5/ui/consts.d.ts +0 -8
  25. package/package.json +6 -3
  26. package/dist/cjs/pm-plugins/decorations-remix-button.js +0 -67
  27. package/dist/cjs/ui/remix-button.js +0 -163
  28. package/dist/es2019/pm-plugins/decorations-remix-button.js +0 -56
  29. package/dist/es2019/ui/remix-button.js +0 -144
  30. package/dist/esm/pm-plugins/decorations-remix-button.js +0 -59
  31. package/dist/esm/ui/remix-button.js +0 -154
  32. package/dist/types/pm-plugins/decorations-remix-button.d.ts +0 -21
  33. package/dist/types/ui/remix-button.d.ts +0 -17
  34. package/dist/types-ts4.5/pm-plugins/decorations-remix-button.d.ts +0 -21
  35. package/dist/types-ts4.5/ui/remix-button.d.ts +0 -17
@@ -1,17 +0,0 @@
1
- import { jsx } from '@emotion/react';
2
- import type { IntlShape } from 'react-intl-next';
3
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { BlockControlsPlugin } from '../blockControlsPluginType';
6
- type RemixButtonProps = {
7
- anchorName: string;
8
- api: ExtractInjectionAPI<BlockControlsPlugin>;
9
- formatMessage: IntlShape['formatMessage'];
10
- getPos: () => number | undefined;
11
- nodeType: string;
12
- rootAnchorName?: string;
13
- rootNodeType: string;
14
- view: EditorView;
15
- };
16
- export declare const RemixButton: ({ view, api, getPos, anchorName, rootAnchorName, rootNodeType, }: RemixButtonProps) => jsx.JSX.Element;
17
- export {};
@@ -1,21 +0,0 @@
1
- import { type IntlShape } from 'react-intl-next';
2
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
3
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
- import { type EditorState } from '@atlaskit/editor-prosemirror/state';
5
- import { Decoration, type DecorationSet } from '@atlaskit/editor-prosemirror/view';
6
- import type { BlockControlsPlugin } from '../blockControlsPluginType';
7
- export declare const findRemixButtonDecoration: (decorations: DecorationSet, from?: number, to?: number) => Decoration[];
8
- type RemixButtonDecorationParams = {
9
- anchorName: string;
10
- api: ExtractInjectionAPI<BlockControlsPlugin>;
11
- editorState: EditorState;
12
- formatMessage: IntlShape['formatMessage'];
13
- nodeType: string;
14
- nodeViewPortalProviderAPI: PortalProviderAPI;
15
- rootAnchorName?: string;
16
- rootNodeType?: string;
17
- rootPos: number;
18
- };
19
- /** Right-edge Remix button: same gutter as left controls (side: -4) but positioned at block right edge. */
20
- export declare const remixButtonDecoration: ({ api, formatMessage, rootPos, anchorName, nodeType, nodeViewPortalProviderAPI, rootAnchorName, rootNodeType, }: RemixButtonDecorationParams) => Decoration;
21
- export {};
@@ -1,17 +0,0 @@
1
- import { jsx } from '@emotion/react';
2
- import type { IntlShape } from 'react-intl-next';
3
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { BlockControlsPlugin } from '../blockControlsPluginType';
6
- type RemixButtonProps = {
7
- anchorName: string;
8
- api: ExtractInjectionAPI<BlockControlsPlugin>;
9
- formatMessage: IntlShape['formatMessage'];
10
- getPos: () => number | undefined;
11
- nodeType: string;
12
- rootAnchorName?: string;
13
- rootNodeType: string;
14
- view: EditorView;
15
- };
16
- export declare const RemixButton: ({ view, api, getPos, anchorName, rootAnchorName, rootNodeType, }: RemixButtonProps) => jsx.JSX.Element;
17
- export {};