@atlaskit/editor-plugin-guideline 0.3.7 → 0.3.9

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,18 @@
1
1
  # @atlaskit/editor-plugin-guideline
2
2
 
3
+ ## 0.3.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`75fe8860154`](https://bitbucket.org/atlassian/atlassian-frontend/commits/75fe8860154) - Update styles of guidelines so they align correctly
8
+
9
+ ## 0.3.8
10
+
11
+ ### Patch Changes
12
+
13
+ - [`936c30f8dc9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/936c30f8dc9) - support new image resize experience under feature flag
14
+ - Updated dependencies
15
+
3
16
  ## 0.3.7
4
17
 
5
18
  ### Patch Changes
@@ -23,14 +23,12 @@ var basicGuidelineStyles = (0, _react.css)({
23
23
  var verticalStyles = (0, _react.css)({
24
24
  borderWidth: "0 0 0 1px",
25
25
  width: '1px',
26
- height: '100%',
27
- transform: 'translateX(-50%)'
26
+ height: '100%'
28
27
  });
29
28
  var horizontalStyles = (0, _react.css)({
30
29
  borderWidth: "1px 0 0 0",
31
30
  width: '100%',
32
- height: '1px',
33
- transform: 'translateY(-50%)'
31
+ height: '1px'
34
32
  });
35
33
  var activeGuidelineStyles = (0, _react.css)({
36
34
  borderColor: "var(--ds-border-focused, ".concat(_colors.B200, ")"),
package/dist/cjs/utils.js CHANGED
@@ -15,7 +15,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
15
15
  */
16
16
  var getEditorCenterX = function getEditorCenterX(editorView) {
17
17
  var editorRect = editorView.dom.getBoundingClientRect();
18
- return editorRect.width / 2 + editorRect.x;
18
+ return Math.round(editorRect.width / 2 + editorRect.x);
19
19
  };
20
20
  exports.getEditorCenterX = getEditorCenterX;
21
21
  var defaultGrids = [-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6];
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-guideline",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "sideEffects": false
5
5
  }
@@ -14,14 +14,12 @@ const basicGuidelineStyles = css({
14
14
  const verticalStyles = css({
15
15
  borderWidth: `0 0 0 1px`,
16
16
  width: '1px',
17
- height: '100%',
18
- transform: 'translateX(-50%)'
17
+ height: '100%'
19
18
  });
20
19
  const horizontalStyles = css({
21
20
  borderWidth: `1px 0 0 0`,
22
21
  width: '100%',
23
- height: '1px',
24
- transform: 'translateY(-50%)'
22
+ height: '1px'
25
23
  });
26
24
  const activeGuidelineStyles = css({
27
25
  borderColor: `var(--ds-border-focused, ${B200})`,
@@ -7,7 +7,7 @@ import { akEditorBreakoutPadding, akEditorDefaultLayoutWidth, akEditorFullWidthL
7
7
  */
8
8
  export const getEditorCenterX = editorView => {
9
9
  const editorRect = editorView.dom.getBoundingClientRect();
10
- return editorRect.width / 2 + editorRect.x;
10
+ return Math.round(editorRect.width / 2 + editorRect.x);
11
11
  };
12
12
  const defaultGrids = [-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6];
13
13
  export const innerGuidelines = (editorContainerWidth, editorWidth = akEditorDefaultLayoutWidth) => {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-guideline",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "sideEffects": false
5
5
  }
@@ -17,14 +17,12 @@ var basicGuidelineStyles = css({
17
17
  var verticalStyles = css({
18
18
  borderWidth: "0 0 0 1px",
19
19
  width: '1px',
20
- height: '100%',
21
- transform: 'translateX(-50%)'
20
+ height: '100%'
22
21
  });
23
22
  var horizontalStyles = css({
24
23
  borderWidth: "1px 0 0 0",
25
24
  width: '100%',
26
- height: '1px',
27
- transform: 'translateY(-50%)'
25
+ height: '1px'
28
26
  });
29
27
  var activeGuidelineStyles = css({
30
28
  borderColor: "var(--ds-border-focused, ".concat(B200, ")"),
package/dist/esm/utils.js CHANGED
@@ -8,7 +8,7 @@ import { akEditorBreakoutPadding, akEditorDefaultLayoutWidth, akEditorFullWidthL
8
8
  */
9
9
  export var getEditorCenterX = function getEditorCenterX(editorView) {
10
10
  var editorRect = editorView.dom.getBoundingClientRect();
11
- return editorRect.width / 2 + editorRect.x;
11
+ return Math.round(editorRect.width / 2 + editorRect.x);
12
12
  };
13
13
  var defaultGrids = [-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6];
14
14
  export var innerGuidelines = function innerGuidelines(editorContainerWidth) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-guideline",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "sideEffects": false
5
5
  }
@@ -1,2 +1 @@
1
1
  export { guidelinePlugin } from './plugin';
2
- export type { GuidelineConfig } from './types';
@@ -1,2 +1 @@
1
1
  export { guidelinePlugin } from './plugin';
2
- export type { GuidelineConfig } from './types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-guideline",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "description": "guideline plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -23,12 +23,12 @@
23
23
  ".": "./src/index.ts"
24
24
  },
25
25
  "dependencies": {
26
- "@atlaskit/editor-common": "^74.29.0",
26
+ "@atlaskit/editor-common": "^74.34.0",
27
27
  "@atlaskit/editor-plugin-width": "^0.1.0",
28
28
  "@atlaskit/editor-prosemirror": "1.0.2",
29
29
  "@atlaskit/editor-shared-styles": "^2.5.0",
30
30
  "@atlaskit/theme": "^12.5.0",
31
- "@atlaskit/tokens": "^1.13.0",
31
+ "@atlaskit/tokens": "^1.14.0",
32
32
  "@babel/runtime": "^7.0.0",
33
33
  "@emotion/react": "^11.7.1"
34
34
  },
package/report.api.md CHANGED
@@ -16,13 +16,10 @@
16
16
 
17
17
  ```ts
18
18
  import { DisplayGuideline } from '@atlaskit/editor-common/guideline';
19
- import { GuidelineConfig } from '@atlaskit/editor-common/guideline';
20
19
  import { GuidelinePluginState } from '@atlaskit/editor-common/guideline';
21
20
  import { NextEditorPlugin } from '@atlaskit/editor-common/types';
22
21
  import type { widthPlugin } from '@atlaskit/editor-plugin-width';
23
22
 
24
- export { GuidelineConfig };
25
-
26
23
  // @public (undocumented)
27
24
  export const guidelinePlugin: NextEditorPlugin<
28
25
  'guideline',
@@ -5,13 +5,10 @@
5
5
  ```ts
6
6
 
7
7
  import { DisplayGuideline } from '@atlaskit/editor-common/guideline';
8
- import { GuidelineConfig } from '@atlaskit/editor-common/guideline';
9
8
  import { GuidelinePluginState } from '@atlaskit/editor-common/guideline';
10
9
  import { NextEditorPlugin } from '@atlaskit/editor-common/types';
11
10
  import type { widthPlugin } from '@atlaskit/editor-plugin-width';
12
11
 
13
- export { GuidelineConfig }
14
-
15
12
  // @public (undocumented)
16
13
  export const guidelinePlugin: NextEditorPlugin<'guideline', {
17
14
  dependencies: [typeof widthPlugin];