@atlaskit/editor-plugin-find-replace 7.1.1 → 8.0.1

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 (37) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/pm-plugins/plugin-factory.js +8 -8
  3. package/dist/cjs/ui/Find.js +3 -2
  4. package/dist/cjs/ui/FindReplace.js +1 -1
  5. package/dist/cjs/ui/FindReplaceDropDownOrToolbarButtonWithState.js +2 -1
  6. package/dist/cjs/ui/FindReplaceDropdown.js +4 -1
  7. package/dist/cjs/ui/FindReplaceToolbarButton.js +3 -2
  8. package/dist/cjs/ui/Replace.js +4 -1
  9. package/dist/es2019/pm-plugins/plugin-factory.js +5 -6
  10. package/dist/es2019/ui/Find.js +4 -1
  11. package/dist/es2019/ui/FindReplace.js +1 -1
  12. package/dist/es2019/ui/FindReplaceDropDownOrToolbarButtonWithState.js +2 -1
  13. package/dist/es2019/ui/FindReplaceDropdown.js +4 -1
  14. package/dist/es2019/ui/FindReplaceToolbarButton.js +3 -1
  15. package/dist/es2019/ui/Replace.js +4 -1
  16. package/dist/esm/pm-plugins/plugin-factory.js +8 -9
  17. package/dist/esm/ui/Find.js +3 -2
  18. package/dist/esm/ui/FindReplace.js +1 -1
  19. package/dist/esm/ui/FindReplaceDropDownOrToolbarButtonWithState.js +2 -1
  20. package/dist/esm/ui/FindReplaceDropdown.js +4 -1
  21. package/dist/esm/ui/FindReplaceToolbarButton.js +3 -2
  22. package/dist/esm/ui/Replace.js +4 -1
  23. package/dist/types/pm-plugins/commands.d.ts +12 -11
  24. package/dist/types/pm-plugins/plugin-factory.d.ts +7 -2
  25. package/dist/types/ui/Find.d.ts +3 -3
  26. package/dist/types/ui/FindReplaceDropDownOrToolbarButtonWithState.d.ts +2 -2
  27. package/dist/types/ui/FindReplaceDropdown.d.ts +3 -3
  28. package/dist/types/ui/FindReplaceToolbarButton.d.ts +3 -3
  29. package/dist/types/ui/Replace.d.ts +3 -3
  30. package/dist/types-ts4.5/pm-plugins/commands.d.ts +12 -11
  31. package/dist/types-ts4.5/pm-plugins/plugin-factory.d.ts +7 -2
  32. package/dist/types-ts4.5/ui/Find.d.ts +3 -3
  33. package/dist/types-ts4.5/ui/FindReplaceDropDownOrToolbarButtonWithState.d.ts +2 -2
  34. package/dist/types-ts4.5/ui/FindReplaceDropdown.d.ts +3 -3
  35. package/dist/types-ts4.5/ui/FindReplaceToolbarButton.d.ts +3 -3
  36. package/dist/types-ts4.5/ui/Replace.d.ts +3 -3
  37. package/package.json +9 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-find-replace
2
2
 
3
+ ## 8.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 8.0.0
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 7.1.1
4
16
 
5
17
  ### Patch Changes
@@ -121,11 +121,11 @@ var handleDocChanged = function handleDocChanged(tr, pluginState) {
121
121
  decorationSet: decorationSet
122
122
  });
123
123
  };
124
- var _pluginFactory = (0, _utils.pluginFactory)(_pluginKey.findReplacePluginKey, (0, _reducer.default)(function () {
125
- return _main.initialState;
126
- }), {
127
- onDocChanged: handleDocChanged
128
- }),
129
- createCommand = exports.createCommand = _pluginFactory.createCommand,
130
- getPluginState = exports.getPluginState = _pluginFactory.getPluginState,
131
- createPluginState = exports.createPluginState = _pluginFactory.createPluginState;
124
+ var dest = (0, _utils.pluginFactory)(_pluginKey.findReplacePluginKey, (0, _reducer.default)(function () {
125
+ return _main.initialState;
126
+ }), {
127
+ onDocChanged: handleDocChanged
128
+ });
129
+ var createCommand = exports.createCommand = dest.createCommand;
130
+ var getPluginState = exports.getPluginState = dest.getPluginState;
131
+ var createPluginState = exports.createPluginState = dest.createPluginState;
@@ -264,5 +264,6 @@ var Find = /*#__PURE__*/function (_React$Component) {
264
264
  );
