@atlaskit/editor-plugin-analytics
Version:
Analytics plugin for @atlaskit/editor-core
77 lines (59 loc) • 2.18 kB
Markdown
<!-- API Report Version: 2.3 -->
## API Report File for "@atlaskit/editor-plugin-analytics"
> Do not edit this file. This report is auto-generated using
> [API Extractor](https://api-extractor.com/).
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
### Table of contents
- [Main Entry Types](#main-entry-types)
- [Peer Dependencies](#peer-dependencies)
### Main Entry Types
<!--SECTION START: Main Entry Types-->
```ts
import { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
import type { PerformanceTracking } from '@atlaskit/editor-common/types';
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
// @public (undocumented)
export type AnalyticsPlugin = NextEditorPlugin<
'analytics',
{
pluginConfiguration: AnalyticsPluginOptions;
sharedState: {
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
attachAnalyticsEvent: CreateAttachPayloadIntoTransaction | null;
performanceTracking: PerformanceTracking | undefined;
};
dependencies: [OptionalPlugin<FeatureFlagsPlugin>];
actions: EditorAnalyticsAPI;
}
>;
// @public
export const analyticsPlugin: AnalyticsPlugin;
// @public (undocumented)
export interface AnalyticsPluginOptions {
// (undocumented)
createAnalyticsEvent?: CreateUIAnalyticsEvent;
// (undocumented)
performanceTracking?: PerformanceTracking;
}
// @public (undocumented)
export type CreateAttachPayloadIntoTransaction = (props: {
payload: AnalyticsEventPayload;
tr: Transaction;
channel: string;
}) => void;
// (No @packageDocumentation comment for this package)
```
<!--SECTION END: Main Entry Types-->
### Peer Dependencies
<!--SECTION START: Peer Dependencies-->
```json
{
"react": "^16.8.0"
}
```
<!--SECTION END: Peer Dependencies-->