@atlaskit/editor-plugin-highlight 11.0.15 → 11.0.17

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 (28) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/highlightPlugin/package.json +1 -8
  3. package/highlightPluginType/package.json +1 -8
  4. package/main/package.json +1 -8
  5. package/package.json +2 -2
  6. package/dist/types-ts4.5/editor-commands/change-color.d.ts +0 -6
  7. package/dist/types-ts4.5/editor-commands/color.d.ts +0 -2
  8. package/dist/types-ts4.5/editor-commands/disabled.d.ts +0 -2
  9. package/dist/types-ts4.5/editor-commands/palette.d.ts +0 -10
  10. package/dist/types-ts4.5/entry-points/highlightPlugin.d.ts +0 -1
  11. package/dist/types-ts4.5/entry-points/highlightPluginType.d.ts +0 -1
  12. package/dist/types-ts4.5/entry-points/main.d.ts +0 -1
  13. package/dist/types-ts4.5/highlightPlugin.d.ts +0 -2
  14. package/dist/types-ts4.5/highlightPluginType.d.ts +0 -26
  15. package/dist/types-ts4.5/index.d.ts +0 -3
  16. package/dist/types-ts4.5/pm-plugins/highlight-padding/add-padding-decorations.d.ts +0 -14
  17. package/dist/types-ts4.5/pm-plugins/highlight-padding/index.d.ts +0 -16
  18. package/dist/types-ts4.5/pm-plugins/highlight-padding/update-padding-decorations.d.ts +0 -13
  19. package/dist/types-ts4.5/pm-plugins/highlight-padding/utils.d.ts +0 -14
  20. package/dist/types-ts4.5/pm-plugins/keymap.d.ts +0 -6
  21. package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -18
  22. package/dist/types-ts4.5/ui/FloatingToolbarHighlightColor.d.ts +0 -15
  23. package/dist/types-ts4.5/ui/HighlightColorMenuItem.d.ts +0 -13
  24. package/dist/types-ts4.5/ui/PrimaryToolbarHighlightColor.d.ts +0 -18
  25. package/dist/types-ts4.5/ui/shared/EditorHighlightIcon.d.ts +0 -7
  26. package/dist/types-ts4.5/ui/shared/PaletteDropdown.d.ts +0 -14
  27. package/dist/types-ts4.5/ui/shared/useDropdownEvents.d.ts +0 -22
  28. package/dist/types-ts4.5/ui/toolbar-component.d.ts +0 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-highlight
2
2
 
3
+ ## 11.0.17
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 11.0.16
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 11.0.15
4
16
 
5
17
  ### Patch Changes
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/highlightPlugin.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/highlightPlugin.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/highlightPlugin.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/highlightPluginType.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/highlightPluginType.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/highlightPluginType.d.ts"
17
10
  }
package/main/package.json CHANGED
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/main.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/main.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/main.d.ts"
17
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-highlight",
3
- "version": "11.0.15",
3
+ "version": "11.0.17",
4
4
  "description": "Highlight plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -49,7 +49,7 @@
49
49
  "@atlaskit/icon": "^35.4.0",
50
50
  "@atlaskit/platform-feature-flags": "^1.1.0",
51
51
  "@atlaskit/primitives": "^19.0.0",
52
- "@atlaskit/tmp-editor-statsig": "^101.0.0",
52
+ "@atlaskit/tmp-editor-statsig": "^103.0.0",
53
53
  "@atlaskit/tokens": "^13.4.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@emotion/react": "^11.7.1"