265
265
  }
266
266
  }]);
267
- }(_react.default.Component);
268
- var _default = exports.default = (0, _reactIntlNext.injectIntl)(Find);
267
+ }(_react.default.Component); // eslint-disable-next-line @typescript-eslint/ban-types
268
+ var _default_1 = (0, _reactIntlNext.injectIntl)(Find);
269
+ var _default = exports.default = _default_1;
@@ -22,7 +22,7 @@ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0,
22
22
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */ /* eslint-disable @atlaskit/design-system/prefer-primitives */ /**
23
23
  * @jsxRuntime classic
24
24
  * @jsx jsx
25
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
+ */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
26
26
  // eslint-disable-next-line @repo/internal/react/no-class-components
27
27
  var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
28
28
  function FindReplace(props) {
@@ -178,4 +178,5 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
178
178
  isButtonHidden: isButtonHidden
179
179
  });
180
180
  };
181
- var _default = exports.default = /*#__PURE__*/_react.default.memo(FindReplaceToolbarButtonWithState);
181
+ var _default_1 = /*#__PURE__*/_react.default.memo(FindReplaceToolbarButtonWithState);
182
+ var _default = exports.default = _default_1;
@@ -69,4 +69,7 @@ var FindReplaceDropdown = function FindReplaceDropdown(props) {
69
69
  // eslint-disable-next-line react/jsx-props-no-spreading
70
70
  }, props))));
71
71
  };
72
- var _default = exports.default = (0, _reactIntlNext.injectIntl)(FindReplaceDropdown);
72
+
73
+ // eslint-disable-next-line @typescript-eslint/ban-types
74
+ var _default_1 = (0, _reactIntlNext.injectIntl)(FindReplaceDropdown);
75
+ var _default = exports.default = _default_1;
@@ -197,5 +197,6 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
197
197
  }, this.props)))));
198
198
  }
199
199
  }]);
200
- }(_react.default.PureComponent);
201
- var _default = exports.default = (0, _reactIntlNext.injectIntl)(FindReplaceToolbarButton);
200
+ }(_react.default.PureComponent); // eslint-disable-next-line @typescript-eslint/ban-types
201
+ var _default_1 = (0, _reactIntlNext.injectIntl)(FindReplaceToolbarButton);
202
+ var _default = exports.default = _default_1;
@@ -275,4 +275,7 @@ var Replace = function Replace(_ref) {
275
275
  onClick: clearSearch
276
276
  }, closeFindReplaceDialog))));
277
277
  };
278
- var _default = exports.default = (0, _reactIntlNext.injectIntl)(Replace);
278
+
279
+ // eslint-disable-next-line @typescript-eslint/ban-types
280
+ var _default_1 = (0, _reactIntlNext.injectIntl)(Replace);
281
+ var _default = exports.default = _default_1;
@@ -103,10 +103,9 @@ const handleDocChanged = (tr, pluginState) => {
103
103
  decorationSet
104
104
  };
105
105
  };
106
- export const {
107
- createCommand,
108
- getPluginState,
109
- createPluginState
110
- } = pluginFactory(findReplacePluginKey, reducer(() => initialState), {
106
+ const dest = pluginFactory(findReplacePluginKey, reducer(() => initialState), {
111
107
  onDocChanged: handleDocChanged
112
- });
108
+ });
109
+ export const createCommand = dest.createCommand;
110
+ export const getPluginState = dest.getPluginState;
111
+ export const createPluginState = dest.createPluginState;
@@ -247,4 +247,7 @@ class Find extends React.Component {
247
247
  );
248
248
  }
249
249
  }
250
- export default injectIntl(Find);
250
+
251
+ // eslint-disable-next-line @typescript-eslint/ban-types
252
+ const _default_1 = injectIntl(Find);
253
+ export default _default_1;
@@ -7,7 +7,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
7
  */
8
8
  import React from 'react';
9
9
 
10
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
11
11
  import { jsx } from '@emotion/react';
12
12
  import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
13
13
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -162,4 +162,5 @@ const FindReplaceToolbarButtonWithState = ({
162
162
  isButtonHidden: isButtonHidden
163
163
  });
