@atlaskit/editor-plugin-guideline 0.3.8 → 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,11 @@
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
+
3
9
  ## 0.3.8
4
10
 
5
11
  ### 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.8",
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.8",
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.8",
3
+ "version": "0.3.9",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-guideline",
3
- "version": "0.3.8",
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.33.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
  },