@atlaskit/editor-plugin-synced-block 5.1.0 → 5.1.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 +8 -0
- package/dist/cjs/editor-commands/index.js +7 -1
- package/dist/cjs/pm-plugins/experience-tracking/create-reference-experience.js +113 -0
- package/dist/cjs/pm-plugins/experience-tracking/create-source-experience.js +185 -0
- package/dist/cjs/pm-plugins/experience-tracking/get-experience-tracking-plugins.js +31 -0
- package/dist/cjs/syncedBlockPlugin.js +21 -3
- package/dist/cjs/ui/CreateSyncedBlockButton.js +1 -0
- package/dist/cjs/ui/CreateSyncedBlockDropdownItem.js +1 -0
- package/dist/es2019/editor-commands/index.js +7 -1
- package/dist/es2019/pm-plugins/experience-tracking/create-reference-experience.js +105 -0
- package/dist/es2019/pm-plugins/experience-tracking/create-source-experience.js +179 -0
- package/dist/es2019/pm-plugins/experience-tracking/get-experience-tracking-plugins.js +22 -0
- package/dist/es2019/syncedBlockPlugin.js +21 -3
- package/dist/es2019/ui/CreateSyncedBlockButton.js +1 -0
- package/dist/es2019/ui/CreateSyncedBlockDropdownItem.js +1 -0
- package/dist/esm/editor-commands/index.js +7 -1
- package/dist/esm/pm-plugins/experience-tracking/create-reference-experience.js +106 -0
- package/dist/esm/pm-plugins/experience-tracking/create-source-experience.js +178 -0
- package/dist/esm/pm-plugins/experience-tracking/get-experience-tracking-plugins.js +25 -0
- package/dist/esm/syncedBlockPlugin.js +21 -3
- package/dist/esm/ui/CreateSyncedBlockButton.js +1 -0
- package/dist/esm/ui/CreateSyncedBlockDropdownItem.js +1 -0
- package/dist/types/pm-plugins/experience-tracking/create-reference-experience.d.ts +17 -0
- package/dist/types/pm-plugins/experience-tracking/create-source-experience.d.ts +21 -0
- package/dist/types/pm-plugins/experience-tracking/get-experience-tracking-plugins.d.ts +16 -0
- package/dist/types-ts4.5/pm-plugins/experience-tracking/create-reference-experience.d.ts +17 -0
- package/dist/types-ts4.5/pm-plugins/experience-tracking/create-source-experience.d.ts +21 -0
- package/dist/types-ts4.5/pm-plugins/experience-tracking/get-experience-tracking-plugins.d.ts +16 -0
- package/package.json +6 -5
|
@@ -42,6 +42,7 @@ var CreateSyncedBlockDropdownItem = function CreateSyncedBlockDropdownItem(_ref)
|
|
|
42
42
|
}),
|
|
43
43
|
onClick: onClick,
|
|
44
44
|
isDisabled: isOffline,
|
|
45
|
+
testId: "create-synced-block-block-menu-btn",
|
|
45
46
|
elemAfter: /*#__PURE__*/React.createElement(Lozenge, {
|
|
46
47
|
appearance: "new"
|
|
47
48
|
}, formatMessage(blockMenuMessages.newLozenge))
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
+
type CreateReferenceExperienceOptions = {
|
|
4
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
5
|
+
refs: {
|
|
6
|
+
containerElement?: HTMLElement;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* This experience tracks when a reference sync block is inserted.
|
|
11
|
+
*
|
|
12
|
+
* Start: When user pastes a sync block from editor and createSyncedBlock is called
|
|
13
|
+
* Success: When the sync block is added to the DOM within 500ms of start
|
|
14
|
+
* Failure: When 500ms passes without the reference sync block being added to the DOM
|
|
15
|
+
*/
|
|
16
|
+
export declare const getCreateReferenceExperiencePlugin: ({ refs, dispatchAnalyticsEvent, }: CreateReferenceExperienceOptions) => SafePlugin<any>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
+
import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
4
|
+
type CreateSourceExperienceOptions = {
|
|
5
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
6
|
+
refs: {
|
|
7
|
+
containerElement?: HTMLElement;
|
|
8
|
+
popupsMountPoint?: HTMLElement;
|
|
9
|
+
wrapperElement?: HTMLElement;
|
|
10
|
+
};
|
|
11
|
+
syncBlockStore: SyncBlockStoreManager;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* This experience tracks when a source sync block is inserted.
|
|
15
|
+
*
|
|
16
|
+
* Start: When user inserts a sync block via block menu, quick insert or pinned toolbar
|
|
17
|
+
* Success: When the sync block is added to the DOM within 2000ms of start
|
|
18
|
+
* Failure: When 500ms passes without the source sync block being added to the DOM
|
|
19
|
+
*/
|
|
20
|
+
export declare const getCreateSourceExperiencePlugin: ({ refs, dispatchAnalyticsEvent, syncBlockStore, }: CreateSourceExperienceOptions) => SafePlugin<any>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DispatchAnalyticsEvent } from "@atlaskit/editor-common/analytics";
|
|
2
|
+
import type { SyncBlockStoreManager } from "@atlaskit/editor-synced-block-provider";
|
|
3
|
+
type ExperienceTrackingPluginsProps = {
|
|
4
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
5
|
+
refs: {
|
|
6
|
+
containerElement?: HTMLElement;
|
|
7
|
+
popupsMountPoint?: HTMLElement;
|
|
8
|
+
wrapperElement?: HTMLElement;
|
|
9
|
+
};
|
|
10
|
+
syncBlockStore: SyncBlockStoreManager;
|
|
11
|
+
};
|
|
12
|
+
export declare const getExperienceTrackingPlugins: ({ refs, dispatchAnalyticsEvent, syncBlockStore }: ExperienceTrackingPluginsProps) => {
|
|
13
|
+
name: string;
|
|
14
|
+
plugin: () => import("@atlaskit/editor-common/safe-plugin").SafePlugin<any>;
|
|
15
|
+
}[];
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
+
type CreateReferenceExperienceOptions = {
|
|
4
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
5
|
+
refs: {
|
|
6
|
+
containerElement?: HTMLElement;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* This experience tracks when a reference sync block is inserted.
|
|
11
|
+
*
|
|
12
|
+
* Start: When user pastes a sync block from editor and createSyncedBlock is called
|
|
13
|
+
* Success: When the sync block is added to the DOM within 500ms of start
|
|
14
|
+
* Failure: When 500ms passes without the reference sync block being added to the DOM
|
|
15
|
+
*/
|
|
16
|
+
export declare const getCreateReferenceExperiencePlugin: ({ refs, dispatchAnalyticsEvent, }: CreateReferenceExperienceOptions) => SafePlugin<any>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
+
import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
4
|
+
type CreateSourceExperienceOptions = {
|
|
5
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
6
|
+
refs: {
|
|
7
|
+
containerElement?: HTMLElement;
|
|
8
|
+
popupsMountPoint?: HTMLElement;
|
|
9
|
+
wrapperElement?: HTMLElement;
|
|
10
|
+
};
|
|
11
|
+
syncBlockStore: SyncBlockStoreManager;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* This experience tracks when a source sync block is inserted.
|
|
15
|
+
*
|
|
16
|
+
* Start: When user inserts a sync block via block menu, quick insert or pinned toolbar
|
|
17
|
+
* Success: When the sync block is added to the DOM within 2000ms of start
|
|
18
|
+
* Failure: When 500ms passes without the source sync block being added to the DOM
|
|
19
|
+
*/
|
|
20
|
+
export declare const getCreateSourceExperiencePlugin: ({ refs, dispatchAnalyticsEvent, syncBlockStore, }: CreateSourceExperienceOptions) => SafePlugin<any>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DispatchAnalyticsEvent } from "@atlaskit/editor-common/analytics";
|
|
2
|
+
import type { SyncBlockStoreManager } from "@atlaskit/editor-synced-block-provider";
|
|
3
|
+
type ExperienceTrackingPluginsProps = {
|
|
4
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
5
|
+
refs: {
|
|
6
|
+
containerElement?: HTMLElement;
|
|
7
|
+
popupsMountPoint?: HTMLElement;
|
|
8
|
+
wrapperElement?: HTMLElement;
|
|
9
|
+
};
|
|
10
|
+
syncBlockStore: SyncBlockStoreManager;
|
|
11
|
+
};
|
|
12
|
+
export declare const getExperienceTrackingPlugins: ({ refs, dispatchAnalyticsEvent, syncBlockStore }: ExperienceTrackingPluginsProps) => {
|
|
13
|
+
name: string;
|
|
14
|
+
plugin: () => import("@atlaskit/editor-common/safe-plugin").SafePlugin<any>;
|
|
15
|
+
}[];
|
|
16
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"@atlaskit/editor-plugin-block-menu": "^6.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-connectivity": "7.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-decorations": "^7.0.0",
|
|
38
|
-
"@atlaskit/editor-plugin-floating-toolbar": "^9.
|
|
38
|
+
"@atlaskit/editor-plugin-floating-toolbar": "^9.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-selection": "^7.0.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
42
|
-
"@atlaskit/editor-synced-block-provider": "^3.
|
|
42
|
+
"@atlaskit/editor-synced-block-provider": "^3.4.0",
|
|
43
43
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
44
44
|
"@atlaskit/editor-toolbar": "^0.18.0",
|
|
45
45
|
"@atlaskit/flag": "^17.7.0",
|
|
@@ -49,15 +49,16 @@
|
|
|
49
49
|
"@atlaskit/modal-dialog": "^14.9.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
51
|
"@atlaskit/primitives": "^17.0.0",
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^16.4.0",
|
|
53
53
|
"@atlaskit/tokens": "9.0.0",
|
|
54
54
|
"@atlaskit/tooltip": "^20.11.0",
|
|
55
55
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
56
56
|
"@babel/runtime": "^7.0.0",
|
|
57
|
+
"bind-event-listener": "^3.0.0",
|
|
57
58
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
58
59
|
},
|
|
59
60
|
"peerDependencies": {
|
|
60
|
-
"@atlaskit/editor-common": "^111.
|
|
61
|
+
"@atlaskit/editor-common": "^111.2.0",
|
|
61
62
|
"react": "^18.2.0"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|