164
164
  };
165
- export default /*#__PURE__*/React.memo(FindReplaceToolbarButtonWithState);
165
+ const _default_1 = /*#__PURE__*/React.memo(FindReplaceToolbarButtonWithState);
166
+ export default _default_1;
@@ -63,4 +63,7 @@ const FindReplaceDropdown = props => {
63
63
  // eslint-disable-next-line react/jsx-props-no-spreading
64
64
  }, props))));
65
65
  };
66
- export default injectIntl(FindReplaceDropdown);
66
+
67
+ // eslint-disable-next-line @typescript-eslint/ban-types
68
+ const _default_1 = injectIntl(FindReplaceDropdown);
69
+ export default _default_1;
@@ -187,4 +187,6 @@ class FindReplaceToolbarButton extends React.PureComponent {
187
187
  }, this.props)))));
188
188
  }
189
189
  }
190
- export default injectIntl(FindReplaceToolbarButton);
190
+ // eslint-disable-next-line @typescript-eslint/ban-types
191
+ const _default_1 = injectIntl(FindReplaceToolbarButton);
192
+ export default _default_1;
@@ -240,4 +240,7 @@ const Replace = ({
240
240
  onClick: clearSearch
241
241
  }, closeFindReplaceDialog))));
242
242
  };
243
- export default injectIntl(Replace);
243
+
244
+ // eslint-disable-next-line @typescript-eslint/ban-types
245
+ const _default_1 = injectIntl(Replace);
246
+ export default _default_1;
@@ -114,12 +114,11 @@ var handleDocChanged = function handleDocChanged(tr, pluginState) {
114
114
  decorationSet: decorationSet
115
115
  });
116
116
  };
117
- var _pluginFactory = pluginFactory(findReplacePluginKey, reducer(function () {
118
- return initialState;
119
- }), {
120
- onDocChanged: handleDocChanged
121
- }),
122
- createCommand = _pluginFactory.createCommand,
123
- getPluginState = _pluginFactory.getPluginState,
124
- createPluginState = _pluginFactory.createPluginState;
125
- export { createCommand, getPluginState, createPluginState };
117
+ var dest = pluginFactory(findReplacePluginKey, reducer(function () {
118
+ return initialState;
119
+ }), {
120
+ onDocChanged: handleDocChanged
121
+ });
122
+ export var createCommand = dest.createCommand;
123
+ export var getPluginState = dest.getPluginState;
124
+ export var createPluginState = dest.createPluginState;
@@ -261,5 +261,6 @@ var Find = /*#__PURE__*/function (_React$Component) {
261
261
  );
262
262
  }
263
263
  }]);
264
- }(React.Component);
265
- export default injectIntl(Find);
264
+ }(React.Component); // eslint-disable-next-line @typescript-eslint/ban-types
265
+ var _default_1 = injectIntl(Find);
266
+ export default _default_1;
@@ -14,7 +14,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
14
14
  */
15
15
  import React from 'react';
16
16
 
17
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
17
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
18
18
  import { jsx } from '@emotion/react';
19
19
  import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
20
20
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -170,4 +170,5 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
170
170
  isButtonHidden: isButtonHidden
171
171
  });
172
172
  };
173
- export default /*#__PURE__*/React.memo(FindReplaceToolbarButtonWithState);
173
+ var _default_1 = /*#__PURE__*/React.memo(FindReplaceToolbarButtonWithState);
174
+ export default _default_1;
@@ -61,4 +61,7 @@ var FindReplaceDropdown = function FindReplaceDropdown(props) {
61
61
  // eslint-disable-next-line react/jsx-props-no-spreading
62
62
  }, props))));
63
63
  };
64
- export default injectIntl(FindReplaceDropdown);
64
+
65
+ // eslint-disable-next-line @typescript-eslint/ban-types
66
+ var _default_1 = injectIntl(FindReplaceDropdown);
67
+ export default _default_1;
@@ -192,5 +192,6 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
192
192
  }, this.props)))));
193
193
  }
194
194
  }]);
195
- }(React.PureComponent);
196
- export default injectIntl(FindReplaceToolbarButton);
195
+ }(React.PureComponent); // eslint-disable-next-line @typescript-eslint/ban-types
196
+ var _default_1 = injectIntl(FindReplaceToolbarButton);
197
+ export default _default_1;
@@ -265,4 +265,7 @@ var Replace = function Replace(_ref) {
265
265
  onClick: clearSearch
266
266
  }, closeFindReplaceDialog))));
