@atlaskit/editor-plugin-grid 0.1.5 → 0.1.7
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 +36 -0
- package/dist/cjs/plugin.js +5 -3
- package/dist/es2019/plugin.js +4 -1
- package/dist/esm/plugin.js +5 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/plugin.d.ts +6 -5
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/plugin.d.ts +6 -5
- package/package.json +2 -3
- package/report.api.md +8 -5
- package/tmp/api-report-tmp.d.ts +8 -5
- package/dist/cjs/version.json +0 -5
- package/dist/es2019/version.json +0 -5
- package/dist/esm/version.json +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-grid
|
|
2
2
|
|
|
3
|
+
## 0.1.7
|
|
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
|
+
|
|
33
|
+
## 0.1.6
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- [`24e27147cbd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/24e27147cbd) - Added atlaskit docs to all existing plugins.
|
|
38
|
+
|
|
3
39
|
## 0.1.5
|
|
4
40
|
|
|
5
41
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -143,7 +143,9 @@ var gridPMPlugin = new _safePlugin.SafePlugin({
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
|
-
var gridPlugin = function gridPlugin(
|
|
146
|
+
var gridPlugin = function gridPlugin(_ref5) {
|
|
147
|
+
var options = _ref5.config,
|
|
148
|
+
api = _ref5.api;
|
|
147
149
|
return {
|
|
148
150
|
name: 'grid',
|
|
149
151
|
getSharedState: function getSharedState(editorState) {
|
|
@@ -163,8 +165,8 @@ var gridPlugin = function gridPlugin(options, api) {
|
|
|
163
165
|
}
|
|
164
166
|
}];
|
|
165
167
|
},
|
|
166
|
-
contentComponent: function contentComponent(
|
|
167
|
-
var editorView =
|
|
168
|
+
contentComponent: function contentComponent(_ref6) {
|
|
169
|
+
var editorView = _ref6.editorView;
|
|
168
170
|
return /*#__PURE__*/_react.default.createElement(ContentComponent, {
|
|
169
171
|
editorView: editorView,
|
|
170
172
|
options: options,
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -134,7 +134,10 @@ const gridPMPlugin = new SafePlugin({
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
|
-
export const gridPlugin = (
|
|
137
|
+
export const gridPlugin = ({
|
|
138
|
+
config: options,
|
|
139
|
+
api
|
|
140
|
+
}) => {
|
|
138
141
|
return {
|
|
139
142
|
name: 'grid',
|
|
140
143
|
getSharedState(editorState) {
|
package/dist/esm/plugin.js
CHANGED
|
@@ -135,7 +135,9 @@ var gridPMPlugin = new SafePlugin({
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
|
-
export var gridPlugin = function gridPlugin(
|
|
138
|
+
export var gridPlugin = function gridPlugin(_ref5) {
|
|
139
|
+
var options = _ref5.config,
|
|
140
|
+
api = _ref5.api;
|
|
139
141
|
return {
|
|
140
142
|
name: 'grid',
|
|
141
143
|
getSharedState: function getSharedState(editorState) {
|
|
@@ -155,8 +157,8 @@ export var gridPlugin = function gridPlugin(options, api) {
|
|
|
155
157
|
}
|
|
156
158
|
}];
|
|
157
159
|
},
|
|
158
|
-
contentComponent: function contentComponent(
|
|
159
|
-
var editorView =
|
|
160
|
+
contentComponent: function contentComponent(_ref6) {
|
|
161
|
+
var editorView = _ref6.editorView;
|
|
160
162
|
return /*#__PURE__*/React.createElement(ContentComponent, {
|
|
161
163
|
editorView: editorView,
|
|
162
164
|
options: options,
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/plugin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type {
|
|
3
|
-
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
1
|
+
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
3
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { GridPluginState } from './types';
|
|
5
5
|
export declare const GRID_SIZE = 12;
|
|
6
6
|
type Required<T> = {
|
|
@@ -11,12 +11,13 @@ type CreateDisplayGrid = (view: EditorView) => DisplayGrid;
|
|
|
11
11
|
export interface GridPluginOptions {
|
|
12
12
|
shouldCalcBreakoutGridLines?: boolean;
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type GridPlugin = NextEditorPlugin<'grid', {
|
|
15
15
|
pluginConfiguration: GridPluginOptions | undefined;
|
|
16
|
-
dependencies: [
|
|
16
|
+
dependencies: [WidthPlugin];
|
|
17
17
|
sharedState: GridPluginState | null;
|
|
18
18
|
actions: {
|
|
19
19
|
displayGrid: CreateDisplayGrid;
|
|
20
20
|
};
|
|
21
21
|
}>;
|
|
22
|
+
export declare const gridPlugin: GridPlugin;
|
|
22
23
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type {
|
|
3
|
-
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
1
|
+
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
3
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { GridPluginState } from './types';
|
|
5
5
|
export declare const GRID_SIZE = 12;
|
|
6
6
|
type Required<T> = {
|
|
@@ -11,14 +11,15 @@ type CreateDisplayGrid = (view: EditorView) => DisplayGrid;
|
|
|
11
11
|
export interface GridPluginOptions {
|
|
12
12
|
shouldCalcBreakoutGridLines?: boolean;
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type GridPlugin = NextEditorPlugin<'grid', {
|
|
15
15
|
pluginConfiguration: GridPluginOptions | undefined;
|
|
16
16
|
dependencies: [
|
|
17
|
-
|
|
17
|
+
WidthPlugin
|
|
18
18
|
];
|
|
19
19
|
sharedState: GridPluginState | null;
|
|
20
20
|
actions: {
|
|
21
21
|
displayGrid: CreateDisplayGrid;
|
|
22
22
|
};
|
|
23
23
|
}>;
|
|
24
|
+
export declare const gridPlugin: GridPlugin;
|
|
24
25
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-grid",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Grid plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -23,7 +23,7 @@
|
|
|
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",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"react": "^16.8.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@atlaskit/editor-test-helpers": "^18.10.0",
|
|
39
38
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
40
39
|
"@testing-library/react": "^12.1.5",
|
|
41
40
|
"react-dom": "^16.8.0",
|
package/report.api.md
CHANGED
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
<!--SECTION START: Main Entry Types-->
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
|
-
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
18
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
19
19
|
import type { GridType } from '@atlaskit/editor-common/types';
|
|
20
|
-
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
21
|
-
import type {
|
|
20
|
+
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
21
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
22
22
|
|
|
23
23
|
// @public (undocumented)
|
|
24
24
|
type CreateDisplayGrid = (view: EditorView) => DisplayGrid;
|
|
@@ -27,11 +27,11 @@ type CreateDisplayGrid = (view: EditorView) => DisplayGrid;
|
|
|
27
27
|
type DisplayGrid = (props: Required_2<GridPluginState>) => boolean;
|
|
28
28
|
|
|
29
29
|
// @public (undocumented)
|
|
30
|
-
export
|
|
30
|
+
export type GridPlugin = NextEditorPlugin<
|
|
31
31
|
'grid',
|
|
32
32
|
{
|
|
33
33
|
pluginConfiguration: GridPluginOptions | undefined;
|
|
34
|
-
dependencies: [
|
|
34
|
+
dependencies: [WidthPlugin];
|
|
35
35
|
sharedState: GridPluginState | null;
|
|
36
36
|
actions: {
|
|
37
37
|
displayGrid: CreateDisplayGrid;
|
|
@@ -39,6 +39,9 @@ export const gridPlugin: NextEditorPlugin<
|
|
|
39
39
|
}
|
|
40
40
|
>;
|
|
41
41
|
|
|
42
|
+
// @public (undocumented)
|
|
43
|
+
export const gridPlugin: GridPlugin;
|
|
44
|
+
|
|
42
45
|
// @public (undocumented)
|
|
43
46
|
interface GridPluginOptions {
|
|
44
47
|
// (undocumented)
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
|
-
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
import type { GridType } from '@atlaskit/editor-common/types';
|
|
9
|
-
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
10
|
-
import type {
|
|
9
|
+
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
10
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
11
11
|
|
|
12
12
|
// @public (undocumented)
|
|
13
13
|
type CreateDisplayGrid = (view: EditorView) => DisplayGrid;
|
|
@@ -16,15 +16,18 @@ type CreateDisplayGrid = (view: EditorView) => DisplayGrid;
|
|
|
16
16
|
type DisplayGrid = (props: Required_2<GridPluginState>) => boolean;
|
|
17
17
|
|
|
18
18
|
// @public (undocumented)
|
|
19
|
-
export
|
|
19
|
+
export type GridPlugin = NextEditorPlugin<'grid', {
|
|
20
20
|
pluginConfiguration: GridPluginOptions | undefined;
|
|
21
|
-
dependencies: [
|
|
21
|
+
dependencies: [WidthPlugin];
|
|
22
22
|
sharedState: GridPluginState | null;
|
|
23
23
|
actions: {
|
|
24
24
|
displayGrid: CreateDisplayGrid;
|
|
25
25
|
};
|
|
26
26
|
}>;
|
|
27
27
|
|
|
28
|
+
// @public (undocumented)
|
|
29
|
+
export const gridPlugin: GridPlugin;
|
|
30
|
+
|
|
28
31
|
// @public (undocumented)
|
|
29
32
|
interface GridPluginOptions {
|
|
30
33
|
// (undocumented)
|
package/dist/cjs/version.json
DELETED
package/dist/es2019/version.json
DELETED