@atlaskit/editor-plugin-guideline 1.2.18 → 1.2.20
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 +12 -0
- package/dist/cjs/guidelinePlugin.js +4 -1
- package/dist/cjs/ui/guidelineContainer.js +4 -2
- package/dist/es2019/guidelinePlugin.js +4 -1
- package/dist/es2019/index.js +3 -0
- package/dist/es2019/ui/guidelineContainer.js +3 -0
- package/dist/esm/guidelinePlugin.js +4 -1
- package/dist/esm/index.js +3 -0
- package/dist/esm/ui/guidelineContainer.js +4 -2
- package/dist/types/guidelinePlugin.d.ts +1 -1
- package/dist/types/guidelinePluginType.d.ts +1 -1
- package/dist/types/ui/guideline.d.ts +1 -1
- package/dist/types/ui/guidelineContainer.d.ts +1 -1
- package/dist/types/ui/positionStyles.d.ts +1 -1
- package/dist/types/ui/utils.d.ts +1 -1
- package/dist/types-ts4.5/guidelinePlugin.d.ts +1 -1
- package/dist/types-ts4.5/guidelinePluginType.d.ts +1 -1
- package/dist/types-ts4.5/ui/guideline.d.ts +1 -1
- package/dist/types-ts4.5/ui/guidelineContainer.d.ts +1 -1
- package/dist/types-ts4.5/ui/positionStyles.d.ts +1 -1
- package/dist/types-ts4.5/ui/utils.d.ts +1 -1
- package/package.json +4 -4
- package/dist/cjs/types/index.js +0 -1
- package/dist/es2019/types/index.js +0 -0
- package/dist/esm/types/index.js +0 -0
- package/dist/types/types/index.d.ts +0 -1
- package/dist/types-ts4.5/types/index.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -88,7 +88,10 @@ var ContentComponent = function ContentComponent(_ref) {
|
|
|
88
88
|
return (0, _react.jsx)("div", {
|
|
89
89
|
css: guidelineStyles
|
|
90
90
|
}, (0, _react.jsx)(_guidelineContainer.GuidelineContainer, {
|
|
91
|
-
guidelines: guidelineState.guidelines
|
|
91
|
+
guidelines: guidelineState.guidelines
|
|
92
|
+
// Ignored via go/ees005
|
|
93
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
94
|
+
,
|
|
92
95
|
height: editorView.dom.scrollHeight,
|
|
93
96
|
width: widthState.width,
|
|
94
97
|
editorWidth: widthState.lineLength,
|
|
@@ -31,7 +31,6 @@ var guidelineContainerStyles = (0, _react2.css)({
|
|
|
31
31
|
maxWidth: "".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px")
|
|
32
32
|
});
|
|
33
33
|
var GuidelineContainer = exports.GuidelineContainer = function GuidelineContainer(props) {
|
|
34
|
-
var _style;
|
|
35
34
|
var guidelines = props.guidelines,
|
|
36
35
|
height = props.height,
|
|
37
36
|
updateRect = props.updateRect;
|
|
@@ -56,7 +55,7 @@ var GuidelineContainer = exports.GuidelineContainer = function GuidelineContaine
|
|
|
56
55
|
});
|
|
57
56
|
}
|
|
58
57
|
}, [updateRect, offset]);
|
|
59
|
-
var style = (
|
|
58
|
+
var style = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants.VAR_POSITION_OFFSET_X, "".concat(offset, "px")), _constants.VAR_POSITION_OFFSET_Y, "0px"), "height", height);
|
|
60
59
|
return (0, _react2.jsx)("div", {
|
|
61
60
|
ref: ref,
|
|
62
61
|
css: guidelineContainerStyles
|
|
@@ -67,6 +66,9 @@ var GuidelineContainer = exports.GuidelineContainer = function GuidelineContaine
|
|
|
67
66
|
}, guidelines.map(function (guideline) {
|
|
68
67
|
var key = guideline.key,
|
|
69
68
|
guidelineProps = (0, _objectWithoutProperties2.default)(guideline, _excluded);
|
|
69
|
+
|
|
70
|
+
// Ignored via go/ees005
|
|
71
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
70
72
|
return (0, _react2.jsx)(_guideline.Guideline, (0, _extends2.default)({
|
|
71
73
|
key: key
|
|
72
74
|
}, guidelineProps));
|
|
@@ -89,7 +89,10 @@ const ContentComponent = ({
|
|
|
89
89
|
return jsx("div", {
|
|
90
90
|
css: guidelineStyles
|
|
91
91
|
}, jsx(GuidelineContainer, {
|
|
92
|
-
guidelines: guidelineState.guidelines
|
|
92
|
+
guidelines: guidelineState.guidelines
|
|
93
|
+
// Ignored via go/ees005
|
|
94
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
95
|
+
,
|
|
93
96
|
height: editorView.dom.scrollHeight,
|
|
94
97
|
width: widthState.width,
|
|
95
98
|
editorWidth: widthState.lineLength,
|
package/dist/es2019/index.js
CHANGED
|
@@ -83,7 +83,10 @@ var ContentComponent = function ContentComponent(_ref) {
|
|
|
83
83
|
return jsx("div", {
|
|
84
84
|
css: guidelineStyles
|
|
85
85
|
}, jsx(GuidelineContainer, {
|
|
86
|
-
guidelines: guidelineState.guidelines
|
|
86
|
+
guidelines: guidelineState.guidelines
|
|
87
|
+
// Ignored via go/ees005
|
|
88
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
89
|
+
,
|
|
87
90
|
height: editorView.dom.scrollHeight,
|
|
88
91
|
width: widthState.width,
|
|
89
92
|
editorWidth: widthState.lineLength,
|
package/dist/esm/index.js
CHANGED
|
@@ -25,7 +25,6 @@ var guidelineContainerStyles = css({
|
|
|
25
25
|
maxWidth: "".concat(akEditorFullWidthLayoutWidth, "px")
|
|
26
26
|
});
|
|
27
27
|
export var GuidelineContainer = function GuidelineContainer(props) {
|
|
28
|
-
var _style;
|
|
29
28
|
var guidelines = props.guidelines,
|
|
30
29
|
height = props.height,
|
|
31
30
|
updateRect = props.updateRect;
|
|
@@ -50,7 +49,7 @@ export var GuidelineContainer = function GuidelineContainer(props) {
|
|
|
50
49
|
});
|
|
51
50
|
}
|
|
52
51
|
}, [updateRect, offset]);
|
|
53
|
-
var style = (
|
|
52
|
+
var style = _defineProperty(_defineProperty(_defineProperty({}, VAR_POSITION_OFFSET_X, "".concat(offset, "px")), VAR_POSITION_OFFSET_Y, "0px"), "height", height);
|
|
54
53
|
return jsx("div", {
|
|
55
54
|
ref: ref,
|
|
56
55
|
css: guidelineContainerStyles
|
|
@@ -61,6 +60,9 @@ export var GuidelineContainer = function GuidelineContainer(props) {
|
|
|
61
60
|
}, guidelines.map(function (guideline) {
|
|
62
61
|
var key = guideline.key,
|
|
63
62
|
guidelineProps = _objectWithoutProperties(guideline, _excluded);
|
|
63
|
+
|
|
64
|
+
// Ignored via go/ees005
|
|
65
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
64
66
|
return jsx(Guideline, _extends({
|
|
65
67
|
key: key
|
|
66
68
|
}, guidelineProps));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { GuidelinePluginState } from '@atlaskit/editor-common/guideline';
|
|
1
2
|
import type { GuidelinePlugin } from './guidelinePluginType';
|
|
2
|
-
import type { GuidelinePluginState } from './types';
|
|
3
3
|
export declare const EMPTY_STATE: GuidelinePluginState;
|
|
4
4
|
/**
|
|
5
5
|
* Guideline plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { DisplayGuideline, GuidelinePluginState } from '@atlaskit/editor-common/guideline';
|
|
1
2
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
3
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
3
|
-
import type { DisplayGuideline, GuidelinePluginState } from './types';
|
|
4
4
|
export type GuidelinePlugin = NextEditorPlugin<'guideline', {
|
|
5
5
|
dependencies: [WidthPlugin];
|
|
6
6
|
sharedState: GuidelinePluginState | null;
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
|
-
import type { GuidelineConfig } from '
|
|
6
|
+
import type { GuidelineConfig } from '@atlaskit/editor-common/guideline';
|
|
7
7
|
export declare const Guideline: (props: Omit<GuidelineConfig, 'key'>) => jsx.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import type { GuidelineConfig, GuidelineContainerRect } from '
|
|
2
|
+
import type { GuidelineConfig, GuidelineContainerRect } from '@atlaskit/editor-common/guideline';
|
|
3
3
|
type ContainerProps = {
|
|
4
4
|
guidelines: GuidelineConfig[];
|
|
5
5
|
height: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
|
-
import { type Position } from '
|
|
2
|
+
import { type Position } from '@atlaskit/editor-common/guideline';
|
|
3
3
|
export declare const isNumber: (x: unknown) => x is number;
|
|
4
4
|
export declare const getPositionStyles: (pos: Position) => CSSProperties;
|
package/dist/types/ui/utils.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { GuidelineConfig } from '
|
|
1
|
+
import type { GuidelineConfig } from '@atlaskit/editor-common/guideline';
|
|
2
2
|
export declare const innerGuidelines: (editorContainerWidth: number, editorWidth?: number) => GuidelineConfig[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { GuidelinePluginState } from '@atlaskit/editor-common/guideline';
|
|
1
2
|
import type { GuidelinePlugin } from './guidelinePluginType';
|
|
2
|
-
import type { GuidelinePluginState } from './types';
|
|
3
3
|
export declare const EMPTY_STATE: GuidelinePluginState;
|
|
4
4
|
/**
|
|
5
5
|
* Guideline plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { DisplayGuideline, GuidelinePluginState } from '@atlaskit/editor-common/guideline';
|
|
1
2
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
3
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
3
|
-
import type { DisplayGuideline, GuidelinePluginState } from './types';
|
|
4
4
|
export type GuidelinePlugin = NextEditorPlugin<'guideline', {
|
|
5
5
|
dependencies: [
|
|
6
6
|
WidthPlugin
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
|
-
import type { GuidelineConfig } from '
|
|
6
|
+
import type { GuidelineConfig } from '@atlaskit/editor-common/guideline';
|
|
7
7
|
export declare const Guideline: (props: Omit<GuidelineConfig, 'key'>) => jsx.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import type { GuidelineConfig, GuidelineContainerRect } from '
|
|
2
|
+
import type { GuidelineConfig, GuidelineContainerRect } from '@atlaskit/editor-common/guideline';
|
|
3
3
|
type ContainerProps = {
|
|
4
4
|
guidelines: GuidelineConfig[];
|
|
5
5
|
height: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
|
-
import { type Position } from '
|
|
2
|
+
import { type Position } from '@atlaskit/editor-common/guideline';
|
|
3
3
|
export declare const isNumber: (x: unknown) => x is number;
|
|
4
4
|
export declare const getPositionStyles: (pos: Position) => CSSProperties;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { GuidelineConfig } from '
|
|
1
|
+
import type { GuidelineConfig } from '@atlaskit/editor-common/guideline';
|
|
2
2
|
export declare const innerGuidelines: (editorContainerWidth: number, editorWidth?: number) => GuidelineConfig[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-guideline",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.20",
|
|
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": "^
|
|
27
|
-
"@atlaskit/editor-plugin-width": "^
|
|
26
|
+
"@atlaskit/editor-common": "^97.2.0",
|
|
27
|
+
"@atlaskit/editor-plugin-width": "^2.0.0",
|
|
28
28
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
29
29
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
30
30
|
"@atlaskit/theme": "^14.0.0",
|
|
31
|
-
"@atlaskit/tokens": "^2.
|
|
31
|
+
"@atlaskit/tokens": "^2.5.0",
|
|
32
32
|
"@babel/runtime": "^7.0.0",
|
|
33
33
|
"@emotion/react": "^11.7.1"
|
|
34
34
|
},
|
package/dist/cjs/types/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
File without changes
|
package/dist/esm/types/index.js
DELETED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { WidthTypes, Position, VerticalPosition, HorizontalPosition, GuidelineConfig, GuidelineContainerRect, GuidelinePluginState, GuidelinePluginOptions, DisplayGuideline, DisplayGrid, } from '@atlaskit/editor-common/guideline';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { WidthTypes, Position, VerticalPosition, HorizontalPosition, GuidelineConfig, GuidelineContainerRect, GuidelinePluginState, GuidelinePluginOptions, DisplayGuideline, DisplayGrid, } from '@atlaskit/editor-common/guideline';
|