267
267
  };
268
- export default injectIntl(Replace);
268
+
269
+ // eslint-disable-next-line @typescript-eslint/ban-types
270
+ var _default_1 = injectIntl(Replace);
271
+ export default _default_1;
@@ -1,12 +1,13 @@
1
+ import type { Command } from '@atlaskit/editor-common/types';
1
2
  import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
2
- export declare const activate: () => import("@atlaskit/editor-common/types").Command;
3
- export declare const find: (editorView: EditorView, containerElement: HTMLElement | null, keyword?: string) => import("@atlaskit/editor-common/types").Command;
4
- export declare const findNext: (editorView: EditorView) => import("@atlaskit/editor-common/types").Command;
5
- export declare const findPrevious: (editorView: EditorView) => import("@atlaskit/editor-common/types").Command;
6
- export declare const replace: (replaceText: string) => import("@atlaskit/editor-common/types").Command;
7
- export declare const replaceAll: (replaceText: string) => import("@atlaskit/editor-common/types").Command;
8
- export declare const addDecorations: (decorations: Decoration[]) => import("@atlaskit/editor-common/types").Command;
9
- export declare const removeDecorations: (decorations: Decoration[]) => import("@atlaskit/editor-common/types").Command;
10
- export declare const cancelSearch: () => import("@atlaskit/editor-common/types").Command;
11
- export declare const blur: () => import("@atlaskit/editor-common/types").Command;
12
- export declare const toggleMatchCase: () => import("@atlaskit/editor-common/types").Command;
3
+ export declare const activate: () => Command;
4
+ export declare const find: (editorView: EditorView, containerElement: HTMLElement | null, keyword?: string) => Command;
5
+ export declare const findNext: (editorView: EditorView) => Command;
6
+ export declare const findPrevious: (editorView: EditorView) => Command;
7
+ export declare const replace: (replaceText: string) => Command;
8
+ export declare const replaceAll: (replaceText: string) => Command;
9
+ export declare const addDecorations: (decorations: Decoration[]) => Command;
10
+ export declare const removeDecorations: (decorations: Decoration[]) => Command;
11
+ export declare const cancelSearch: () => Command;
12
+ export declare const blur: () => Command;
13
+ export declare const toggleMatchCase: () => Command;
@@ -1,3 +1,8 @@
1
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
1
+ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
2
+ import type { Command } from '@atlaskit/editor-common/types';
3
+ import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
2
4
  import type { FindReplacePluginState } from '../types';
3
- export declare const createCommand: <A = import("./actions").FindReplaceAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: Transaction, state: import("prosemirror-state").EditorState) => Transaction) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => FindReplacePluginState, createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: FindReplacePluginState | ((state: import("prosemirror-state").EditorState) => FindReplacePluginState)) => import("prosemirror-state").SafeStateField<FindReplacePluginState>;
5
+ import type { FindReplaceAction } from './actions';
6
+ export declare const createCommand: <A = FindReplaceAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
7
+ export declare const getPluginState: (state: EditorState) => FindReplacePluginState;
8
+ export declare const createPluginState: (dispatch: Dispatch, initialState: FindReplacePluginState | ((state: EditorState) => FindReplacePluginState)) => SafeStateField<FindReplacePluginState>;
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
- import type { WrappedComponentProps } from 'react-intl-next';
6
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
7
7
  import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
8
8
  import type { MatchCaseProps } from '../types';
9
9
  export declare const FIND_DEBOUNCE_MS = 100;
@@ -30,7 +30,7 @@ export type FindProps = {
30
30
  setFindTyped: (value: boolean) => void;
31
31
  shouldFocus: boolean;
32
32
  } & MatchCaseProps;
33
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
33
+ declare const _default_1: React.FC<WithIntlProps<{
34
34
  count: {
35
35
  index: number;
36
36
  total: number;
@@ -77,4 +77,4 @@ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
77
77
  shouldFocus: boolean;
78
78
  } & MatchCaseProps & WrappedComponentProps>;
79
79
  };
