@atlaskit/editor-plugin-floating-toolbar 7.0.0 → 7.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-plugin-floating-toolbar
2
2
 
3
+ ## 7.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6fb79942fc3a5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6fb79942fc3a5) -
8
+ Internal changes to how borders are applied.
9
+ - Updated dependencies
10
+
11
+ ## 7.0.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 7.0.0
4
18
 
5
19
  ### Patch Changes
@@ -193,6 +193,9 @@ var floatingToolbarPlugin = exports.floatingToolbarPlugin = function floatingToo
193
193
  editorView = _ref4.editorView,
194
194
  providerFactory = _ref4.providerFactory,
195
195
  dispatchAnalyticsEvent = _ref4.dispatchAnalyticsEvent;
196
+ if (!editorView) {
197
+ return null;
198
+ }
196
199
  return /*#__PURE__*/_react.default.createElement(ContentComponent, {
197
200
  editorView: editorView,
198
201
  pluginInjectionApi: api,
@@ -12,7 +12,7 @@ var _primitives = require("@atlaskit/primitives");
12
12
  var styles = (0, _primitives.xcss)({
13
13
  width: '100%',
14
14
  borderBlockEnd: 'none',
15
- borderBlockStart: "1px solid ".concat("var(--ds-border, #091E4224)"),
15
+ borderBlockStart: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #091E4224)"),
16
16
  borderInline: 'none'
17
17
  });
18
18
  var Divider = exports.Divider = function Divider() {
@@ -179,6 +179,9 @@ export const floatingToolbarPlugin = ({
179
179
  providerFactory,
180
180
  dispatchAnalyticsEvent
181
181
  }) {
182
+ if (!editorView) {
183
+ return null;
184
+ }
182
185
  return /*#__PURE__*/React.createElement(ContentComponent, {
183
186
  editorView: editorView,
184
187
  pluginInjectionApi: api,
@@ -5,7 +5,7 @@ import { Box, xcss } from '@atlaskit/primitives';
5
5
  const styles = xcss({
6
6
  width: '100%',
7
7
  borderBlockEnd: 'none',
8
- borderBlockStart: `1px solid ${"var(--ds-border, #091E4224)"}`,
8
+ borderBlockStart: `${"var(--ds-border-width, 1px)"} solid ${"var(--ds-border, #091E4224)"}`,
9
9
  borderInline: 'none'
10
10
  });
11
11
  export const Divider = () => /*#__PURE__*/React.createElement(Box, {
@@ -184,6 +184,9 @@ export var floatingToolbarPlugin = function floatingToolbarPlugin(_ref) {
184
184
  editorView = _ref4.editorView,
185
185
  providerFactory = _ref4.providerFactory,
186
186
  dispatchAnalyticsEvent = _ref4.dispatchAnalyticsEvent;
187
+ if (!editorView) {
188
+ return null;
189
+ }
187
190
  return /*#__PURE__*/React.createElement(ContentComponent, {
188
191
  editorView: editorView,
189
192
  pluginInjectionApi: api,
@@ -5,7 +5,7 @@ import { Box, xcss } from '@atlaskit/primitives';
5
5
  var styles = xcss({
6
6
  width: '100%',
7
7
  borderBlockEnd: 'none',
8
- borderBlockStart: "1px solid ".concat("var(--ds-border, #091E4224)"),
8
+ borderBlockStart: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #091E4224)"),
9
9
  borderInline: 'none'
10
10
  });
11
11
  export var Divider = function Divider() {
@@ -5,11 +5,14 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
5
  import type { ExtractInjectionAPI, FloatingToolbarConfig, FloatingToolbarHandler, UiComponentFactoryParams } from '@atlaskit/editor-common/types';
6
6
  import type { Selection } from '@atlaskit/editor-prosemirror/state';
7
7
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
8
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
9
  import type { ConfigWithNodeInfo, FloatingToolbarPlugin, FloatingToolbarPluginState } from './floatingToolbarPluginType';
9
10
  export declare const getRelevantConfig: (selection: Selection, configs: Array<FloatingToolbarConfig>) => ConfigWithNodeInfo | undefined;
10
11
  export declare const floatingToolbarPlugin: FloatingToolbarPlugin;
11
12
  export declare function ContentComponent({ pluginInjectionApi, editorView, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, providerFactory, dispatchAnalyticsEvent, }: Pick<UiComponentFactoryParams, 'editorView' | 'popupsMountPoint' | 'popupsBoundariesElement' | 'providerFactory' | 'dispatchAnalyticsEvent' | 'popupsScrollableElement'> & {
12
13
  pluginInjectionApi: ExtractInjectionAPI<FloatingToolbarPlugin> | undefined;
14
+ } & {
15
+ editorView: EditorView;
13
16
  }): React.JSX.Element | null;
14
17
  /**
15
18
  *
@@ -5,11 +5,14 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
5
  import type { ExtractInjectionAPI, FloatingToolbarConfig, FloatingToolbarHandler, UiComponentFactoryParams } from '@atlaskit/editor-common/types';
6
6
  import type { Selection } from '@atlaskit/editor-prosemirror/state';
7
7
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
8
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
9
  import type { ConfigWithNodeInfo, FloatingToolbarPlugin, FloatingToolbarPluginState } from './floatingToolbarPluginType';
9
10
  export declare const getRelevantConfig: (selection: Selection, configs: Array<FloatingToolbarConfig>) => ConfigWithNodeInfo | undefined;
10
11
  export declare const floatingToolbarPlugin: FloatingToolbarPlugin;
11
12
  export declare function ContentComponent({ pluginInjectionApi, editorView, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, providerFactory, dispatchAnalyticsEvent, }: Pick<UiComponentFactoryParams, 'editorView' | 'popupsMountPoint' | 'popupsBoundariesElement' | 'providerFactory' | 'dispatchAnalyticsEvent' | 'popupsScrollableElement'> & {
12
13
  pluginInjectionApi: ExtractInjectionAPI<FloatingToolbarPlugin> | undefined;
14
+ } & {
15
+ editorView: EditorView;
13
16
  }): React.JSX.Element | null;
14
17
  /**
15
18
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-floating-toolbar",
3
- "version": "7.0.0",
3
+ "version": "7.0.2",
4
4
  "description": "Floating toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -21,31 +21,31 @@
21
21
  ],
22
22
  "atlaskit:src": "src/index.ts",
23
23
  "dependencies": {
24
- "@atlaskit/adf-utils": "^19.21.0",
24
+ "@atlaskit/adf-utils": "^19.23.0",
25
25
  "@atlaskit/button": "^23.4.0",
26
26
  "@atlaskit/checkbox": "^17.1.0",
27
27
  "@atlaskit/editor-palette": "^2.1.0",
28
- "@atlaskit/editor-plugin-analytics": "^5.0.0",
28
+ "@atlaskit/editor-plugin-analytics": "^5.2.0",
29
29
  "@atlaskit/editor-plugin-context-panel": "^7.0.0",
30
30
  "@atlaskit/editor-plugin-copy-button": "^5.0.0",
31
31
  "@atlaskit/editor-plugin-decorations": "^5.0.0",
32
32
  "@atlaskit/editor-plugin-editor-disabled": "^5.0.0",
33
33
  "@atlaskit/editor-plugin-editor-viewmode": "^7.0.0",
34
- "@atlaskit/editor-plugin-emoji": "^6.0.0",
35
- "@atlaskit/editor-plugin-extension": "^8.0.0",
34
+ "@atlaskit/editor-plugin-emoji": "^6.2.0",
35
+ "@atlaskit/editor-plugin-extension": "^8.2.0",
36
36
  "@atlaskit/editor-plugin-interaction": "^7.0.0",
37
- "@atlaskit/editor-plugin-table": "^14.0.0",
37
+ "@atlaskit/editor-plugin-table": "^14.2.0",
38
38
  "@atlaskit/editor-plugin-user-intent": "^3.0.0",
39
39
  "@atlaskit/editor-prosemirror": "7.0.0",
40
40
  "@atlaskit/emoji": "^69.5.0",
41
- "@atlaskit/icon": "^28.1.0",
41
+ "@atlaskit/icon": "^28.2.0",
42
42
  "@atlaskit/menu": "^8.4.0",
43
43
  "@atlaskit/modal-dialog": "^14.3.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/primitives": "^14.14.0",
46
- "@atlaskit/select": "^21.2.0",
47
- "@atlaskit/theme": "^20.0.0",
48
- "@atlaskit/tmp-editor-statsig": "^12.9.0",
46
+ "@atlaskit/select": "^21.3.0",
47
+ "@atlaskit/theme": "^21.0.0",
48
+ "@atlaskit/tmp-editor-statsig": "^12.24.0",
49
49
  "@atlaskit/tokens": "^6.3.0",
50
50
  "@atlaskit/tooltip": "^20.4.0",
51
51
  "@babel/runtime": "^7.0.0",
@@ -57,7 +57,7 @@
57
57
  "react-loadable": "^5.1.0"
58
58
  },
59
59
  "peerDependencies": {
60
- "@atlaskit/editor-common": "^109.0.0",
60
+ "@atlaskit/editor-common": "^109.8.0",
61
61
  "react": "^18.2.0",
62
62
  "react-dom": "^18.2.0"
63
63
  },