@atlaskit/editor-plugin-expand 4.2.8 → 4.2.9

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,13 @@
1
1
  # @atlaskit/editor-plugin-expand
2
2
 
3
+ ## 4.2.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
8
+ Sorted type and interface props to improve Atlaskit docs
9
+ - Updated dependencies
10
+
3
11
  ## 4.2.8
4
12
 
5
13
  ### Patch Changes
@@ -8,16 +8,16 @@ export declare const setExpandRef: (ref?: HTMLDivElement | null) => Command;
8
8
  export declare const deleteExpandAtPos: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (expandNodePos: number, expandNode: PMNode) => Command;
9
9
  export declare const deleteExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
10
10
  export declare const updateExpandTitle: ({ title, nodeType, pos, __livePage, }: {
11
- title: string;
12
- pos: number;
13
- nodeType: NodeType;
14
11
  __livePage: boolean;
12
+ nodeType: NodeType;
13
+ pos: number;
14
+ title: string;
15
15
  }) => Command;
16
16
  export declare const toggleExpandExpanded: ({ editorAnalyticsAPI, pos, nodeType, __livePage, }: {
17
+ __livePage: boolean;
17
18
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
18
- pos: number;
19
19
  nodeType: NodeType;
20
- __livePage: boolean;
20
+ pos: number;
21
21
  }) => Command;
22
22
  export declare const createExpandNode: (state: EditorState) => PMNode | null;
23
23
  export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: InsertMethod) => Command;
@@ -49,17 +49,17 @@ export declare class ExpandNodeView implements NodeView {
49
49
  private getContentEditable;
50
50
  stopEvent(event: Event): boolean;
51
51
  ignoreMutation(mutationRecord: MutationRecord | {
52
- type: 'selection';
53
52
  target: Node;
53
+ type: 'selection';
54
54
  }): boolean;
55
55
  update(node: PmNode, _decorations: readonly Decoration[]): boolean;
56
56
  destroy(): void;
57
57
  }
58
58
  export default function ({ getIntl, isMobile, api, nodeViewPortalProviderAPI, allowInteractiveExpand, __livePage, }: {
59
+ __livePage: boolean;
60
+ allowInteractiveExpand: boolean;
61
+ api: ExtractInjectionAPI<ExpandPlugin> | undefined;
59
62
  getIntl: () => IntlShape;
60
63
  isMobile: boolean;
61
- api: ExtractInjectionAPI<ExpandPlugin> | undefined;
62
64
  nodeViewPortalProviderAPI: PortalProviderAPI;
63
- allowInteractiveExpand: boolean;
64
- __livePage: boolean;
65
65
  }): (node: PmNode, view: EditorView, getPos: getPosHandler) => NodeView;
