@atlaskit/editor-plugin-grid 0.1.6 → 0.2.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 CHANGED
@@ -1,5 +1,45 @@
1
1
  # @atlaskit/editor-plugin-grid
2
2
 
3
+ ## 0.2.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.1.7
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.1.6
4
44
 
5
45
  ### Patch Changes
package/README.md CHANGED
@@ -1,7 +1,30 @@
1
- # EditorPluginGrid
1
+ # Editor plugin grid
2
2
 
3
3
  Grid plugin for @atlaskit/editor-core
4
4
 
5
+ **Note:** This component is designed for internal Atlassian development.
6
+ External contributors will be able to use this component but will not be able to submit issues.
7
+
8
+ ## Install
9
+ ---
10
+ - **Install** - *yarn add @atlaskit/editor-plugin-grid*
11
+ - **npm** - [@atlaskit/editor-plugin-grid](https://www.npmjs.com/package/@atlaskit/editor-plugin-grid)
12
+ - **Source** - [Bitbucket](https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/editor/editor-plugin-grid)
13
+ - **Bundle** - [unpkg.com](https://unpkg.com/@atlaskit/editor-plugin-grid/dist/)
14
+
5
15
  ## Usage
16
+ ---
17
+ **Internal use only**
18
+
19
+ @atlaskit/editor-plugin-grid is intended for internal use by the @atlaskit/editor-core and as a plugin dependency of the Editor within your product.
20
+
21
+ Direct use of this component is not supported.
22
+
23
+ Please see [Atlaskit - Editor plugin grid](https://atlaskit.atlassian.com/packages/editor/editor-plugin-grid) for documentation and examples for this package.
6
24
 
7
- `import { gridPlugin } from '@atlaskit/editor-plugin-grid';`
25
+ ## Support
26
+ ---
27
+ For internal Atlassian, visit the slack channel [#help-editor](https://atlassian.slack.com/archives/CFG3PSQ9E) for support or visit [go/editor-help](https://go/editor-help) to submit a bug.
28
+ ## License
29
+ ---
30
+ Please see [Atlassian Frontend - License](https://developer.atlassian.com/cloud/framework/atlassian-frontend/#license) for more licensing information.
@@ -143,7 +143,13 @@ var gridPMPlugin = new _safePlugin.SafePlugin({
143
143
  }
144
144
  }
145
145
  });
146
- var gridPlugin = function gridPlugin(options, api) {
146
+ /**
147
+ * Grid plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
148
+ * from `@atlaskit/editor-core`.
149
+ */
150
+ var gridPlugin = function gridPlugin(_ref5) {
151
+ var options = _ref5.config,
152
+ api = _ref5.api;
147
153
  return {
148
154
  name: 'grid',
149
155
  getSharedState: function getSharedState(editorState) {
@@ -163,8 +169,8 @@ var gridPlugin = function gridPlugin(options, api) {
163
169
  }
164
170
  }];
165
171
  },
166
- contentComponent: function contentComponent(_ref5) {
167
- var editorView = _ref5.editorView;
172
+ contentComponent: function contentComponent(_ref6) {
173
+ var editorView = _ref6.editorView;
168
174
  return /*#__PURE__*/_react.default.createElement(ContentComponent, {
169
175
  editorView: editorView,
170
176
  options: options,
@@ -134,7 +134,14 @@ const gridPMPlugin = new SafePlugin({
134
134
  }
135
135
  }
136
136
  });
137
- export const gridPlugin = (options, api) => {
137
+ /**
138
+ * Grid plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
139
+ * from `@atlaskit/editor-core`.
140
+ */
141
+ export const gridPlugin = ({
142
+ config: options,
143
+ api
144
+ }) => {
138
145
  return {
139
146
  name: 'grid',
140
147
  getSharedState(editorState) {
@@ -135,7 +135,13 @@ var gridPMPlugin = new SafePlugin({
135
135
  }
136
136
  }
137
137
  });
138
- export var gridPlugin = function gridPlugin(options, api) {
138
+ /**
139
+ * Grid plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
140
+ * from `@atlaskit/editor-core`.
141
+ */
142
+ export var gridPlugin = function gridPlugin(_ref5) {
143
+ var options = _ref5.config,
144
+ api = _ref5.api;
139
145
  return {
140
146
  name: 'grid',
141
147
  getSharedState: function getSharedState(editorState) {
@@ -155,8 +161,8 @@ export var gridPlugin = function gridPlugin(options, api) {
155
161
  }
156
162
  }];
157
163
  },
158
- contentComponent: function contentComponent(_ref5) {
159
- var editorView = _ref5.editorView;
164
+ contentComponent: function contentComponent(_ref6) {
165
+ var editorView = _ref6.editorView;
160
166
  return /*#__PURE__*/React.createElement(ContentComponent, {
161
167
  editorView: editorView,
162
168
  options: options,
@@ -19,5 +19,9 @@ export type GridPlugin = NextEditorPlugin<'grid', {
19
19
  displayGrid: CreateDisplayGrid;
20
20
  };
21
21
  }>;
22
+ /**
23
+ * Grid plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
24
+ * from `@atlaskit/editor-core`.
25
+ */
22
26
  export declare const gridPlugin: GridPlugin;
23
27
  export {};
@@ -21,5 +21,9 @@ export type GridPlugin = NextEditorPlugin<'grid', {
21
21
  displayGrid: CreateDisplayGrid;
22
22
  };
23
23
  }>;
24
+ /**
25
+ * Grid plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
26
+ * from `@atlaskit/editor-core`.
27
+ */
24
28
  export declare const gridPlugin: GridPlugin;
25
29
  export {};
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.2.0",
4
4
  "description": "Grid 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",
11
+ "team": "Editor: Media Experience Porygon",
12
12
  "singleton": true,
13
13
  "releaseModel": "continuous"
14
14
  },
@@ -23,8 +23,8 @@
23
23
  ".": "./src/index.ts"
24
24
  },
25
25
  "dependencies": {
26
- "@atlaskit/editor-common": "^74.52.0",
27
- "@atlaskit/editor-plugin-width": "^0.1.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
  "@babel/runtime": "^7.0.0",
package/report.api.md CHANGED
@@ -39,7 +39,7 @@ export type GridPlugin = NextEditorPlugin<
39
39
  }
40
40
  >;
41
41
 
42
- // @public (undocumented)
42
+ // @public
43
43
  export const gridPlugin: GridPlugin;
44
44
 
45
45
  // @public (undocumented)
@@ -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
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
+ ```