@atlaskit/editor-plugin-hyperlink 4.0.3 → 4.0.5

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,25 @@
1
1
  # @atlaskit/editor-plugin-hyperlink
2
2
 
3
+ ## 4.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#120533](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120533)
8
+ [`f1bec731e278f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f1bec731e278f) -
9
+ Adds a `sideEffects` field to ensure this package does not have Compiled styles tree-shaken in the
10
+ future to avoid an accidental regression.
11
+
12
+ This is related to
13
+ https://community.developer.atlassian.com/t/rfc-73-migrating-our-components-to-compiled-css-in-js/85953
14
+
15
+ - Updated dependencies
16
+
17
+ ## 4.0.4
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 4.0.3
4
24
 
5
25
  ### Patch Changes
@@ -13,6 +13,7 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
13
13
  var _messages = require("@atlaskit/editor-common/messages");
14
14
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
15
15
  var _link = _interopRequireDefault(require("@atlaskit/icon/core/link"));
16
+ /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation */
16
17
  /**
17
18
  * @jsxRuntime classic
18
19
  * @jsx jsx
@@ -29,18 +30,24 @@ var PrimaryToolbarComponentWithIntl = function PrimaryToolbarComponentWithIntl(_
29
30
  var _api$core, _api$hyperlink;
30
31
  api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$hyperlink = api.hyperlink) === null || _api$hyperlink === void 0 ? void 0 : _api$hyperlink.commands.showLinkToolbar(_analytics.INPUT_METHOD.TOOLBAR));
31
32
  }, [api]);
32
- return (0, _react2.jsx)("div", null, (0, _react2.jsx)(_uiMenu.ToolbarButton, {
33
+ return (0, _react2.jsx)(_uiMenu.ToolbarButton
34
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
35
+ , {
36
+ css: buttonStyles,
33
37
  onClick: onClick,
34
38
  "aria-haspopup": "dialog",
35
39
  "aria-keyshortcuts": (0, _keymaps.getAriaKeyshortcuts)(_keymaps.addLink),
36
40
  "aria-label": content,
37
41
  testId: content,
38
- spacing: "default",
42
+ spacing: "none",
39
43
  title: content
40
44
  }, (0, _react2.jsx)(_link.default, {
41
45
  label: "",
42
46
  color: "currentColor",
43
47
  spacing: "none"
44
- })));
48
+ }));
45
49
  };
50
+ var buttonStyles = (0, _react2.css)({
51
+ padding: "var(--ds-space-075, 6px)".concat(" ", "var(--ds-space-100, 8px)")
52
+ });
46
53
  var PrimaryToolbarComponent = exports.PrimaryToolbarComponent = (0, _reactIntlNext.injectIntl)(PrimaryToolbarComponentWithIntl);
@@ -1,12 +1,12 @@
1
+ /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation */
1
2
  /**
2
3
  * @jsxRuntime classic
3
4
  * @jsx jsx
4
5
  */
5
-
6
6
  import { useCallback } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
- import { jsx } from '@emotion/react';
9
+ import { css, jsx } from '@emotion/react';
10
10
  import { injectIntl } from 'react-intl-next';
11
11
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
12
12
  import { addLink, getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
@@ -27,18 +27,24 @@ const PrimaryToolbarComponentWithIntl = ({
27
27
  var _api$core, _api$hyperlink;
28
28
  api === null || api === void 0 ? void 0 : (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute(api === null || api === void 0 ? void 0 : (_api$hyperlink = api.hyperlink) === null || _api$hyperlink === void 0 ? void 0 : _api$hyperlink.commands.showLinkToolbar(INPUT_METHOD.TOOLBAR));
29
29
  }, [api]);
30
- return jsx("div", null, jsx(ToolbarButton, {
30
+ return jsx(ToolbarButton
31
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
32
+ , {
33
+ css: buttonStyles,
31
34
  onClick: onClick,
32
35
  "aria-haspopup": "dialog",
33
36
  "aria-keyshortcuts": getAriaKeyshortcuts(addLink),
34
37
  "aria-label": content,
35
38
  testId: content,
36
- spacing: "default",
39
+ spacing: "none",
37
40
  title: content
38
41
  }, jsx(LinkIcon, {
39
42
  label: "",
40
43
  color: "currentColor",
41
44
  spacing: "none"
42
- })));
45
+ }));
43
46
  };
47
+ const buttonStyles = css({
48
+ padding: `${"var(--ds-space-075, 6px)"} ${"var(--ds-space-100, 8px)"}`
49
+ });
44
50
  export const PrimaryToolbarComponent = injectIntl(PrimaryToolbarComponentWithIntl);
@@ -1,12 +1,12 @@
1
+ /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation */
1
2
  /**
2
3
  * @jsxRuntime classic
3
4
  * @jsx jsx
4
5
  */
5
-
6
6
  import { useCallback } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
- import { jsx } from '@emotion/react';
9
+ import { css, jsx } from '@emotion/react';
10
10
  import { injectIntl } from 'react-intl-next';
11
11
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
12
12
  import { addLink, getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
@@ -22,18 +22,24 @@ var PrimaryToolbarComponentWithIntl = function PrimaryToolbarComponentWithIntl(_
22
22
  var _api$core, _api$hyperlink;
23
23
  api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$hyperlink = api.hyperlink) === null || _api$hyperlink === void 0 ? void 0 : _api$hyperlink.commands.showLinkToolbar(INPUT_METHOD.TOOLBAR));
24
24
  }, [api]);
25
- return jsx("div", null, jsx(ToolbarButton, {
25
+ return jsx(ToolbarButton
26
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
27
+ , {
28
+ css: buttonStyles,
26
29
  onClick: onClick,
27
30
  "aria-haspopup": "dialog",
28
31
  "aria-keyshortcuts": getAriaKeyshortcuts(addLink),
29
32
  "aria-label": content,
30
33
  testId: content,
31
- spacing: "default",
34
+ spacing: "none",
32
35
  title: content
33
36
  }, jsx(LinkIcon, {
34
37
  label: "",
35
38
  color: "currentColor",
36
39
  spacing: "none"
37
- })));
40
+ }));
38
41
  };
42
+ var buttonStyles = css({
43
+ padding: "var(--ds-space-075, 6px)".concat(" ", "var(--ds-space-100, 8px)")
44
+ });
39
45
  export var PrimaryToolbarComponent = injectIntl(PrimaryToolbarComponentWithIntl);
@@ -1,7 +1,3 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
1
  /// <reference types="react" />
6
2
  import type { WrappedComponentProps } from 'react-intl-next';
7
3
  import { type EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
@@ -1,8 +1,4 @@
1
1
  /// <reference types="react" />
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
6
2
  import type { WrappedComponentProps } from 'react-intl-next';
7
3
  import { type EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
8
4
  import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-hyperlink",
3
- "version": "4.0.3",
3
+ "version": "4.0.5",
4
4
  "description": "Hyperlink plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -25,7 +25,9 @@
25
25
  ]
26
26
  }
27
27
  },
28
- "sideEffects": false,
28
+ "sideEffects": [
29
+ "*.compiled.css"
30
+ ],
29
31
  "atlaskit:src": "src/index.ts",
30
32
  "af:exports": {
31
33
  ".": "./src/index.ts"
@@ -33,9 +35,9 @@
33
35
  "dependencies": {
34
36
  "@atlaskit/adf-schema": "^47.2.1",
35
37
  "@atlaskit/analytics-next": "^11.0.0",
36
- "@atlaskit/editor-common": "^100.2.0",
38
+ "@atlaskit/editor-common": "^100.4.0",
37
39
  "@atlaskit/editor-plugin-analytics": "^2.0.0",
38
- "@atlaskit/editor-plugin-card": "5.0.3",
40
+ "@atlaskit/editor-plugin-card": "5.0.5",
39
41
  "@atlaskit/editor-plugin-connectivity": "^2.0.0",
40
42
  "@atlaskit/editor-plugin-editor-viewmode": "^3.0.0",
41
43
  "@atlaskit/editor-plugin-primary-toolbar": "^3.0.0",
@@ -44,7 +46,7 @@
44
46
  "@atlaskit/icon": "^24.1.0",
45
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
46
48
  "@atlaskit/prosemirror-input-rules": "^3.3.0",
47
- "@atlaskit/tmp-editor-statsig": "^3.2.0",
49
+ "@atlaskit/tmp-editor-statsig": "^3.3.0",
48
50
  "@babel/runtime": "^7.0.0",
49
51
  "@emotion/react": "^11.7.1",
50
52
  "uuid": "^3.1.0"