@@ -12,13 +12,13 @@ export declare const deleteExpandAtPos: (editorAnalyticsAPI: EditorAnalyticsAPI
12
12
  export declare const setSelectionInsideExpand: (expandPos: number) => Command;
13
13
  export declare const toggleExpandExpanded: ({ editorAnalyticsAPI, pos, node, }: {
14
14
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
15
- pos: number;
16
15
  node: PMNode;
16
+ pos: number;
17
17
  }) => Command;
18
18
  export declare const updateExpandTitle: ({ title, nodeType, pos }: {
19
- title: string;
20
- pos: number;
21
19
  nodeType: NodeType;
20
+ pos: number;
21
+ title: string;
22
22
  }) => Command;
23
23
  export declare const focusTitle: (pos: number) => Command;
24
24
  export declare const focusIcon: (expand: Node) => Command;
@@ -48,8 +48,8 @@ export declare class ExpandNodeView implements NodeView {
48
48
  private getContentEditable;
49
49
  stopEvent(event: Event): boolean;
50
50
  ignoreMutation(mutationRecord: MutationRecord | {
51
- type: 'selection';
52
51
  target: Node;
52
+ type: 'selection';
53
53
  }): boolean;
54
54
  update(node: PmNode, _decorations: readonly Decoration[]): boolean;
55
55
  updateExpandToggleIcon(node: PmNode): void;
@@ -58,10 +58,10 @@ export declare class ExpandNodeView implements NodeView {
58
58
  destroy(): void;
59
59
  }
60
60
  export default function ({ getIntl, isMobile, api, nodeViewPortalProviderAPI, allowInteractiveExpand, __livePage, }: {
61
+ __livePage: boolean;
62
+ allowInteractiveExpand: boolean;
63
+ api: ExtractInjectionAPI<ExpandPlugin> | undefined;
61
64
  getIntl: () => IntlShape;
62
65
  isMobile: boolean;
63
- api: ExtractInjectionAPI<ExpandPlugin> | undefined;
64
66
  nodeViewPortalProviderAPI: PortalProviderAPI;
65
- allowInteractiveExpand: boolean;
66
- __livePage: boolean;
67
67
  }): (node: PmNode, view: EditorView, getPos: getPosHandler) => NodeView;
@@ -13,21 +13,13 @@ export interface ExpandPluginState {
13
13
  expandRef?: HTMLDivElement | null;
14
14
  }
15
15
  export type ExpandPluginAction = {
16
- type: 'SET_EXPAND_REF';
17
16
  data: {
18
17
  ref?: HTMLDivElement | null;
19
18
  };
19
+ type: 'SET_EXPAND_REF';
20
20
  };
21
21
  export type InsertMethod = INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.INSERT_MENU;
22
22
  export interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
23
- allowInsertion?: boolean;
24
- /**
25
- * Allows the expand button to toggle. Previously this was set via the editor prop featureFlag (`interactiveExpand`)
26
- *
27
- * Defaults to true
28
- */
29
- allowInteractiveExpand?: boolean;
30
- appearance?: EditorAppearance;
31
23
  /**
32
24
  * There is expected to be temporary divergence between Live Page editor expand behaviour and the standard expand behaviour.
33
25
  *
@@ -38,6 +30,14 @@ export interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
38
30
  * @default false
39
31
  */
40
32
  __livePage?: boolean;
33
+ allowInsertion?: boolean;
34
+ /**
35
+ * Allows the expand button to toggle. Previously this was set via the editor prop featureFlag (`interactiveExpand`)
36
+ *
37
+ * Defaults to true
38
+ */
39
+ allowInteractiveExpand?: boolean;
40
+ appearance?: EditorAppearance;
41
41
  }
42
42
  export type ExpandPluginDependencies = [
43
43
  DecorationsPlugin,
@@ -49,8 +49,6 @@ export type ExpandPluginDependencies = [
49
49
  OptionalPlugin<EditorViewModePlugin>
50
50
  ];
51
51
  export type ExpandPlugin = NextEditorPlugin<'expand', {
52
- pluginConfiguration: ExpandPluginOptions | undefined;
53
- dependencies: ExpandPluginDependencies;
54
52
  actions: {
55
53
  /**
56
54
  * Insert an expand node and dispatch event with `insertMenu` inputMethod
@@ -67,4 +65,6 @@ export type ExpandPlugin = NextEditorPlugin<'expand', {
67
65
  */
68
66
  toggleExpandWithMatch: (selection: Selection) => EditorCommand;
69
67
  };
68
+ dependencies: ExpandPluginDependencies;
69
+ pluginConfiguration: ExpandPluginOptions | undefined;
70
70
  }>;
@@ -8,16 +8,16 @@ export declare const setExpandRef: (ref?: HTMLDivElement | null) => Command;
8
8
  export declare const deleteExpandAtPos: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (expandNodePos: number, expandNode: PMNode) => Command;
9
9
  export declare const deleteExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
10
10
  export declare const updateExpandTitle: ({ title, nodeType, pos, __livePage, }: {
11
- title: string;
12
- pos: number;
13
- nodeType: NodeType;
14
11
  __livePage: boolean;
12
+ nodeType: NodeType;
13
+ pos: number;
14
+ title: string;
15
15
  }) => Command;
16
16
  export declare const toggleExpandExpanded: ({ editorAnalyticsAPI, pos, nodeType, __livePage, }: {
17
+ __livePage: boolean;
17
18
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
18
- pos: number;
19
19
  nodeType: NodeType;
20
- __livePage: boolean;
20
+ pos: number;
21
21
  }) => Command;
22
22
  export declare const createExpandNode: (state: EditorState) => PMNode | null;
23
23
  export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: InsertMethod) => Command;
@@ -49,17 +49,17 @@ export declare class ExpandNodeView implements NodeView {
49
49
  private getContentEditable;
50
50
  stopEvent(event: Event): boolean;
51
51
  ignoreMutation(mutationRecord: MutationRecord | {
52
- type: 'selection';
53
52
  target: Node;
53
+ type: 'selection';
54
54
  }): boolean;
55
55
  update(node: PmNode, _decorations: readonly Decoration[]): boolean;
56
56
  destroy(): void;
57
57
  }
58
58
  export default function ({ getIntl, isMobile, api, nodeViewPortalProviderAPI, allowInteractiveExpand, __livePage, }: {
59
+ __livePage: boolean;
60
+ allowInteractiveExpand: boolean;
61
+ api: ExtractInjectionAPI<ExpandPlugin> | undefined;
59
62
  getIntl: () => IntlShape;
60
63
  isMobile: boolean;
61
- api: ExtractInjectionAPI<ExpandPlugin> | undefined;
62
64
  nodeViewPortalProviderAPI: PortalProviderAPI;
63
- allowInteractiveExpand: boolean;
64
- __livePage: boolean;
65
65
  }): (node: PmNode, view: EditorView, getPos: getPosHandler) => NodeView;
@@ -12,13 +12,13 @@ export declare const deleteExpandAtPos: (editorAnalyticsAPI: EditorAnalyticsAPI
12
12
  export declare const setSelectionInsideExpand: (expandPos: number) => Command;
13
13
  export declare const toggleExpandExpanded: ({ editorAnalyticsAPI, pos, node, }: {
14
14
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
15
- pos: number;
16
15
  node: PMNode;
16
+ pos: number;
17
17
  }) => Command;
18
18
  export declare const updateExpandTitle: ({ title, nodeType, pos }: {
19
- title: string;
20
- pos: number;
21
19
  nodeType: NodeType;
20
+ pos: number;
21
+ title: string;
22
22
  }) => Command;
23
23
  export declare const focusTitle: (pos: number) => Command;
24
24
  export declare const focusIcon: (expand: Node) => Command;
@@ -48,8 +48,8 @@ export declare class ExpandNodeView implements NodeView {
48
48
  private getContentEditable;
49
49
  stopEvent(event: Event): boolean;
50
50
  ignoreMutation(mutationRecord: MutationRecord | {
51
- type: 'selection';
52
51
  target: Node;
52
+ type: 'selection';
53
53
  }): boolean;
54
54
  update(node: PmNode, _decorations: readonly Decoration[]): boolean;
55
55
  updateExpandToggleIcon(node: PmNode): void;
@@ -58,10 +58,10 @@ export declare class ExpandNodeView implements NodeView {
58
58
  destroy(): void;
59
59
  }
60
60
  export default function ({ getIntl, isMobile, api, nodeViewPortalProviderAPI, allowInteractiveExpand, __livePage, }: {
61
+ __livePage: boolean;
62
+ allowInteractiveExpand: boolean;
63
+ api: ExtractInjectionAPI<ExpandPlugin> | undefined;
61
64
  getIntl: () => IntlShape;
62
65
  isMobile: boolean;
63
- api: ExtractInjectionAPI<ExpandPlugin> | undefined;
64
66
  nodeViewPortalProviderAPI: PortalProviderAPI;
65
- allowInteractiveExpand: boolean;
66
- __livePage: boolean;
67
67
  }): (node: PmNode, view: EditorView, getPos: getPosHandler) => NodeView;
@@ -13,21 +13,13 @@ export interface ExpandPluginState {
13
13
  expandRef?: HTMLDivElement | null;
14
14
  }
15
15
  export type ExpandPluginAction = {
16
- type: 'SET_EXPAND_REF';
17
16
  data: {
18
17
  ref?: HTMLDivElement | null;
19
18
  };
19
+ type: 'SET_EXPAND_REF';
20
20
  };
21
21
  export type InsertMethod = INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.INSERT_MENU;
22
22
  export interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
23
- allowInsertion?: boolean;
24
- /**
25
- * Allows the expand button to toggle. Previously this was set via the editor prop featureFlag (`interactiveExpand`)
26
- *
27
- * Defaults to true
28
- */
29
- allowInteractiveExpand?: boolean;
30
- appearance?: EditorAppearance;
31
23
  /**
32
24
  * There is expected to be temporary divergence between Live Page editor expand behaviour and the standard expand behaviour.
33
25
  *
@@ -38,6 +30,14 @@ export interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
38
30
  * @default false
39
31
  */
40
32
  __livePage?: boolean;
33
+ allowInsertion?: boolean;
34
+ /**
35
+ * Allows the expand button to toggle. Previously this was set via the editor prop featureFlag (`interactiveExpand`)
36
+ *
37
+ * Defaults to true
38
+ */
39
+ allowInteractiveExpand?: boolean;
40
+ appearance?: EditorAppearance;
41
41
  }
42
42
  export type ExpandPluginDependencies = [
43
43
  DecorationsPlugin,
@@ -49,8 +49,6 @@ export type ExpandPluginDependencies = [
49
49
  OptionalPlugin<EditorViewModePlugin>
50
50
  ];
51
51
  export type ExpandPlugin = NextEditorPlugin<'expand', {
52
- pluginConfiguration: ExpandPluginOptions | undefined;
53
- dependencies: ExpandPluginDependencies;
54
52
  actions: {
55
53
  /**
56
54
  * Insert an expand node and dispatch event with `insertMenu` inputMethod
@@ -67,4 +65,6 @@ export type ExpandPlugin = NextEditorPlugin<'expand', {
67
65
  */
68
66
  toggleExpandWithMatch: (selection: Selection) => EditorCommand;
69
67
  };
68
+ dependencies: ExpandPluginDependencies;
69
+ pluginConfiguration: ExpandPluginOptions | undefined;
70
70
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-expand",
3
- "version": "4.2.8",
3
+ "version": "4.2.9",
4
4
  "description": "Expand plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,14 +38,14 @@
38
38
  "@atlaskit/editor-plugin-decorations": "^3.0.0",
39
39
  "@atlaskit/editor-plugin-editor-disabled": "^3.0.0",
40
40
  "@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
41
- "@atlaskit/editor-plugin-selection": "^3.1.0",
41
+ "@atlaskit/editor-plugin-selection": "^3.2.0",
42
42
  "@atlaskit/editor-plugin-selection-marker": "^3.0.0",
43
43
  "@atlaskit/editor-prosemirror": "7.0.0",
44
44
  "@atlaskit/editor-shared-styles": "^3.6.0",
45
45
  "@atlaskit/editor-tables": "^2.9.0",
46
46
  "@atlaskit/icon": "^28.0.0",
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
- "@atlaskit/tmp-editor-statsig": "^11.3.0",
48
+ "@atlaskit/tmp-editor-statsig": "^11.5.0",
49
49
  "@atlaskit/tokens": "^6.0.0",
50
50
  "@atlaskit/tooltip": "^20.4.0",
51
51
  "@babel/runtime": "^7.0.0",
@@ -54,7 +54,7 @@
54
54
  "w3c-keyname": "^2.1.8"
55
55
  },
56
56
  "peerDependencies": {
57
- "@atlaskit/editor-common": "^107.26.0",
57
+ "@atlaskit/editor-common": "^107.28.0",
58
58
  "react": "^18.2.0",
59
59
  "react-dom": "^18.2.0",
60
60
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -64,7 +64,7 @@
64
64
  "@atlaskit/editor-plugin-content-insertion": "^3.1.0",
65
65
  "@atlaskit/editor-plugin-guideline": "^3.0.0",
66
66
  "@atlaskit/editor-plugin-quick-insert": "^3.0.0",
67
- "@atlaskit/editor-plugin-table": "^12.2.0",
67
+ "@atlaskit/editor-plugin-table": "^12.3.0",
68
68
  "@atlaskit/editor-plugin-type-ahead": "^3.1.0",
69
69
  "@atlaskit/editor-plugin-width": "^4.0.0",
70
70
  "@testing-library/react": "^13.4.0",