@atlaskit/editor-plugin-interactivity

中文文档
15.0.0发布于 2026/10/27Apache-2.0TypeScriptESM + CJS近 30 天下载 1.1万

Interactivity plugin for @atlaskit/editor-core

原始使用文档
文档目录9 节
  1. Overview
  2. What it reports
  3. The editor groups
  4. Cadence
  5. Sessions
  6. Install
  7. Usage
  8. Support
  9. License

Editor Plugin Interactivity

Interactivity plugin for @atlaskit/editor-core

Note: This component is designed for internal Atlassian development. External contributors will be able to use this component but will not be able to submit issues.

Overview

The Interactivity plugin reports the editor interactivity operational event: session-to-date interaction latency distributions for full page editor sessions, per RFC 095. Signals that report one value per session cannot answer how many interactions were slow, so this plugin keeps bucketed counts instead.

What it reports

  • page — every interaction on the page, as totalCount, observedCount, sumMs, maxMs, buckets and percentilesMs. totalCount comes from performance.interactionCount and includes interactions below the 16 ms Event Timing reporting threshold, so totalCount - observedCount is the sub-threshold count. percentilesMs ranks over totalCount, as INP does, so a percentile that falls among the sub-threshold interactions reads as 16.
  • editorTyping, editorPointer and editorOther — the interactions with the editor, in the same shape as page. Event Timing observes the whole document, so page alone cannot say whether a regression is in the editor or elsewhere on the page; these can. Every interaction with the editor is in exactly one of them, and in page as well.
  • editor — the three editor groups as one, in the same shape: the per-session p98 of the editor as a whole, which theirs cannot give.
  • percentilesMs — percentiles of the same interactions, keyed by percentile and exact to the 8 ms Event Timing reports durations at; a per-session metric reads these rather than buckets.
  • Bucket keys are the upper boundary of the bucket in milliseconds and count only interactions above the previous boundary. Buckets are not cumulative and empty buckets are omitted, so a missing bucket means zero. The boundaries are versioned by schema.
  • Snapshots are session-to-date, so a cohort query takes the highest seq per interactivitySessionId and then sums bucket counts.

The editor groups

An interaction is the editor's when it happened inside the element the editor renders itself into, which editor-core hands to the plugin's hook as wrapperElement. A second observer reports the events of those interactions from that element, alongside the Event Timing observer that reports the latencies, and the tracker makes interactions out of both.

The editor's events are what count the interactions, because there is no performance.interactionCount per group and the 16 ms reporting threshold is the lowest the spec allows. An interaction is several events, so it is counted on one of them: typing on keydown, because a held key repeats and the browser counts every repeat; pointing on pointerup, because a press taken over by a scroll never gets one — and the browser counts no interaction for it either. The group comes from the same events, and the one table in interaction-events.ts is read for both counting and grouping, so the two cannot disagree.

An entry lands in the group of the event it measured, matched by that event's type and timestamp. An interaction whose events the editor never reported stays in page only.

Known gaps, all of which only move interactions out of the editor groups and never between them:

  • What the editor renders outside that element — a dropdown or a dialog in a portal — is counted in page only, as is everything before the element arrives, a render after the editor first paints.
  • editorOther is the remainder slot: the browser counts only keyboard and pointer interactions today, so it reads zero until that changes.
  • While an IME composes, the browser can group key presses into fewer interactions than we count, so editorTyping.totalCount can run ahead of it.

Cadence

Snapshots are taken 10 s, 30 s and 60 s after the session starts, then every 60 s, plus on every transition of the tab to hidden, on pagehide and on editor unmount. A snapshot that would repeat the previous one is skipped, and signals from one lifecycle transition are coalesced into a single snapshot.

Sessions

A session covers one document in one mode, so its latencies are always comparable with each other. It normally lasts an editor mount, but it also ends while the editor stays mounted when either of those changes — Confluence live pages navigate and switch between reading and editing without remounting the editor. That is reported as reason: 'navigation' or reason: 'modeChange', and the next session starts with a new interactivitySessionId. Sessions of one editor mount share an editorSessionId, which is what stitches them back together.

Install


Usage


Internal use only

@atlaskit/editor-plugin-interactivity is intended for internal use by the @atlaskit/editor-core and as a plugin dependency of the Editor within your product.

Direct use of this component is not supported.

Please see Atlaskit - Editor plugin interactivity for documentation and examples for this package.

Support


For internal Atlassian, visit the slack channel #help-editor for support or visit go/editor-help to submit a bug.

License


Please see Atlassian Frontend - License for more licensing information.

版本与发布记录

@atlaskit/editor-plugin-interactivity 共发布 25 个版本,首次发布于 2026/08/14;过去 12 个月发布了 25 个版本。

版本发布日期距今
15.0.0latest2026/10/2711 天前
14.0.02026/10/2018 天前
13.0.02026/10/1622 天前
12.0.02026/10/1425 天前
11.0.02026/10/0830 天前
10.0.02026/10/071 个月前

关于 @atlaskit/editor-plugin-interactivity 的常见问题

@atlaskit/editor-plugin-interactivity 是什么?

Interactivity plugin for @atlaskit/editor-core

如何安装 @atlaskit/editor-plugin-interactivity?

在项目目录运行 npm install @atlaskit/editor-plugin-interactivity,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^18.2.0 || ^19.2.0)、@atlaskit/editor-common(^134.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@atlaskit/editor-plugin-interactivity 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@atlaskit/editor-plugin-interactivity 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@atlaskit/editor-plugin-interactivity 可以商用吗?

@atlaskit/editor-plugin-interactivity 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@atlaskit/editor-plugin-interactivity 的下载量有多少?

根据 npm 官方下载统计,@atlaskit/editor-plugin-interactivity 在 2026/10/07 – 2026/11/05 这 30 天内被下载 11,117 次,日均约 371 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@atlaskit/editor-plugin-interactivity 还在维护吗?

最新版本 15.0.0 发布于 2026/10/27(11 天前);至今共发布 25 个版本,其中过去 12 个月发布了 25 个;首次发布于 2026/08/14。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。