@atlaskit/editor-plugin-indentation 11.0.2 → 12.0.1

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,37 @@
1
1
  # @atlaskit/editor-plugin-indentation
2
2
 
3
+ ## 12.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 12.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
14
+ Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
15
+
16
+ Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
17
+
18
+ Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
19
+
20
+ ```diff
21
+ - "typesVersions": {
22
+ - ">=4.5 <4.9": {
23
+ - "*": [
24
+ - "dist/types-ts4.5/*",
25
+ - "dist/types-ts4.5/index.d.ts"
26
+ - ]
27
+ - }
28
+ - },
29
+ ```
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies
34
+
3
35
  ## 11.0.2
4
36
 
5
37
  ### Patch Changes
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/entry-points/indentationPlugin.js",
5
5
  "module:es2019": "../dist/es2019/entry-points/indentationPlugin.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/entry-points/indentationPlugin.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/entry-points/indentationPlugin.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/entry-points/indentationPlugin.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/entry-points/indentationPluginType.js",
5
5
  "module:es2019": "../dist/es2019/entry-points/indentationPluginType.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/entry-points/indentationPluginType.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/entry-points/indentationPluginType.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/entry-points/indentationPluginType.d.ts"
15
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-indentation",
3
- "version": "11.0.2",
3
+ "version": "12.0.1",
4
4
  "description": "Indentation plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -16,24 +16,16 @@
16
16
  "module": "dist/esm/index.js",
17
17
  "module:es2019": "dist/es2019/index.js",
18
18
  "types": "dist/types/index.d.ts",
19
- "typesVersions": {
20
- ">=4.5 <4.9": {
21
- "*": [
22
- "dist/types-ts4.5/*",
23
- "dist/types-ts4.5/index.d.ts"
24
- ]
25
- }
26
- },
27
19
  "sideEffects": false,
28
20
  "atlaskit:src": "src/index.ts",
29
21
  "dependencies": {
30
- "@atlaskit/adf-schema": "^54.0.0",
31
- "@atlaskit/editor-plugin-analytics": "^11.0.0",
32
- "@atlaskit/editor-prosemirror": "^7.3.0",
22
+ "@atlaskit/adf-schema": "^56.0.0",
23
+ "@atlaskit/editor-plugin-analytics": "^12.0.0",
24
+ "@atlaskit/editor-prosemirror": "^8.0.0",
33
25
  "@babel/runtime": "^7.0.0"
34
26
  },
35
27
  "peerDependencies": {
36
- "@atlaskit/editor-common": "^115.13.0",
28
+ "@atlaskit/editor-common": "^116.4.0",
37
29
  "react": "^18.2.0",
38
30
  "react-dom": "^18.2.0"
39
31
  },
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/entry-points/utils.js",
5
5
  "module:es2019": "../dist/es2019/entry-points/utils.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/entry-points/utils.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/entry-points/utils.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/entry-points/utils.d.ts"
15
8
  }