80
- export default _default;
80
+ export default _default_1;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { FindReplaceToolbarButtonWithStateProps } from '../types';
3
- declare const _default: React.MemoExoticComponent<({ popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, isToolbarReducedSpacing, editorView, containerElement, dispatchAnalyticsEvent, takeFullWidth, api, isButtonHidden, doesNotHaveButton, }: FindReplaceToolbarButtonWithStateProps) => React.JSX.Element | null>;
4
- export default _default;
3
+ declare const _default_1: React.MemoExoticComponent<({ popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, isToolbarReducedSpacing, editorView, containerElement, dispatchAnalyticsEvent, takeFullWidth, api, isButtonHidden, doesNotHaveButton, }: FindReplaceToolbarButtonWithStateProps) => React.JSX.Element | null>;
4
+ export default _default_1;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type WrappedComponentProps } from 'react-intl-next';
2
+ import { type WithIntlProps, type WrappedComponentProps } from 'react-intl-next';
3
3
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
4
4
  import type { FindReplaceProps } from './FindReplace';
5
5
  export interface FindReplaceDropdownProps extends Omit<FindReplaceProps, 'count'> {
@@ -11,7 +11,7 @@ export interface FindReplaceDropdownProps extends Omit<FindReplaceProps, 'count'
11
11
  numReplaceable?: number;
12
12
  popupsMountPoint?: HTMLElement;
13
13
  }
