@atlaskit/editor-plugin-guideline 0.4.1 → 0.4.2
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 +30 -0
- package/dist/cjs/plugin.js +5 -3
- package/dist/es2019/plugin.js +4 -1
- package/dist/esm/plugin.js +5 -3
- package/package.json +3 -3
- package/tmp/api-report-tmp.d.ts +26 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-guideline
|
|
2
2
|
|
|
3
|
+
## 0.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8467bdcdf4f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8467bdcdf4f) - Removing `dependencies` prop from PluginInjectionAPI and changing
|
|
8
|
+
signature of `NextEditorPlugin`.
|
|
9
|
+
|
|
10
|
+
Previously a `NextEditorPlugin` would be consumed as so:
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
const plugin: NextEditorPlugin< ... > = (config, api) => {
|
|
14
|
+
// Can use api like so:
|
|
15
|
+
api.dependencies.core.actions.execute( ... )
|
|
16
|
+
return { ... }
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Now these have become named parameters like so and the `pluginInjectionAPI` is used
|
|
21
|
+
without the `dependencies` prop:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
const plugin: NextEditorPlugin< ... > = ({ config, api }) => {
|
|
25
|
+
// Can use api like so:
|
|
26
|
+
api.core.actions.execute( ... )
|
|
27
|
+
return { ... }
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
- Updated dependencies
|
|
32
|
+
|
|
3
33
|
## 0.4.1
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -92,7 +92,9 @@ var ContentComponent = function ContentComponent(_ref) {
|
|
|
92
92
|
updateRect: updateRect
|
|
93
93
|
}));
|
|
94
94
|
};
|
|
95
|
-
var guidelinePlugin = function guidelinePlugin(
|
|
95
|
+
var guidelinePlugin = function guidelinePlugin(_ref4) {
|
|
96
|
+
var options = _ref4.config,
|
|
97
|
+
api = _ref4.api;
|
|
96
98
|
return {
|
|
97
99
|
name: 'guideline',
|
|
98
100
|
getSharedState: function getSharedState(editorState) {
|
|
@@ -112,8 +114,8 @@ var guidelinePlugin = function guidelinePlugin(options, api) {
|
|
|
112
114
|
}
|
|
113
115
|
}];
|
|
114
116
|
},
|
|
115
|
-
contentComponent: function contentComponent(
|
|
116
|
-
var editorView =
|
|
117
|
+
contentComponent: function contentComponent(_ref5) {
|
|
118
|
+
var editorView = _ref5.editorView;
|
|
117
119
|
return (0, _react.jsx)(ContentComponent, {
|
|
118
120
|
editorView: editorView,
|
|
119
121
|
options: options,
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -91,7 +91,10 @@ const ContentComponent = ({
|
|
|
91
91
|
updateRect: updateRect
|
|
92
92
|
}));
|
|
93
93
|
};
|
|
94
|
-
export const guidelinePlugin = (
|
|
94
|
+
export const guidelinePlugin = ({
|
|
95
|
+
config: options,
|
|
96
|
+
api
|
|
97
|
+
}) => ({
|
|
95
98
|
name: 'guideline',
|
|
96
99
|
getSharedState(editorState) {
|
|
97
100
|
if (!editorState) {
|
package/dist/esm/plugin.js
CHANGED
|
@@ -85,7 +85,9 @@ var ContentComponent = function ContentComponent(_ref) {
|
|
|
85
85
|
updateRect: updateRect
|
|
86
86
|
}));
|
|
87
87
|
};
|
|
88
|
-
export var guidelinePlugin = function guidelinePlugin(
|
|
88
|
+
export var guidelinePlugin = function guidelinePlugin(_ref4) {
|
|
89
|
+
var options = _ref4.config,
|
|
90
|
+
api = _ref4.api;
|
|
89
91
|
return {
|
|
90
92
|
name: 'guideline',
|
|
91
93
|
getSharedState: function getSharedState(editorState) {
|
|
@@ -105,8 +107,8 @@ export var guidelinePlugin = function guidelinePlugin(options, api) {
|
|
|
105
107
|
}
|
|
106
108
|
}];
|
|
107
109
|
},
|
|
108
|
-
contentComponent: function contentComponent(
|
|
109
|
-
var editorView =
|
|
110
|
+
contentComponent: function contentComponent(_ref5) {
|
|
111
|
+
var editorView = _ref5.editorView;
|
|
110
112
|
return jsx(ContentComponent, {
|
|
111
113
|
editorView: editorView,
|
|
112
114
|
options: options,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-guideline",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
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.
|
|
26
|
+
"@atlaskit/editor-common": "^74.53.0",
|
|
27
27
|
"@atlaskit/editor-plugin-width": "^0.1.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.17.0",
|
|
32
32
|
"@babel/runtime": "^7.0.0",
|
|
33
33
|
"@emotion/react": "^11.7.1"
|
|
34
34
|
},
|
|
@@ -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 (undocumented)
|
|
22
|
+
export const guidelinePlugin: GuidelinePlugin;
|
|
23
|
+
|
|
24
|
+
// (No @packageDocumentation comment for this package)
|
|
25
|
+
|
|
26
|
+
```
|