@atlaskit/editor-plugin-interactivity 0.1.0
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 +14 -0
- package/LICENSE.md +11 -0
- package/README.md +59 -0
- package/afm-cc/tsconfig.json +25 -0
- package/afm-products/tsconfig.json +25 -0
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/interactivityPlugin.js +18 -0
- package/dist/cjs/interactivityPluginType.js +5 -0
- package/dist/es2019/index.js +4 -0
- package/dist/es2019/interactivityPlugin.js +10 -0
- package/dist/es2019/interactivityPluginType.js +1 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/interactivityPlugin.js +12 -0
- package/dist/esm/interactivityPluginType.js +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/interactivityPlugin.d.ts +9 -0
- package/dist/types/interactivityPluginType.d.ts +2 -0
- package/docs/0-intro.tsx +55 -0
- package/package.json +68 -0
- package/tsconfig.json +4 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# @atlaskit/editor-plugin-interactivity
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`40071c3a1e51d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/40071c3a1e51d) -
|
|
8
|
+
Add the interactivity plugin package and register it in the Confluence full page presets behind
|
|
9
|
+
the platform_editor_editor_interactivity experiment. The plugin is a stub for now — it collects
|
|
10
|
+
nothing.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Copyright 2019 Atlassian Pty Ltd
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
|
|
4
|
+
compliance with the License. You may obtain a copy of the License at
|
|
5
|
+
|
|
6
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
|
|
8
|
+
Unless required by applicable law or agreed to in writing, software distributed under the License is
|
|
9
|
+
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
10
|
+
implied. See the License for the specific language governing permissions and limitations under the
|
|
11
|
+
License.
|
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Editor Plugin Interactivity
|
|
2
|
+
|
|
3
|
+
Interactivity plugin for @atlaskit/editor-core
|
|
4
|
+
|
|
5
|
+
**Note:** This component is designed for internal Atlassian development. External contributors will
|
|
6
|
+
be able to use this component but will not be able to submit issues.
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
The Interactivity plugin reports the `editor interactivity` operational event: how interaction
|
|
11
|
+
latencies were spread over an editor session, as bucketed counts, per
|
|
12
|
+
[RFC 095](https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7527607488/Editor+RFC+095+Confluence+editor+responsiveness+bucketed+INP+telemetry).
|
|
13
|
+
The existing `editor inp` event reports a single value per session and cannot answer how many
|
|
14
|
+
interactions were slow.
|
|
15
|
+
|
|
16
|
+
The plugin is a stub at this point — it registers itself and collects nothing. The collector and the
|
|
17
|
+
event arrive in EDITOR-8553.
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
- **Install** - _yarn add @atlaskit/editor-plugin-interactivity_
|
|
24
|
+
- **npm** -
|
|
25
|
+
[@atlaskit/editor-plugin-interactivity](https://www.npmjs.com/package/@atlaskit/editor-plugin-interactivity)
|
|
26
|
+
- **Source** -
|
|
27
|
+
[Bitbucket](https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/editor/editor-plugin-interactivity)
|
|
28
|
+
- **Bundle** - [unpkg.com](https://unpkg.com/@atlaskit/editor-plugin-interactivity/dist/)
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
**Internal use only**
|
|
35
|
+
|
|
36
|
+
@atlaskit/editor-plugin-interactivity is intended for internal use by the @atlaskit/editor-core and
|
|
37
|
+
as a plugin dependency of the Editor within your product.
|
|
38
|
+
|
|
39
|
+
Direct use of this component is not supported.
|
|
40
|
+
|
|
41
|
+
Please see
|
|
42
|
+
[Atlaskit - Editor plugin interactivity](https://atlaskit.atlassian.com/packages/editor/editor-plugin-interactivity)
|
|
43
|
+
for documentation and examples for this package.
|
|
44
|
+
|
|
45
|
+
## Support
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
For internal Atlassian, visit the slack channel
|
|
50
|
+
[#help-editor](https://atlassian.slack.com/archives/CFG3PSQ9E) for support or visit
|
|
51
|
+
[go/editor-help](https://go/editor-help) to submit a bug.
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
Please see
|
|
58
|
+
[Atlassian Frontend - License](https://hello.atlassian.net/wiki/spaces/AF/pages/2589099144/Documentation#License)
|
|
59
|
+
for more licensing information.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.local-consumption.json",
|
|
3
|
+
"include": [
|
|
4
|
+
"../src/**/*.ts",
|
|
5
|
+
"../src/**/*.tsx"
|
|
6
|
+
],
|
|
7
|
+
"exclude": [
|
|
8
|
+
"../src/**/__tests__/*",
|
|
9
|
+
"../src/**/*.test.*",
|
|
10
|
+
"../src/**/test.*",
|
|
11
|
+
"../src/**/mocks/*",
|
|
12
|
+
"../src/**/examples.*"
|
|
13
|
+
],
|
|
14
|
+
"compilerOptions": {
|
|
15
|
+
"outDir": "../../../../../confluence/tsDist/@atlaskit__editor-plugin-interactivity",
|
|
16
|
+
"rootDir": "../",
|
|
17
|
+
"composite": true,
|
|
18
|
+
"noCheck": true
|
|
19
|
+
},
|
|
20
|
+
"references": [
|
|
21
|
+
{
|
|
22
|
+
"path": "../../editor-common/afm-cc/tsconfig.json"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.local-consumption.json",
|
|
3
|
+
"include": [
|
|
4
|
+
"../src/**/*.ts",
|
|
5
|
+
"../src/**/*.tsx"
|
|
6
|
+
],
|
|
7
|
+
"exclude": [
|
|
8
|
+
"../src/**/__tests__/*",
|
|
9
|
+
"../src/**/*.test.*",
|
|
10
|
+
"../src/**/test.*",
|
|
11
|
+
"../src/**/mocks/*",
|
|
12
|
+
"../src/**/examples.*"
|
|
13
|
+
],
|
|
14
|
+
"compilerOptions": {
|
|
15
|
+
"outDir": "../../../../../tsDist/@atlaskit__editor-plugin-interactivity/app",
|
|
16
|
+
"rootDir": "../",
|
|
17
|
+
"composite": true,
|
|
18
|
+
"noCheck": true
|
|
19
|
+
},
|
|
20
|
+
"references": [
|
|
21
|
+
{
|
|
22
|
+
"path": "../../editor-common/afm-products/tsconfig.json"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "interactivityPlugin", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _interactivityPlugin.interactivityPlugin;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _interactivityPlugin = require("./interactivityPlugin");
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.interactivityPlugin = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Reports interaction latency distributions for full page editor sessions as the
|
|
9
|
+
* `editor interactivity` operational event.
|
|
10
|
+
*
|
|
11
|
+
* A stub for now: the plugin only registers itself. The collector and the event land in
|
|
12
|
+
* EDITOR-8553.
|
|
13
|
+
*/
|
|
14
|
+
var interactivityPlugin = exports.interactivityPlugin = function interactivityPlugin() {
|
|
15
|
+
return {
|
|
16
|
+
name: 'interactivity'
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reports interaction latency distributions for full page editor sessions as the
|
|
3
|
+
* `editor interactivity` operational event.
|
|
4
|
+
*
|
|
5
|
+
* A stub for now: the plugin only registers itself. The collector and the event land in
|
|
6
|
+
* EDITOR-8553.
|
|
7
|
+
*/
|
|
8
|
+
export const interactivityPlugin = () => ({
|
|
9
|
+
name: 'interactivity'
|
|
10
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reports interaction latency distributions for full page editor sessions as the
|
|
3
|
+
* `editor interactivity` operational event.
|
|
4
|
+
*
|
|
5
|
+
* A stub for now: the plugin only registers itself. The collector and the event land in
|
|
6
|
+
* EDITOR-8553.
|
|
7
|
+
*/
|
|
8
|
+
export var interactivityPlugin = function interactivityPlugin() {
|
|
9
|
+
return {
|
|
10
|
+
name: 'interactivity'
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InteractivityPlugin } from './interactivityPluginType';
|
|
2
|
+
/**
|
|
3
|
+
* Reports interaction latency distributions for full page editor sessions as the
|
|
4
|
+
* `editor interactivity` operational event.
|
|
5
|
+
*
|
|
6
|
+
* A stub for now: the plugin only registers itself. The collector and the event land in
|
|
7
|
+
* EDITOR-8553.
|
|
8
|
+
*/
|
|
9
|
+
export declare const interactivityPlugin: InteractivityPlugin;
|
package/docs/0-intro.tsx
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { AtlassianInternalWarning, code, md } from '@atlaskit/docs';
|
|
4
|
+
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
5
|
+
import { createEditorUseOnlyNotice } from '@atlaskit/editor-common/doc-utils';
|
|
6
|
+
import { token } from '@atlaskit/tokens';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
|
+
const readmeDocs: any = md`
|
|
10
|
+
|
|
11
|
+
${createEditorUseOnlyNotice('Editor Plugin Interactivity', [
|
|
12
|
+
{ name: 'Editor Core', link: '/packages/editor/editor-core' },
|
|
13
|
+
])}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
${(
|
|
17
|
+
<>
|
|
18
|
+
{/* eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 */}
|
|
19
|
+
<div style={{ marginTop: token('space.100') }}>
|
|
20
|
+
<AtlassianInternalWarning />
|
|
21
|
+
</div>
|
|
22
|
+
</>
|
|
23
|
+
)}
|
|
24
|
+
|
|
25
|
+
This package includes the interactivity plugin used by \`@atlaskit/editor-core\`.
|
|
26
|
+
|
|
27
|
+
It will report the \`editor interactivity\` operational event: how interaction latencies were
|
|
28
|
+
spread over an editor session, as bucketed counts, per [RFC 095](https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7527607488/Editor+RFC+095+Confluence+editor+responsiveness+bucketed+INP+telemetry).
|
|
29
|
+
The plugin is a stub at this point and collects nothing.
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
Add the plugin to a preset. It has no configuration, state, actions or commands, so there is
|
|
35
|
+
nothing to call:
|
|
36
|
+
|
|
37
|
+
${code`
|
|
38
|
+
import { interactivityPlugin } from '@atlaskit/editor-plugin-interactivity';
|
|
39
|
+
|
|
40
|
+
const preset = new EditorPresetBuilder().add(interactivityPlugin);
|
|
41
|
+
`}
|
|
42
|
+
|
|
43
|
+
${code`
|
|
44
|
+
type InteractivityPlugin = NextEditorPlugin<'interactivity'>
|
|
45
|
+
`}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
## Support
|
|
49
|
+
---
|
|
50
|
+
For internal Atlassian, visit the slack channel [#help-editor](https://atlassian.slack.com/archives/CFG3PSQ9E) for support or visit [go/editor-help](https://go/editor-help) to submit a bug.
|
|
51
|
+
## License
|
|
52
|
+
---
|
|
53
|
+
Please see [Atlassian Frontend - License](https://hello.atlassian.net/wiki/spaces/AF/pages/2589099144/Documentation#License) for more licensing information.
|
|
54
|
+
`;
|
|
55
|
+
export default readmeDocs;
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-plugin-interactivity",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Interactivity plugin for @atlaskit/editor-core",
|
|
5
|
+
"author": "Atlassian Pty Ltd",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"atlassian": {
|
|
11
|
+
"team": "Editor: Lego",
|
|
12
|
+
"releaseModel": "continuous",
|
|
13
|
+
"singleton": true
|
|
14
|
+
},
|
|
15
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
16
|
+
"main": "dist/cjs/index.js",
|
|
17
|
+
"module": "dist/esm/index.js",
|
|
18
|
+
"module:es2019": "dist/es2019/index.js",
|
|
19
|
+
"types": "dist/types/index.d.ts",
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@babel/runtime": "^7.0.0"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@atlaskit/editor-common": "^119.5.0",
|
|
26
|
+
"react": "^18.2.0 || ^19.2.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"react": "^19.2.0",
|
|
30
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2"
|
|
31
|
+
},
|
|
32
|
+
"techstack": {
|
|
33
|
+
"@atlassian/frontend": {
|
|
34
|
+
"code-structure": [
|
|
35
|
+
"editor-plugin"
|
|
36
|
+
],
|
|
37
|
+
"import-structure": [
|
|
38
|
+
"atlassian-conventions"
|
|
39
|
+
],
|
|
40
|
+
"circular-dependencies": [
|
|
41
|
+
"file-and-folder-level"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"@repo/internal": {
|
|
45
|
+
"dom-events": "use-bind-event-listener",
|
|
46
|
+
"analytics": [
|
|
47
|
+
"analytics-next"
|
|
48
|
+
],
|
|
49
|
+
"design-tokens": [
|
|
50
|
+
"color"
|
|
51
|
+
],
|
|
52
|
+
"theming": [
|
|
53
|
+
"react-context"
|
|
54
|
+
],
|
|
55
|
+
"ui-components": [
|
|
56
|
+
"lite-mode"
|
|
57
|
+
],
|
|
58
|
+
"deprecation": "no-deprecated-imports",
|
|
59
|
+
"styling": [
|
|
60
|
+
"emotion",
|
|
61
|
+
"emotion"
|
|
62
|
+
],
|
|
63
|
+
"imports": [
|
|
64
|
+
"import-no-extraneous-disable-for-examples-and-docs"
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
package/tsconfig.json
ADDED