@atlaskit/editor-plugin-grid 0.1.6 → 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 CHANGED
@@ -1,5 +1,35 @@
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
+
3
33
  ## 0.1.6
4
34
 
5
35
  ### Patch Changes
@@ -143,7 +143,9 @@ var gridPMPlugin = new _safePlugin.SafePlugin({
143
143
  }
144
144
  }
145
145
  });
146
- var gridPlugin = function gridPlugin(options, api) {
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(_ref5) {
167
- var editorView = _ref5.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,
@@ -134,7 +134,10 @@ const gridPMPlugin = new SafePlugin({
134
134
  }
135
135
  }
136
136
  });
137
- export const gridPlugin = (options, api) => {
137
+ export const gridPlugin = ({
138
+ config: options,
139
+ api
140
+ }) => {
138
141
  return {
139
142
  name: 'grid',
140
143
  getSharedState(editorState) {
@@ -135,7 +135,9 @@ var gridPMPlugin = new SafePlugin({
135
135
  }
136
136
  }
137
137
  });
138
- export var gridPlugin = function gridPlugin(options, api) {
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(_ref5) {
159
- var editorView = _ref5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-grid",
3
- "version": "0.1.6",
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.52.0",
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",
@@ -0,0 +1,54 @@
1
+ ## API Report File for "@atlaskit/editor-plugin-grid"
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 type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
+ import type { GridType } from '@atlaskit/editor-common/types';
9
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
10
+ import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
11
+
12
+ // @public (undocumented)
13
+ type CreateDisplayGrid = (view: EditorView) => DisplayGrid;
14
+
15
+ // @public (undocumented)
16
+ type DisplayGrid = (props: Required_2<GridPluginState>) => boolean;
17
+
18
+ // @public (undocumented)
19
+ export type GridPlugin = NextEditorPlugin<'grid', {
20
+ pluginConfiguration: GridPluginOptions | undefined;
21
+ dependencies: [WidthPlugin];
22
+ sharedState: GridPluginState | null;
23
+ actions: {
24
+ displayGrid: CreateDisplayGrid;
25
+ };
26
+ }>;
27
+
28
+ // @public (undocumented)
29
+ export const gridPlugin: GridPlugin;
30
+
31
+ // @public (undocumented)
32
+ interface GridPluginOptions {
33
+ // (undocumented)
34
+ shouldCalcBreakoutGridLines?: boolean;
35
+ }
36
+
37
+ // @public (undocumented)
38
+ type GridPluginState = {
39
+ visible: boolean;
40
+ gridType?: GridType;
41
+ highlight: Highlights;
42
+ };
43
+
44
+ // @public (undocumented)
45
+ export type Highlights = Array<'full-width' | 'wide' | number>;
46
+
47
+ // @public (undocumented)
48
+ type Required_2<T> = {
49
+ [P in keyof T]-?: T[P];
50
+ };
51
+
52
+ // (No @packageDocumentation comment for this package)
53
+
54
+ ```