@atlaskit/editor-plugin-guideline 0.4.1 → 0.5.0
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 +40 -0
- package/dist/cjs/guideline.js +2 -2
- package/dist/cjs/plugin.js +11 -5
- package/dist/es2019/plugin.js +8 -1
- package/dist/esm/guideline.js +2 -2
- package/dist/esm/plugin.js +11 -5
- package/dist/types/plugin.d.ts +4 -0
- package/dist/types-ts4.5/plugin.d.ts +4 -0
- package/package.json +5 -5
- package/report.api.md +1 -1
- package/tmp/api-report-tmp.d.ts +26 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-guideline
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`ad3c5c21079`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ad3c5c21079) - Updating all plugins with minor version to correct issue with semver.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 0.4.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`8467bdcdf4f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8467bdcdf4f) - Removing `dependencies` prop from PluginInjectionAPI and changing
|
|
18
|
+
signature of `NextEditorPlugin`.
|
|
19
|
+
|
|
20
|
+
Previously a `NextEditorPlugin` would be consumed as so:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
const plugin: NextEditorPlugin< ... > = (config, api) => {
|
|
24
|
+
// Can use api like so:
|
|
25
|
+
api.dependencies.core.actions.execute( ... )
|
|
26
|
+
return { ... }
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Now these have become named parameters like so and the `pluginInjectionAPI` is used
|
|
31
|
+
without the `dependencies` prop:
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
const plugin: NextEditorPlugin< ... > = ({ config, api }) => {
|
|
35
|
+
// Can use api like so:
|
|
36
|
+
api.core.actions.execute( ... )
|
|
37
|
+
return { ... }
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- Updated dependencies
|
|
42
|
+
|
|
3
43
|
## 0.4.1
|
|
4
44
|
|
|
5
45
|
### Patch Changes
|
package/dist/cjs/guideline.js
CHANGED
|
@@ -10,8 +10,8 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
var _guideline = require("@atlaskit/editor-common/guideline");
|
|
11
11
|
var _colors = require("@atlaskit/theme/colors");
|
|
12
12
|
var _positionStyles = require("./positionStyles");
|
|
13
|
-
function ownKeys(
|
|
14
|
-
function _objectSpread(
|
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** @jsx jsx */
|
|
15
15
|
var basicGuidelineStyles = (0, _react.css)({
|
|
16
16
|
position: 'absolute',
|
|
17
17
|
zIndex: 0,
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -12,8 +12,8 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
12
12
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
13
13
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
14
14
|
var _guidelineContainer = require("./guidelineContainer");
|
|
15
|
-
function ownKeys(
|
|
16
|
-
function _objectSpread(
|
|
15
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** @jsx jsx */
|
|
17
17
|
var guidelineStyles = (0, _react.css)({
|
|
18
18
|
position: 'absolute',
|
|
19
19
|
width: '100%',
|
|
@@ -92,7 +92,13 @@ var ContentComponent = function ContentComponent(_ref) {
|
|
|
92
92
|
updateRect: updateRect
|
|
93
93
|
}));
|
|
94
94
|
};
|
|
95
|
-
|
|
95
|
+
/**
|
|
96
|
+
* Guideline plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
|
|
97
|
+
* from `@atlaskit/editor-core`.
|
|
98
|
+
*/
|
|
99
|
+
var guidelinePlugin = function guidelinePlugin(_ref4) {
|
|
100
|
+
var options = _ref4.config,
|
|
101
|
+
api = _ref4.api;
|
|
96
102
|
return {
|
|
97
103
|
name: 'guideline',
|
|
98
104
|
getSharedState: function getSharedState(editorState) {
|
|
@@ -112,8 +118,8 @@ var guidelinePlugin = function guidelinePlugin(options, api) {
|
|
|
112
118
|
}
|
|
113
119
|
}];
|
|
114
120
|
},
|
|
115
|
-
contentComponent: function contentComponent(
|
|
116
|
-
var editorView =
|
|
121
|
+
contentComponent: function contentComponent(_ref5) {
|
|
122
|
+
var editorView = _ref5.editorView;
|
|
117
123
|
return (0, _react.jsx)(ContentComponent, {
|
|
118
124
|
editorView: editorView,
|
|
119
125
|
options: options,
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -91,7 +91,14 @@ const ContentComponent = ({
|
|
|
91
91
|
updateRect: updateRect
|
|
92
92
|
}));
|
|
93
93
|
};
|
|
94
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Guideline plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
|
|
96
|
+
* from `@atlaskit/editor-core`.
|
|
97
|
+
*/
|
|
98
|
+
export const guidelinePlugin = ({
|
|
99
|
+
config: options,
|
|
100
|
+
api
|
|
101
|
+
}) => ({
|
|
95
102
|
name: 'guideline',
|
|
96
103
|
getSharedState(editorState) {
|
|
97
104
|
if (!editorState) {
|
package/dist/esm/guideline.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import { isVerticalPosition } from '@atlaskit/editor-common/guideline';
|
package/dist/esm/plugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
@@ -85,7 +85,13 @@ var ContentComponent = function ContentComponent(_ref) {
|
|
|
85
85
|
updateRect: updateRect
|
|
86
86
|
}));
|
|
87
87
|
};
|
|
88
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Guideline plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
|
|
90
|
+
* from `@atlaskit/editor-core`.
|
|
91
|
+
*/
|
|
92
|
+
export var guidelinePlugin = function guidelinePlugin(_ref4) {
|
|
93
|
+
var options = _ref4.config,
|
|
94
|
+
api = _ref4.api;
|
|
89
95
|
return {
|
|
90
96
|
name: 'guideline',
|
|
91
97
|
getSharedState: function getSharedState(editorState) {
|
|
@@ -105,8 +111,8 @@ export var guidelinePlugin = function guidelinePlugin(options, api) {
|
|
|
105
111
|
}
|
|
106
112
|
}];
|
|
107
113
|
},
|
|
108
|
-
contentComponent: function contentComponent(
|
|
109
|
-
var editorView =
|
|
114
|
+
contentComponent: function contentComponent(_ref5) {
|
|
115
|
+
var editorView = _ref5.editorView;
|
|
110
116
|
return jsx(ContentComponent, {
|
|
111
117
|
editorView: editorView,
|
|
112
118
|
options: options,
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -9,4 +9,8 @@ export type GuidelinePlugin = NextEditorPlugin<'guideline', {
|
|
|
9
9
|
displayGuideline: DisplayGuideline;
|
|
10
10
|
};
|
|
11
11
|
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Guideline plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
|
|
14
|
+
* from `@atlaskit/editor-core`.
|
|
15
|
+
*/
|
|
12
16
|
export declare const guidelinePlugin: GuidelinePlugin;
|
|
@@ -11,4 +11,8 @@ export type GuidelinePlugin = NextEditorPlugin<'guideline', {
|
|
|
11
11
|
displayGuideline: DisplayGuideline;
|
|
12
12
|
};
|
|
13
13
|
}>;
|
|
14
|
+
/**
|
|
15
|
+
* Guideline plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
|
|
16
|
+
* from `@atlaskit/editor-core`.
|
|
17
|
+
*/
|
|
14
18
|
export declare const guidelinePlugin: GuidelinePlugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-guideline",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "guideline plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"registry": "https://registry.npmjs.org/"
|
|
9
9
|
},
|
|
10
10
|
"atlassian": {
|
|
11
|
-
"team": "Editor Media Experience
|
|
11
|
+
"team": "Editor: Media Experience Porygon",
|
|
12
12
|
"singleton": true,
|
|
13
13
|
"releaseModel": "continuous"
|
|
14
14
|
},
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
".": "./src/index.ts"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@atlaskit/editor-common": "^74.
|
|
27
|
-
"@atlaskit/editor-plugin-width": "^0.
|
|
26
|
+
"@atlaskit/editor-common": "^74.55.0",
|
|
27
|
+
"@atlaskit/editor-plugin-width": "^0.2.0",
|
|
28
28
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
29
29
|
"@atlaskit/editor-shared-styles": "^2.6.0",
|
|
30
30
|
"@atlaskit/theme": "^12.5.0",
|
|
31
|
-
"@atlaskit/tokens": "^1.
|
|
31
|
+
"@atlaskit/tokens": "^1.18.0",
|
|
32
32
|
"@babel/runtime": "^7.0.0",
|
|
33
33
|
"@emotion/react": "^11.7.1"
|
|
34
34
|
},
|
package/report.api.md
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/editor-plugin-guideline"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { DisplayGuideline } from '@atlaskit/editor-common/guideline';
|
|
8
|
+
import { GuidelinePluginState } from '@atlaskit/editor-common/guideline';
|
|
9
|
+
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
10
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
11
|
+
|
|
12
|
+
// @public (undocumented)
|
|
13
|
+
export type GuidelinePlugin = NextEditorPlugin<'guideline', {
|
|
14
|
+
dependencies: [WidthPlugin];
|
|
15
|
+
sharedState: GuidelinePluginState | null;
|
|
16
|
+
actions: {
|
|
17
|
+
displayGuideline: DisplayGuideline;
|
|
18
|
+
};
|
|
19
|
+
}>;
|
|
20
|
+
|
|
21
|
+
// @public
|
|
22
|
+
export const guidelinePlugin: GuidelinePlugin;
|
|
23
|
+
|
|
24
|
+
// (No @packageDocumentation comment for this package)
|
|
25
|
+
|
|
26
|
+
```
|