@atlaskit/editor-plugin-limited-mode 5.0.22 → 5.0.24

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,18 @@
1
1
  # @atlaskit/editor-plugin-limited-mode
2
2
 
3
+ ## 5.0.24
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 5.0.23
10
+
11
+ ### Patch Changes
12
+
13
+ - [`14803a836f641`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/14803a836f641) -
14
+ Update README.md and 0-intro.tsx
15
+
3
16
  ## 5.0.22
4
17
 
5
18
  ### Patch Changes
package/README.md CHANGED
@@ -1 +1,42 @@
1
- # Editor plugin limited mode
1
+ # Editor Plugin Limited Mode
2
+
3
+ LimitedMode plugin for @atlaskit/editor-core
4
+
5
+ **Note:** This component is designed for internal Atlassian development.
6
+ External contributors will be able to use this component but will not be able to submit issues.
7
+
8
+ ## Overview
9
+
10
+ The Limited Mode plugin provides performance optimization for the Atlassian Editor by monitoring document size and automatically enabling limited mode when documents exceed configurable thresholds. This helps maintain editor performance with large documents by disabling certain resource-intensive features.
11
+
12
+ ## Key features
13
+
14
+ - **Document size monitoring** - Tracks document size and node count to detect when thresholds are breached
15
+ - **Automatic threshold detection** - Activates limited mode based on document size, node count, or presence of legacy content macros
16
+ - **Configurable thresholds** - Supports experimentation-based threshold configuration via Statsig
17
+ - **Node anchor integration** - Integrates with the node anchor system to disable anchor tracking in limited mode
18
+ - **Shared state** - Exposes enabled state through plugin API for other plugins to react to limited mode changes
19
+
20
+ ## Install
21
+ ---
22
+ - **Install** - *yarn add @atlaskit/editor-plugin-limited-mode*
23
+ - **npm** - [@atlaskit/editor-plugin-limited-mode](https://www.npmjs.com/package/@atlaskit/editor-plugin-limited-mode)
24
+ - **Source** - [Bitbucket](https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/editor/editor-plugin-limited-mode)
25
+ - **Bundle** - [unpkg.com](https://unpkg.com/@atlaskit/editor-plugin-limited-mode/dist/)
26
+
27
+ ## Usage
28
+ ---
29
+ **Internal use only**
30
+
31
+ @atlaskit/editor-plugin-limited-mode is intended for internal use by the @atlaskit/editor-core and as a plugin dependency of the Editor within your product.
32
+
33
+ Direct use of this component is not supported.
34
+
35
+ Please see [Atlaskit - Editor plugin limited mode](https://atlaskit.atlassian.com/packages/editor/editor-plugin-limited-mode) for documentation and examples for this package.
36
+
37
+ ## Support
38
+ ---
39
+ 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.
40
+ ## License
41
+ ---
42
+ Please see [Atlassian Frontend - License](https://hello.atlassian.net/wiki/spaces/AF/pages/2589099144/Documentation#License) for more licensing information.
package/docs/0-intro.tsx CHANGED
@@ -31,7 +31,26 @@ The \`dependencies\`, \`configuration\`, \`state\`, \`actions\`, and \`commands\
31
31
  below:
32
32
 
33
33
  ${code`
34
- type LimitedModePlugin = NextEditorPlugin<'limitedMode'>
34
+ export type LimitedModePluginState = {
35
+ documentSizeBreachesThreshold: boolean;
36
+ };
37
+
38
+ export type LimitedModePlugin = NextEditorPlugin<
39
+ 'limitedMode',
40
+ {
41
+ pluginConfiguration: LimitedModePluginOptions | undefined;
42
+ sharedState: {
43
+ enabled: boolean;
44
+ limitedModePluginKey: PluginKey<LimitedModePluginState>;
45
+ };
46
+ }
47
+ >;
48
+
49
+ export type LimitedModePluginOptions = {
50
+ contentId?: string;
51
+ killSwitchEnabled?: boolean;
52
+ showFlag?: (props: { close: string; description: React.ReactNode; title: string }) => void;
53
+ };
35
54
  `}
36
55
 
37
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-limited-mode",
3
- "version": "5.0.22",
3
+ "version": "5.0.24",
4
4
  "description": "LimitedMode plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@atlaskit/editor-prosemirror": "^7.3.0",
32
32
  "@atlaskit/platform-feature-flags": "^1.1.0",
33
- "@atlaskit/tmp-editor-statsig": "^55.0.0",
33
+ "@atlaskit/tmp-editor-statsig": "^56.0.0",
34
34
  "@babel/runtime": "^7.0.0",
35
35
  "bind-event-listener": "^3.0.0",
36
36
  "react-intl-next": "npm:react-intl@^5.18.1"