@@ -1,14 +0,0 @@
1
- import type { Node } from '@atlaskit/editor-prosemirror/model';
2
- import type { GetAttrsWithChangesRecorder } from '../indentationPluginType';
3
- /**
4
- * Create a new getAttrs handler who will wrap the original function,
5
- * and store the changes internally to be used for other
6
- * tools like Analytics later in the code.
7
- *
8
- * @param getAttrs - Function who gets the new attributes
9
- * @return object
10
- * @property handler - New handler to get indentation attributes (It wraps the original)
11
- * @property getChanges - Return all the stored changes.
12
- * @property clear - Clear the changes
13
- */
14
- export default function getAttrsWithChangesRecorder<T, V>(getAttrs: (prevAttrs?: T, node?: Node) => T | false | undefined, options: V): GetAttrsWithChangesRecorder<T, V>;
@@ -1,8 +0,0 @@
1
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import type { Command } from '@atlaskit/editor-common/types';
3
- import type { Node as PmNode, Schema } from '@atlaskit/editor-prosemirror/model';
4
- import type { IndentationInputMethod } from './utils';
5
- export declare const isIndentationAllowed: (schema: Schema, node: PmNode) => boolean;
6
- export declare const getIndentCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod?: IndentationInputMethod) => Command;
7
- export declare const getOutdentCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod?: IndentationInputMethod) => Command;
8
- export declare const removeIndentation: Command;
@@ -1,37 +0,0 @@
1
- import type { IndentationMarkAttributes } from '@atlaskit/adf-schema';
2
- import type { EditorAnalyticsAPI, INDENT_DIRECTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
- import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
4
- import type { GetAttrsChange } from '../indentationPluginType';
5
- export type PrevAttributes = IndentationMarkAttributes | undefined;
6
- export type NewAttributes = IndentationMarkAttributes | undefined | false;
7
- export type IndentationChangesOptions = {
8
- direction: INDENT_DIRECTION;
9
- };
10
- export type IndentationInputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
11
- /**
12
- * Get the current indentation level given prev and new attributes
13
- * @param prevAttrs - Previous attributes from indentation
14
- * @param newAttrs - New attributes from indentation
15
- */
16
- export declare function getNewIndentLevel(prevAttrs: PrevAttributes, newAttrs: NewAttributes): number;
17
- /**
18
- * Get the previous indentation level prev attributes
19
- * @param prevAttrs - Previous attributes from indentation
20
- */
21
- export declare function getPrevIndentLevel(prevAttrs: PrevAttributes): number;
22
- /**
23
- * Create a new dispatch function who add analytics events given a list of attributes changes
24
- *
25
- * @export
26
- * @param {*} getAttrsChanges
27
- * @param {*} state
28
- * @param dispatch
29
- * @returns
30
- */
31
- export declare function createAnalyticsDispatch({ getAttrsChanges, inputMethod, editorAnalyticsAPI, state, dispatch, }: {
32
- dispatch?: (tr: Transaction) => void;
33
- editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
34
- getAttrsChanges: () => GetAttrsChange<IndentationMarkAttributes, IndentationChangesOptions>[];
35
- inputMethod: IndentationInputMethod;
36
- state: EditorState;
37
- }): (tr: Transaction) => void;
@@ -1 +0,0 @@
1
- export { indentationPlugin } from '../indentationPlugin';
@@ -1 +0,0 @@
1
- export type { IndentationPlugin, IndentationPluginDependencies, IndentationPluginActions, } from '../indentationPluginType';
@@ -1 +0,0 @@
1
- export type { IndentationInputMethod } from '../editor-commands/utils';
@@ -1,2 +0,0 @@
1
- import type { IndentationPlugin } from './indentationPluginType';
2
- export declare const indentationPlugin: IndentationPlugin;
@@ -1,32 +0,0 @@
1
- import type { Command, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
- import type { Node } from '@atlaskit/editor-prosemirror/model';
4
- import type { IndentationInputMethod } from './editor-commands/utils';
5
- type IndentationPluginSharedState = {
6
- indentDisabled: boolean;
7
- isIndentationAllowed: boolean;
8
- outdentDisabled: boolean;
9
- };
10
- export type IndentationPluginDependencies = [
11
- OptionalPlugin<AnalyticsPlugin>
12
- ];
13
- export type IndentationPluginActions = {
14
- indentParagraphOrHeading: (inputMethod: IndentationInputMethod) => Command;
15
- outdentParagraphOrHeading: (inputMethod: IndentationInputMethod) => Command;
16
- };
17
- export type IndentationPlugin = NextEditorPlugin<'indentation', {
18
- actions: IndentationPluginActions;
19
- dependencies: IndentationPluginDependencies;
20
- sharedState: IndentationPluginSharedState | undefined;
21
- }>;
22
- export interface GetAttrsChange<T, V> {
23
- newAttrs: T | false | undefined;
24
- node: Node;
25
- options: V;
26
- prevAttrs?: T;
27
- }
28
- export type GetAttrsWithChangesRecorder<T, V> = {
29
- getAndResetAttrsChanges(): GetAttrsChange<T, V>[];
30
- getAttrs(prevAttrs?: T | undefined, node?: Node): T | false | undefined;
31
- };
32
- export {};
@@ -1,3 +0,0 @@
1
- export { indentationPlugin } from './indentationPlugin';
2
- export type { IndentationPlugin, IndentationPluginDependencies, IndentationPluginActions, } from './indentationPluginType';
3
- export type { IndentationInputMethod } from './editor-commands/utils';
@@ -1,4 +0,0 @@
1
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
- export declare function keymapPlugin(editorAnalyticsAPI: EditorAnalyticsAPI | undefined): SafePlugin | undefined;
4
- export default keymapPlugin;