@atlaskit/editor-plugin-metrics 9.0.0 → 9.0.2

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,17 @@
1
1
  # @atlaskit/editor-plugin-metrics
2
2
 
3
+ ## 9.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 9.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 9.0.0
4
16
 
5
17
  ### Patch Changes
@@ -4,7 +4,7 @@ import { type Fragment } from '@atlaskit/editor-prosemirror/model';
4
4
  import { PluginKey, type Selection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { type MetricsPlugin } from '../metricsPluginType';
6
6
  import { type TrActionType } from './utils/check-tr-actions/types';
7
- export declare const metricsKey: PluginKey<any>;
7
+ export declare const metricsKey: PluginKey;
8
8
  export type MetricsState = {
9
9
  actionTypeCount: ActionByType;
10
10
  activeSessionTime: number;
@@ -1,6 +1,7 @@
1
- import type { EditorState, ReadonlyTransaction } from '@atlaskit/editor-prosemirror/state';
1
+ import type { Fragment } from '@atlaskit/editor-prosemirror/model';
2
+ import type { EditorState, ReadonlyTransaction, Selection } from '@atlaskit/editor-prosemirror/state';
2
3
  import { type MetricsState } from '../main';
3
- import { ActionType } from './check-tr-actions/types';
4
+ import { ActionType, type AttrChangeAction, type MarkChangeAction, type StatusChangeAction, type TrAction } from './check-tr-actions/types';
4
5
  export declare const getNewPluginState: ({ now, intentToStartEditTime, shouldPersistActiveSession, tr, pluginState, oldState, newState, }: {
5
6
  intentToStartEditTime: number;
6
7
  newState: EditorState;
@@ -10,10 +11,7 @@ export declare const getNewPluginState: ({ now, intentToStartEditTime, shouldPer
10
11
  shouldPersistActiveSession: boolean;
11
12
  tr: ReadonlyTransaction;
12
13
  }) => {
13
- totalActionCount: number;
14
- timeOfLastTextInput: undefined;
15
14
  actionTypeCount: {
16
- undoCount: number;
17
15
  contentDeletedCount: number;
18
16
  contentMovedCount: number;
19
17
  markChangeCount: number;
@@ -21,36 +19,39 @@ export declare const getNewPluginState: ({ now, intentToStartEditTime, shouldPer
21
19
  nodeDeletionCount: number;
22
20
  nodeInsertionCount: number;
23
21
  textInputCount: number;
22
+ undoCount: number;
24
23
  };
25
- previousTrType: undefined;
26
- safeInsertCount: number;
27
24
  activeSessionTime: number;
28
25
  contentSizeChanged: number;
26
+ initialContent?: Fragment;
29
27
  intentToStartEditTime: number;
30
- shouldPersistActiveSession: boolean;
31
- initialContent?: import("prosemirror-model").Fragment;
32
- lastSelection?: import("prosemirror-state").Selection;
28
+ lastSelection?: Selection;
29
+ previousTrType: undefined;
33
30
  repeatedActionCount: number;
34
- } | {
31
+ safeInsertCount: number;
32
+ shouldPersistActiveSession: boolean;
33
+ timeOfLastTextInput: undefined;
35
34
  totalActionCount: number;
36
- timeOfLastTextInput: number | undefined;
35
+ } | {
37
36
  actionTypeCount: {
38
- textInputCount: number;
39
- undoCount: number;
40
- nodeAttributeChangeCount: number;
37
+ contentDeletedCount: number;
41
38
  contentMovedCount: number;
42
39
  markChangeCount: number;
43
- contentDeletedCount: number;
40
+ nodeAttributeChangeCount: number;
44
41
  nodeDeletionCount: number;
45
42
  nodeInsertionCount: number;
43
+ textInputCount: number;
44
+ undoCount: number;
46
45
  };
47
- previousTrType: import("./check-tr-actions/types").AttrChangeAction | import("./check-tr-actions/types").MarkChangeAction | import("./check-tr-actions/types").StatusChangeAction | import("./check-tr-actions/types").TrAction<ActionType.TEXT_INPUT> | import("./check-tr-actions/types").TrAction<ActionType.EMPTY_LINE_ADDED_OR_DELETED> | import("./check-tr-actions/types").TrAction<ActionType.INSERTED_FROM_TYPE_AHEAD> | import("./check-tr-actions/types").TrAction<ActionType.INSERTING_NEW_LIST_TYPE_NODE> | import("./check-tr-actions/types").TrAction<ActionType.UPDATING_NEW_LIST_TYPE_ITEM> | import("./check-tr-actions/types").TrAction<ActionType.ADDING_LINK> | import("./check-tr-actions/types").TrAction<ActionType.MOVING_CONTENT> | import("./check-tr-actions/types").TrAction<ActionType.PASTING_CONTENT> | import("./check-tr-actions/types").TrAction<ActionType.DELETING_CONTENT> | import("./check-tr-actions/types").TrAction<ActionType.SAFE_INSERT> | import("./check-tr-actions/types").TrAction<ActionType.UNDO>;
48
- repeatedActionCount: number;
49
- safeInsertCount: number;
50
46
  activeSessionTime: number;
51
47
  contentSizeChanged: number;
48
+ initialContent?: Fragment;
52
49
  intentToStartEditTime: number;
50
+ lastSelection?: Selection;
51
+ previousTrType: AttrChangeAction | MarkChangeAction | StatusChangeAction | TrAction<ActionType.TEXT_INPUT> | TrAction<ActionType.EMPTY_LINE_ADDED_OR_DELETED> | TrAction<ActionType.INSERTED_FROM_TYPE_AHEAD> | TrAction<ActionType.INSERTING_NEW_LIST_TYPE_NODE> | TrAction<ActionType.UPDATING_NEW_LIST_TYPE_ITEM> | TrAction<ActionType.ADDING_LINK> | TrAction<ActionType.MOVING_CONTENT> | TrAction<ActionType.PASTING_CONTENT> | TrAction<ActionType.DELETING_CONTENT> | TrAction<ActionType.SAFE_INSERT> | TrAction<ActionType.UNDO>;
52
+ repeatedActionCount: number;
53
+ safeInsertCount: number;
53
54
  shouldPersistActiveSession: boolean;
54
- initialContent?: import("prosemirror-model").Fragment;
55
- lastSelection?: import("prosemirror-state").Selection;
55
+ timeOfLastTextInput: number | undefined;
56
+ totalActionCount: number;
56
57
  };
@@ -4,7 +4,7 @@ import { type Fragment } from '@atlaskit/editor-prosemirror/model';
4
4
  import { PluginKey, type Selection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { type MetricsPlugin } from '../metricsPluginType';
6
6
  import { type TrActionType } from './utils/check-tr-actions/types';
7
- export declare const metricsKey: PluginKey<any>;
7
+ export declare const metricsKey: PluginKey;
8
8
  export type MetricsState = {
9
9
  actionTypeCount: ActionByType;
10
10
  activeSessionTime: number;
@@ -1,6 +1,7 @@
1
- import type { EditorState, ReadonlyTransaction } from '@atlaskit/editor-prosemirror/state';
1
+ import type { Fragment } from '@atlaskit/editor-prosemirror/model';
2
+ import type { EditorState, ReadonlyTransaction, Selection } from '@atlaskit/editor-prosemirror/state';
2
3
  import { type MetricsState } from '../main';
3
- import { ActionType } from './check-tr-actions/types';
4
+ import { ActionType, type AttrChangeAction, type MarkChangeAction, type StatusChangeAction, type TrAction } from './check-tr-actions/types';
4
5
  export declare const getNewPluginState: ({ now, intentToStartEditTime, shouldPersistActiveSession, tr, pluginState, oldState, newState, }: {
5
6
  intentToStartEditTime: number;
6
7
  newState: EditorState;
@@ -10,10 +11,7 @@ export declare const getNewPluginState: ({ now, intentToStartEditTime, shouldPer
10
11
  shouldPersistActiveSession: boolean;
11
12
  tr: ReadonlyTransaction;
12
13
  }) => {
13
- totalActionCount: number;
14
- timeOfLastTextInput: undefined;
15
14
  actionTypeCount: {
16
- undoCount: number;
17
15
  contentDeletedCount: number;
18
16
  contentMovedCount: number;
19
17
  markChangeCount: number;
@@ -21,36 +19,39 @@ export declare const getNewPluginState: ({ now, intentToStartEditTime, shouldPer
21
19
  nodeDeletionCount: number;
22
20
  nodeInsertionCount: number;
23
21
  textInputCount: number;
22
+ undoCount: number;
24
23
  };
25
- previousTrType: undefined;
26
- safeInsertCount: number;
27
24
  activeSessionTime: number;
28
25
  contentSizeChanged: number;
26
+ initialContent?: Fragment;
29
27
  intentToStartEditTime: number;
30
- shouldPersistActiveSession: boolean;
31
- initialContent?: import("prosemirror-model").Fragment;
32
- lastSelection?: import("prosemirror-state").Selection;
28
+ lastSelection?: Selection;
29
+ previousTrType: undefined;
33
30
  repeatedActionCount: number;
34
- } | {
31
+ safeInsertCount: number;
32
+ shouldPersistActiveSession: boolean;
33
+ timeOfLastTextInput: undefined;
35
34
  totalActionCount: number;
36
- timeOfLastTextInput: number | undefined;
35
+ } | {
37
36
  actionTypeCount: {
38
- textInputCount: number;
39
- undoCount: number;
40
- nodeAttributeChangeCount: number;
37
+ contentDeletedCount: number;
41
38
  contentMovedCount: number;
42
39
  markChangeCount: number;
43
- contentDeletedCount: number;
40
+ nodeAttributeChangeCount: number;
44
41
  nodeDeletionCount: number;
45
42
  nodeInsertionCount: number;
43
+ textInputCount: number;
44
+ undoCount: number;
46
45
  };
47
- previousTrType: import("./check-tr-actions/types").AttrChangeAction | import("./check-tr-actions/types").MarkChangeAction | import("./check-tr-actions/types").StatusChangeAction | import("./check-tr-actions/types").TrAction<ActionType.TEXT_INPUT> | import("./check-tr-actions/types").TrAction<ActionType.EMPTY_LINE_ADDED_OR_DELETED> | import("./check-tr-actions/types").TrAction<ActionType.INSERTED_FROM_TYPE_AHEAD> | import("./check-tr-actions/types").TrAction<ActionType.INSERTING_NEW_LIST_TYPE_NODE> | import("./check-tr-actions/types").TrAction<ActionType.UPDATING_NEW_LIST_TYPE_ITEM> | import("./check-tr-actions/types").TrAction<ActionType.ADDING_LINK> | import("./check-tr-actions/types").TrAction<ActionType.MOVING_CONTENT> | import("./check-tr-actions/types").TrAction<ActionType.PASTING_CONTENT> | import("./check-tr-actions/types").TrAction<ActionType.DELETING_CONTENT> | import("./check-tr-actions/types").TrAction<ActionType.SAFE_INSERT> | import("./check-tr-actions/types").TrAction<ActionType.UNDO>;
48
- repeatedActionCount: number;
49
- safeInsertCount: number;
50
46
  activeSessionTime: number;
51
47
  contentSizeChanged: number;
48
+ initialContent?: Fragment;
52
49
  intentToStartEditTime: number;
50
+ lastSelection?: Selection;
51
+ previousTrType: AttrChangeAction | MarkChangeAction | StatusChangeAction | TrAction<ActionType.TEXT_INPUT> | TrAction<ActionType.EMPTY_LINE_ADDED_OR_DELETED> | TrAction<ActionType.INSERTED_FROM_TYPE_AHEAD> | TrAction<ActionType.INSERTING_NEW_LIST_TYPE_NODE> | TrAction<ActionType.UPDATING_NEW_LIST_TYPE_ITEM> | TrAction<ActionType.ADDING_LINK> | TrAction<ActionType.MOVING_CONTENT> | TrAction<ActionType.PASTING_CONTENT> | TrAction<ActionType.DELETING_CONTENT> | TrAction<ActionType.SAFE_INSERT> | TrAction<ActionType.UNDO>;
52
+ repeatedActionCount: number;
53
+ safeInsertCount: number;
53
54
  shouldPersistActiveSession: boolean;
54
- initialContent?: import("prosemirror-model").Fragment;
55
- lastSelection?: import("prosemirror-state").Selection;
55
+ timeOfLastTextInput: number | undefined;
56
+ totalActionCount: number;
56
57
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-metrics",
3
- "version": "9.0.0",
3
+ "version": "9.0.2",
4
4
  "description": "Metrics plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,12 +33,12 @@
33
33
  "@atlaskit/editor-plugin-user-preferences": "^6.0.0",
34
34
  "@atlaskit/editor-prosemirror": "^7.3.0",
35
35
  "@atlaskit/platform-feature-flags": "^1.1.0",
36
- "@atlaskit/tmp-editor-statsig": "^35.10.0",
36
+ "@atlaskit/tmp-editor-statsig": "^37.0.0",
37
37
  "@babel/runtime": "^7.0.0",
38
38
  "bind-event-listener": "^3.0.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "@atlaskit/editor-common": "^112.0.0",
41
+ "@atlaskit/editor-common": "^112.2.0",
42
42
  "react": "^18.2.0",
43
43
  "react-dom": "^18.2.0"
44
44
  },