@@ -1,6 +0,0 @@
1
- import type { EditorAnalyticsAPI, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { EditorCommand } from '@atlaskit/editor-common/types';
3
- export declare const changeColor: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ color, inputMethod }: {
4
- color: string;
5
- inputMethod: INPUT_METHOD;
6
- }) => EditorCommand;
@@ -1,2 +0,0 @@
1
- import type { ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
2
- export declare const getActiveColor: (tr: Transaction | ReadonlyTransaction) => string | null;
@@ -1,2 +0,0 @@
1
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
- export declare const getDisabledState: (state: EditorState) => boolean;
@@ -1,10 +0,0 @@
1
- import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { Command, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { HighlightPlugin } from '../highlightPluginType';
4
- export declare const togglePalette: (api: ExtractInjectionAPI<HighlightPlugin>) => ({ inputMethod }: {
5
- inputMethod: INPUT_METHOD;
6
- }) => Command;
7
- export declare const setPalette: (api: ExtractInjectionAPI<HighlightPlugin>) => ({ isPaletteOpen, inputMethod, }: {
8
- inputMethod: INPUT_METHOD;
9
- isPaletteOpen: boolean;
10
- }) => Command;
@@ -1 +0,0 @@
1
- export { highlightPlugin } from '../highlightPlugin';
@@ -1 +0,0 @@
1
- export type { HighlightPlugin } from '../highlightPluginType';
@@ -1 +0,0 @@
1
- export type { HighlightPluginState } from '../pm-plugins/main';
@@ -1,2 +0,0 @@
1
- import type { HighlightPlugin } from './highlightPluginType';
2
- export declare const highlightPlugin: HighlightPlugin;
@@ -1,26 +0,0 @@
1
- import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
- import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
5
- import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
6
- import type { TextFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
7
- import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
8
- import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
9
- import type { HighlightPluginState } from './pm-plugins/main';
10
- export type HighlightPlugin = NextEditorPlugin<'highlight', {
11
- commands: {
12
- changeColor: ({ color }: {
13
- color: string;
14
- inputMethod: INPUT_METHOD;
15
- }) => EditorCommand;
16
- };
17
- dependencies: [
18
- OptionalPlugin<AnalyticsPlugin>,
19
- OptionalPlugin<TextFormattingPlugin>,
20
- OptionalPlugin<PrimaryToolbarPlugin>,
21
- OptionalPlugin<ToolbarPlugin>,
22
- OptionalPlugin<SelectionToolbarPlugin>,
23
- OptionalPlugin<UserPreferencesPlugin>
24
- ];
25
- sharedState: HighlightPluginState | undefined;
26
- }>;
@@ -1,3 +0,0 @@
1
- export { highlightPlugin } from './highlightPlugin';
2
- export type { HighlightPlugin } from './highlightPluginType';
3
- export type { HighlightPluginState } from './pm-plugins/main';
@@ -1,14 +0,0 @@
1
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
- import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
3
- type AddPaddingDecorationsOptions = {
4
- decorationSet: DecorationSet;
5
- from: number;
6
- state: EditorState;
7
- to: number;
8
- };
9
- /**
10
- * Adds padding decorations to highlighted text
11
- * within the specified range.
12
- */
13
- export declare const addPaddingDecorations: ({ decorationSet, state, from, to, }: AddPaddingDecorationsOptions) => DecorationSet;
14
- export {};
@@ -1,16 +0,0 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
- import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
4
- type HighlightPaddingPluginState = {
5
- decorationSet: DecorationSet;
6
- };
7
- export declare const highlightPaddingPluginKey: PluginKey;
8
- /**
9
- * Plugin to add padding decorations around highlighted text.
10
- *
11
- * Padding is added to the left and/or right of highlighted text
12
- * only when it is at the start or end of a block, or when it is adjacent
13
- * to whitespace.
14
- */
15
- export declare const createHighlightPaddingPlugin: () => SafePlugin<HighlightPaddingPluginState>;
16
- export {};
@@ -1,13 +0,0 @@
1
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
- import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
3
- type UpdatePaddingDecorationsOptions = {
4
- decorationSet: DecorationSet;
5
- end: number;
6
- start: number;
7
- state: EditorState;
8
- };
9
- /**
10
- * Updates padding decorations in the specified range.
11
- */
12
- export declare const updatePaddingDecorations: ({ decorationSet: prevDecorationSet, state, start, end, }: UpdatePaddingDecorationsOptions) => DecorationSet;
13
- export {};
@@ -1,14 +0,0 @@
1
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
- export declare const isHighlightedTextNode: (node: PMNode) => boolean;
4
- type ShouldPadLeftOptions = {
5
- nodeStart: number;
6
- state: EditorState;
7
- };
8
- export declare const shouldPadLeft: ({ state, nodeStart }: ShouldPadLeftOptions) => boolean;
9
- type ShouldPadRightOptions = {
10
- nodeEnd: number;
11
- state: EditorState;
12
- };
13
- export declare const shouldPadRight: ({ state, nodeEnd }: ShouldPadRightOptions) => boolean;
14
- export {};
@@ -1,6 +0,0 @@
1
- import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { HighlightPlugin } from '../highlightPluginType';
4
- export declare function keymapPlugin({ api }: {
5
- api: ExtractInjectionAPI<HighlightPlugin> | undefined;
6
- }): SafePlugin;
@@ -1,18 +0,0 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
4
- import type { HighlightPlugin } from '../highlightPluginType';
5
- export declare const highlightPluginKey: PluginKey<HighlightPluginState>;
6
- export type HighlightPluginState = {
7
- activeColor: string | null;
8
- disabled: boolean;
9
- isPaletteOpen: boolean;
10
- };
11
- export declare enum HighlightPluginAction {
12
- CHANGE_COLOR = 0,
13
- SET_PALETTE = 1
14
- }
15
- export declare const overrideMarks: string[];
16
- export declare const createPlugin: ({ api, }: {
17
- api: ExtractInjectionAPI<HighlightPlugin> | undefined;
18
- }) => SafePlugin<HighlightPluginState>;
@@ -1,15 +0,0 @@
1
- import type { ComponentType, FC } from 'react';
2
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
3
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
4
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
- import type { HighlightPlugin } from '../highlightPluginType';
7
- type FloatingToolbarHighlightColorProps = {
8
- dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
9
- editorView: EditorView | undefined;
10
- pluginInjectionApi: ExtractInjectionAPI<HighlightPlugin> | undefined;
11
- } & WrappedComponentProps;
12
- export declare const FloatingToolbarHighlightColorWithIntl: FC<WithIntlProps<FloatingToolbarHighlightColorProps>> & {
13
- WrappedComponent: ComponentType<FloatingToolbarHighlightColorProps>;
14
- };
15
- export {};
@@ -1,13 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
6
- import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model';
7
- import type { HighlightPlugin } from '../highlightPluginType';
8
- interface HighlightMenuItemProps {
9
- api: ExtractInjectionAPI<HighlightPlugin> | undefined;
10
- parents: ToolbarComponentTypes;
11
- }
12
- export declare function HighlightColorMenuItem({ api, parents }: HighlightMenuItemProps): JSX.Element;
13
- export {};
@@ -1,18 +0,0 @@
1
- import type { ComponentType, FC } from 'react';
2
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
3
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { HighlightPlugin } from '../highlightPluginType';
6
- type PrimaryToolbarHighlightColorProps = {
7
- disabled: boolean;
8
- editorView: EditorView;
9
- isToolbarReducedSpacing: boolean;
10
- pluginInjectionApi: ExtractInjectionAPI<HighlightPlugin> | undefined;
11
- popupsBoundariesElement?: HTMLElement;
12
- popupsMountPoint?: HTMLElement;
13
- popupsScrollableElement?: HTMLElement;
14
- } & WrappedComponentProps;
15
- export declare const PrimaryToolbarHighlightColorWithIntl: FC<WithIntlProps<PrimaryToolbarHighlightColorProps>> & {
16
- WrappedComponent: ComponentType<PrimaryToolbarHighlightColorProps>;
17
- };
18
- export {};
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- type EditorHighlightIconProps = {
3
- disabled: boolean;
4
- selectedColor?: string | null;
5
- };
6
- export declare const EditorHighlightIcon: ({ disabled, selectedColor, }: EditorHighlightIconProps) => React.JSX.Element;
7
- export {};
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import type { WithOutsideClickProps } from '@atlaskit/editor-common/ui';
3
- type PaletteDropdownProps = {
4
- activeColor: string | null;
5
- isOpen: boolean;
6
- isOpenedByKeyboard: boolean;
7
- onColorChange: (color: string) => void;
8
- popupsBoundariesElement?: HTMLElement;
9
- popupsMountPoint?: HTMLElement;
10
- popupsScrollableElement?: HTMLElement;
11
- trigger: React.ReactElement;
12
- } & WithOutsideClickProps;
13
- export declare const PaletteDropdown: (props: PaletteDropdownProps) => React.JSX.Element;
14
- export {};
@@ -1,22 +0,0 @@
1
- import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { ToolbarButtonRef } from '@atlaskit/editor-common/ui-menu';
4
- import type { HighlightPlugin } from '../../highlightPluginType';
5
- type UseDropdownEventArgs = {
6
- isDropdownOpen: boolean;
7
- pluginInjectionApi: ExtractInjectionAPI<HighlightPlugin> | undefined;
8
- setIsDropdownOpen: (isOpen: boolean) => void;
9
- toolbarItemRef: React.RefObject<ToolbarButtonRef>;
10
- };
11
- export declare const useDropdownEvents: (args: UseDropdownEventArgs) => {
12
- handleClick: () => void;
13
- handleClickOutside: () => void;
14
- handleColorChange: ({ color, inputMethod }: {
15
- color: string;
16
- inputMethod: INPUT_METHOD;
17
- }) => void;
18
- handleEscapeKeydown: () => void;
19
- handleKeyDown: (event: React.KeyboardEvent) => void;
20
- isOpenedByKeyboard: boolean;
21
- };
22
- export {};
@@ -1,4 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
3
- import type { HighlightPlugin } from '../highlightPluginType';
4
- export declare const getToolbarComponent: (api: ExtractInjectionAPI<HighlightPlugin> | undefined) => RegisterComponent[];