14
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<FindReplaceDropdownProps & WrappedComponentProps>> & {
14
+ declare const _default_1: React.FC<WithIntlProps<FindReplaceDropdownProps & WrappedComponentProps>> & {
15
15
  WrappedComponent: React.ComponentType<FindReplaceDropdownProps & WrappedComponentProps>;
16
16
  };
17
- export default _default;
17
+ export default _default_1;
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
- import type { WrappedComponentProps } from 'react-intl-next';
6
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
7
7
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
8
8
  import type { FindReplaceProps } from './FindReplace';
9
9
  export interface FindReplaceToolbarButtonProps extends Omit<FindReplaceProps, 'count'> {
@@ -20,7 +20,7 @@ export interface FindReplaceToolbarButtonProps extends Omit<FindReplaceProps, 'c
20
20
  popupsScrollableElement?: HTMLElement;
21
21
  takeFullWidth: boolean;
22
22
  }
23
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<FindReplaceToolbarButtonProps & WrappedComponentProps>> & {
23
+ declare const _default_1: React.FC<WithIntlProps<FindReplaceToolbarButtonProps & WrappedComponentProps>> & {
24
24
  WrappedComponent: React.ComponentType<FindReplaceToolbarButtonProps & WrappedComponentProps>;
25
25
  };
26
- export default _default;
26
+ export default _default_1;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { WrappedComponentProps } from 'react-intl-next';
2
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
3
3
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
4
4
  import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
5
5
  export type ReplaceProps = {
@@ -33,7 +33,7 @@ export type ReplaceProps = {
33
33
  replaceText?: string;
34
34
  setFindTyped: (value: boolean) => void;
35
35
  };
36
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<ReplaceProps & WrappedComponentProps>> & {
36
+ declare const _default_1: React.FC<WithIntlProps<ReplaceProps & WrappedComponentProps>> & {
37
37
  WrappedComponent: React.ComponentType<ReplaceProps & WrappedComponentProps>;
38
38
  };
39
- export default _default;
39
+ export default _default_1;
@@ -1,12 +1,13 @@
1
+ import type { Command } from '@atlaskit/editor-common/types';
1
2
  import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
2
- export declare const activate: () => import("@atlaskit/editor-common/types").Command;
3
- export declare const find: (editorView: EditorView, containerElement: HTMLElement | null, keyword?: string) => import("@atlaskit/editor-common/types").Command;
4
- export declare const findNext: (editorView: EditorView) => import("@atlaskit/editor-common/types").Command;
5
- export declare const findPrevious: (editorView: EditorView) => import("@atlaskit/editor-common/types").Command;
6
- export declare const replace: (replaceText: string) => import("@atlaskit/editor-common/types").Command;
7
- export declare const replaceAll: (replaceText: string) => import("@atlaskit/editor-common/types").Command;
8
- export declare const addDecorations: (decorations: Decoration[]) => import("@atlaskit/editor-common/types").Command;
9
- export declare const removeDecorations: (decorations: Decoration[]) => import("@atlaskit/editor-common/types").Command;
10
- export declare const cancelSearch: () => import("@atlaskit/editor-common/types").Command;
11
- export declare const blur: () => import("@atlaskit/editor-common/types").Command;
12
- export declare const toggleMatchCase: () => import("@atlaskit/editor-common/types").Command;
3
+ export declare const activate: () => Command;
4
+ export declare const find: (editorView: EditorView, containerElement: HTMLElement | null, keyword?: string) => Command;
5
+ export declare const findNext: (editorView: EditorView) => Command;
6
+ export declare const findPrevious: (editorView: EditorView) => Command;
7
+ export declare const replace: (replaceText: string) => Command;
8
+ export declare const replaceAll: (replaceText: string) => Command;
9
+ export declare const addDecorations: (decorations: Decoration[]) => Command;
10
+ export declare const removeDecorations: (decorations: Decoration[]) => Command;
11
+ export declare const cancelSearch: () => Command;
12
+ export declare const blur: () => Command;
13
+ export declare const toggleMatchCase: () => Command;
@@ -1,3 +1,8 @@
1
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
1
+ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
2
+ import type { Command } from '@atlaskit/editor-common/types';
3
+ import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
2
4
  import type { FindReplacePluginState } from '../types';
3
- export declare const createCommand: <A = import("./actions").FindReplaceAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: Transaction, state: import("prosemirror-state").EditorState) => Transaction) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => FindReplacePluginState, createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: FindReplacePluginState | ((state: import("prosemirror-state").EditorState) => FindReplacePluginState)) => import("prosemirror-state").SafeStateField<FindReplacePluginState>;
5
+ import type { FindReplaceAction } from './actions';
6
+ export declare const createCommand: <A = FindReplaceAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
7
+ export declare const getPluginState: (state: EditorState) => FindReplacePluginState;
8
+ export declare const createPluginState: (dispatch: Dispatch, initialState: FindReplacePluginState | ((state: EditorState) => FindReplacePluginState)) => SafeStateField<FindReplacePluginState>;
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
- import type { WrappedComponentProps } from 'react-intl-next';
6
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
7
7
  import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
8
8
  import type { MatchCaseProps } from '../types';
9
9
  export declare const FIND_DEBOUNCE_MS = 100;
@@ -30,7 +30,7 @@ export type FindProps = {
30
30
  setFindTyped: (value: boolean) => void;
31
31
  shouldFocus: boolean;
32
32
  } & MatchCaseProps;
33
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
33
+ declare const _default_1: React.FC<WithIntlProps<{
34
34
  count: {
35
35
  index: number;
36
36
  total: number;
@@ -77,4 +77,4 @@ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
77
77
  shouldFocus: boolean;
78
78
  } & MatchCaseProps & WrappedComponentProps>;
79
79
  };
80
- export default _default;
80
+ export default _default_1;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { FindReplaceToolbarButtonWithStateProps } from '../types';
3
- declare const _default: React.MemoExoticComponent<({ popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, isToolbarReducedSpacing, editorView, containerElement, dispatchAnalyticsEvent, takeFullWidth, api, isButtonHidden, doesNotHaveButton, }: FindReplaceToolbarButtonWithStateProps) => React.JSX.Element | null>;
4
- export default _default;
3
+ declare const _default_1: React.MemoExoticComponent<({ popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, isToolbarReducedSpacing, editorView, containerElement, dispatchAnalyticsEvent, takeFullWidth, api, isButtonHidden, doesNotHaveButton, }: FindReplaceToolbarButtonWithStateProps) => React.JSX.Element | null>;
4
+ export default _default_1;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type WrappedComponentProps } from 'react-intl-next';
2
+ import { type WithIntlProps, type WrappedComponentProps } from 'react-intl-next';
3
3
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
4
4
  import type { FindReplaceProps } from './FindReplace';
5
5
  export interface FindReplaceDropdownProps extends Omit<FindReplaceProps, 'count'> {
@@ -11,7 +11,7 @@ export interface FindReplaceDropdownProps extends Omit<FindReplaceProps, 'count'
11
11
  numReplaceable?: number;
12
12
  popupsMountPoint?: HTMLElement;
13
13
  }
14
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<FindReplaceDropdownProps & WrappedComponentProps>> & {
14
+ declare const _default_1: React.FC<WithIntlProps<FindReplaceDropdownProps & WrappedComponentProps>> & {
15
15
  WrappedComponent: React.ComponentType<FindReplaceDropdownProps & WrappedComponentProps>;
16
16
  };
17
- export default _default;
17
+ export default _default_1;
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
- import type { WrappedComponentProps } from 'react-intl-next';
6
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
7
7
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
8
8
  import type { FindReplaceProps } from './FindReplace';
9
9
  export interface FindReplaceToolbarButtonProps extends Omit<FindReplaceProps, 'count'> {
@@ -20,7 +20,7 @@ export interface FindReplaceToolbarButtonProps extends Omit<FindReplaceProps, 'c
20
20
  popupsScrollableElement?: HTMLElement;
21
21
  takeFullWidth: boolean;
22
22
  }
23
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<FindReplaceToolbarButtonProps & WrappedComponentProps>> & {
23
+ declare const _default_1: React.FC<WithIntlProps<FindReplaceToolbarButtonProps & WrappedComponentProps>> & {
24
24
  WrappedComponent: React.ComponentType<FindReplaceToolbarButtonProps & WrappedComponentProps>;
25
25
  };
26
- export default _default;
26
+ export default _default_1;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { WrappedComponentProps } from 'react-intl-next';
2
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
3
3
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
4
4
  import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
5
5
  export type ReplaceProps = {
@@ -33,7 +33,7 @@ export type ReplaceProps = {
33
33
  replaceText?: string;
34
34
  setFindTyped: (value: boolean) => void;
35
35
  };
36
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<ReplaceProps & WrappedComponentProps>> & {
36
+ declare const _default_1: React.FC<WithIntlProps<ReplaceProps & WrappedComponentProps>> & {
37
37
  WrappedComponent: React.ComponentType<ReplaceProps & WrappedComponentProps>;
38
38
  };
39
- export default _default;
39
+ export default _default_1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-find-replace",
3
- "version": "7.1.1",
3
+ "version": "8.0.1",
4
4
  "description": "find replace plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,11 +29,11 @@
29
29
  "atlaskit:src": "src/index.ts",
30
30
  "dependencies": {
31
31
  "@atlaskit/button": "^23.10.0",
32
- "@atlaskit/editor-plugin-analytics": "^7.0.0",
33
- "@atlaskit/editor-plugin-card": "^12.4.0",
34
- "@atlaskit/editor-plugin-expand": "^8.5.0",
35
- "@atlaskit/editor-plugin-mentions": "^9.4.0",
36
- "@atlaskit/editor-plugin-primary-toolbar": "^8.0.0",
32
+ "@atlaskit/editor-plugin-analytics": "^8.0.0",
33
+ "@atlaskit/editor-plugin-card": "^13.0.0",
34
+ "@atlaskit/editor-plugin-expand": "^9.0.0",
35
+ "@atlaskit/editor-plugin-mentions": "^10.0.0",
36
+ "@atlaskit/editor-plugin-primary-toolbar": "^9.0.0",
37
37
  "@atlaskit/editor-prosemirror": "^7.3.0",
38
38
  "@atlaskit/editor-shared-styles": "^3.10.0",
39
39
  "@atlaskit/form": "^15.4.0",
@@ -44,8 +44,8 @@
44
44
  "@atlaskit/primitives": "^18.0.0",
45
45
  "@atlaskit/textfield": "^8.2.0",
46
46
  "@atlaskit/theme": "^22.0.0",
47
- "@atlaskit/tmp-editor-statsig": "^35.0.0",
48
- "@atlaskit/tokens": "^11.0.0",
47
+ "@atlaskit/tmp-editor-statsig": "^36.0.0",
48
+ "@atlaskit/tokens": "^11.1.0",
49
49
  "@atlaskit/tooltip": "^20.14.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1",
@@ -61,7 +61,7 @@
61
61
  "react-dom": "^18.2.0"
62
62
  },
63
63
  "peerDependencies": {
64
- "@atlaskit/editor-common": "^111.30.0",
64
+ "@atlaskit/editor-common": "^112.0.0",
65
65
  "react": "^18.2.0",
66
66
  "react-intl-next": "npm:react-intl@^5.18.1"
67
67
  },